[Mpi-forum] MPI Forum BoF at SC 2011
jsquyres at cisco.com
Thu Nov 3 11:10:25 CDT 2011
On Nov 3, 2011, at 11:33 AM, James Dinan wrote:
> These are the questions I've been mulling over internally:
> 1. Are C++ users limited by the C bindings?
> 2. Would C++ users benefit substantially from C++ bindings?
> 3. Do these bindings need to be in the MPI standard?
These are good and fair questions.
> Almost all C++ users I talk to would use C++ bindings if they were good bindings and thorough. However, this doesn't imply a strong "yes" to any of the above.
One thing to clarify here: the MPI C++ bindings *are* thorough. Specifically: C++ bindings exist for every MPI-2.2 function. But keep in mind: they are *bindings*, meaning that it was an explicit goal of the Forum to make them [nearly] 1:1 to the C bindings.
This is not what (some? most?) MPI C++ developers want, however.
Making a good MPI C++ class library -- something with higher-level semantics over simple bindings -- is what I have heard most C++ developers ask for. The Forum specifically (and rightfully, IMNSHO) decided that such a class library was outside the scope of the standard. The fairly obvious argument is: once you go outside of a 1:1 mapping to the C bindings, you're -- by definition -- creating new semantics above and beyond what is proscribed in the MPI standard. Which seems like an excellent opportunity for a 3rd party library -- not the standard.
> I think it would be really helpful to gather details on the technical shortcomings of C bindings in C++ code (the discussion on exceptions has been really interesting) and examples where a good C++ binding would have solved a development problem or provided a more elegant solution.
The original intent of the C++ bindings was that they would provide a good bootstrapping for more "interesting" C++ MPI functionality. Unfortunately, that didn't really pan out. Case in point is that Boost.mpi is written with the C bindings, not the C++ bindings.
I believe the existing C++ users who used the C++ bindings did so because they do offer a few C++-friendly abstractions (e.g., objects), making the MPI C++ bindings fit in well with the rest of their C++ code base. In a technical sense, it wouldn't be a tragedy to replace them with C bindings because, by definition, they are a nearly 1:1 mapping to the C bindings. But it does cost money and people and time to do that work.
jsquyres at cisco.com
For corporate legal information go to:
More information about the mpi-forum