# Boost::mpi or C MPI for high performance scientific applications?

The thing I dislike most about MPI is dealing with datatypes (i.e. data maps/masks) because they don't fit that nicely with object oriented C++. boost::mpi only supports MPI 1.1, however, from their website:

boost::mpi is a C++ friendly interface to the standard Message Passing Interface… Boost.MPI can build MPI data types for user-defined types using the Boost.Serialization library

Has anyone had any experience with boost::mpi for serious scientific computing? Would you recommend it? Did you had any issues (scaling problems, compiler problems, errors, not implemented features, the need for some mpi 2.2 features)?

Can you comment on using boost::mpi instead of using the MPI C implementation from C++? Can you combine both (use boost::mpi when you can, C-MPI elsewhere)?

Do you know of any large scientific code using boost::mpi ?

• You should also look at this page boost.org/doc/libs/1_50_0/doc/html/mpi/… in order to be sure that all functions that you need are supported. The possibility to implement them yourself should also be considered. – Alexander Aug 9 '12 at 9:24
• The best reason I can think of to use Boost::MPI is that it supports serialization of C++ types automatically. The MPI C interface cannot do this on its own and you would have to create MPI datatypes for all of your C++ objects in order to pass them via Send/Recv, etc., unless you want to do your own serialization by some other means. – Jeff Mar 17 '13 at 1:32
• The Elemental (libelemental.org) MPI interface (github.com/elemental/Elemental/blob/master/src/core/imports/…) does automatic type detection in an elegant way. However, it does not attempt to do many of the things that Boost::MPI does. – Jeff Sep 19 '14 at 5:14

As far as I know, boost::mpi is just a c++ wrapper around the C API. As such, you should be able to use boost::mpi and switch to the C API whenever some functionality is not implemented. Indeed, from their webpage:
I have not used it myself, and do not know of a major library that does, but I'd expect it to be just a lightweight wrapper and as such one should not worry about the performance compared to C API.