Boost logo

Boost-MPI :

Subject: [Boost-mpi] Questions regarding MPI C++ bindings
From: Alain O Miniussi (alain.miniussi_at_[hidden])
Date: 2012-11-26 09:03:43


Hi,

Boost MPI is based on MPI C-bindings and does not use the C++ MPI
binding at all (and those are going to be deprecated in MPI-3).

Yet, on the platforms I use (and I guess on most platform) Boost MPI is
likely to bring in a binary dependency on the MPI C++ binding/libraries.

There are multiple reason for that, but eventually, if I consider, for
example, Open MPI, the mpi.h header will detect that a C++ compiler is
being used and will bring in the C++ headers. I suspect most
implementations do the same.

This bring an unnecessary dependency on the end user, who will need to
link against an unused, maybe uninstalled, library. But removing it is
unlikely to be trivial.
Open MPI has a implementation specific flag to avoid that
(OMPI_SKIP_MPICXX) but it is not easy (did a few tries) to pass it
through the bjam configuration (it look like the "using mpi ... ;
instruction allows you to specify the mpicxx command, or the
compilations flags, but not both).

One quick and dirty solution would be to put something along the lines
of:
#if defined(OPEN_MPI)
#define OMPI_SKIP_MPICXX
#endif

at the top of config.hpp (and extends with all possibles implementation
specific flags) but that would be likely to prevent people to mix
Boost.MPI and C++ MPI. Although that's the way MPI is aiming, it could
be considered a little bit harsh for legacy code ?
Or maybe we could use the same trick, but only for non header files ?

Also, is it a problem that we should try to address, or should we
consider it is an MPI implementation issue ?

Also, that is the rationale for configuring Boost MPI out of mpi[CC|c++|
cxx] instead of mpicc, since tha's the API that is used ?

Best regards

Alain


Boost-Commit list run by troyer at boostpro.com