A simple wrapper over an MPI common world. More...
#include <mpi_common.h>
Public Member Functions | |
MPICommonWorldWrapper (MPI_Comm src_comm=MPI_COMM_NULL, int color=0, int rank=-1) | |
Creates a common world wrapper. More... | |
MPI_Comm | comm () const |
Returns the common world held by the wrapper. | |
int | size () const |
Returns the size of the world. | |
int | rank () const |
Returns the rank of this process in the world. | |
A simple wrapper over an MPI common world.
Definition at line 74 of file mpi_common.h.
|
inlineexplicit |
Creates a common world wrapper.
The new common world is created by taking the existing communicator passed in as src_comm, and splitting it using the color and the rank specified. In default, we will split from Caffe2's global communicator, and use color 0 as well as rank implicitly given by src_comm. As a result, the default constructor basically creates a comm identical to the source comm world.
Definition at line 86 of file mpi_common.h.