The MPI C++ bindings: what happened, and why?
Jeff Hammond at Argonne tells me that there’s some confusion in the user community about MPI and C++.
Let me see if I can clear up some of the issues.
In this blog entry, I’ll describe what has happened to the C++ bindings over time (up to and including their removal in MPI-3), and why. In a second blog entry, I’ll describe what this means to real-world C++ MPI applications.
Why were the C++ bindings deprecated in the first place? For several reasons:
- It was felt that the Forum didn’t have enough C++ expertise to continue to maintain the C++ bindings. For example, many errata had crept in regarding the C++ bindings since 1996. Some of those errata were even (initially) fixed incorrectly due to subtle issues in the C++ language!
- Many C++ MPI developers told the Forum that the C++ bindings really didn’t offer anything useful to them over the C bindings. Indeed, one of the most well-known MPI C++ class libraries — boost.mpi — is implemented on the MPI C bindings, not the MPI C++ bindings. This invalidated one of the major design goals for the MPI C++ bindings: providing basic MPI C++ language building blocks to enable the building of higher-level class libraries. In 15+ years since the MPI C++ bindings were added in MPI-2.0, this goal has failed to be realized.
- After multiple surveys of the user community, the Forum could only find a handful of developers who are actually using the C++ bindings in real-world applications (i.e., homework assignments don’t count).
- The C++ bindings were (intentionally) a more-or-less 1:1 mapping to the C bindings. Hence, C++ MPI applications can convert to use the MPI C bindings with little or no loss of functionality (albeit at the cost of person-hours to convert their codes).
Hence, it seemed like a lot of Forum effort was being expended to keep alive a feature that very few people were using. It therefore got deprecated in MPI-2.2.
Sidenote: Keeping the C++ bindings alive is different than keeping <insert your favorite MPI feature that no one uses> alive. The former requires active work by the Forum (e.g., adding new C++ functions, constants, and classes in MPI-3), whereas the latter is a passive action.
Note that “deprecated” means two things:
- The Forum signaled its intent that it might remove the C++ bindings someday.
- No new work would be done to maintain or extend the existing C++ bindings.
Because of the 2nd point, many new MPI-3 functions were added without corresponding C++ bindings. When we came close to finishing MPI-3, the Forum was then left in an awkward position: should we leave the now-incomplete C++ bindings as deprecated (but still technically in the standard), or should we just remove them altogether?
More specifically, the choice boiled down to:
- Add C++ bindings for all new MPI-3 functions so that there would be a full, consistent set of C++ bindings, or
- Remove the C++ bindings entirely
Ultimately, choice #2 was adopted: the C++ bindings were removed.
It didn’t help that no one stepped forward to design, prototype, and implement C++ bindings for all the new MPI-3 functions. While I would not say that this was not the determining factor, it certainly was one of several nails in the C++ bindings’ coffin.Tags: