ALPSCore reference
|
Encapsulation of an MPI communicator and some communicator-related operations. More...
#include <mpi.hpp>
Public Member Functions | |
communicator () | |
Creates an MPI_COMM_WORLD communicator object. More... | |
communicator (const MPI_Comm &comm, comm_create_kind kind) | |
Creates a communicator object from an MPI communicator. More... | |
int | rank () const |
Returns process rank in this communicator. More... | |
int | size () const |
Returns the number of processes in this communicator. More... | |
void | barrier () const |
Barrier on this communicator. More... | |
operator MPI_Comm () const | |
Converts this communicator object to MPI communicator. More... | |
Encapsulation of an MPI communicator and some communicator-related operations.
A communicator object can be created from an existing MPI communicator, either by simple wrapping, by duplicating, or by taking complete ownership (see communicator(const MPI_Comm&, comm_create_kind)
).
Some MPI operations are implemented as mthods of this class. Many ALPSCore classes have broadcast()
methods that take the communicator object as an argument. The communicator object is implicitly convertible to the wrapped MPI communicator and therefore can be used as an argument to MPI calls directly.
|
inline |
|
inline |
Creates a communicator object from an MPI communicator.
comm | MPI communicator |
kind | How to manage the communicator (see alps::mpi::comm_create_kind) |
|
inline |
|
inline |
|
inline |
|
inline |