...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::mpi::comm_create_kind — Enumeration used to describe how to adopt a C MPI_Comm
into a Boost.MPI communicator.
// In header: <boost/mpi/communicator.hpp> enum comm_create_kind { comm_duplicate, comm_take_ownership, comm_attach };
The values for this enumeration determine how a Boost.MPI communicator will behave when constructed with an MPI communicator. The options are:
comm_duplicate:
Duplicate the MPI_Comm communicator to create a new communicator (e.g., with MPI_Comm_dup). This new MPI_Comm communicator will be automatically freed when the Boost.MPI communicator (and all copies of it) is destroyed.
comm_take_ownership:
Take ownership of the communicator. It will be freed automatically when all of the Boost.MPI communicators go out of scope. This option must not be used with MPI_COMM_WORLD.
comm_attach:
The Boost.MPI communicator will reference the existing MPI communicator but will not free it when the Boost.MPI communicator goes out of scope. This option should only be used when the communicator is managed by the user or MPI library (e.g., MPI_COMM_WORLD).