This class provides methods for initializing, finalizing, and querying the global MPI session. More...
Public Member Functions | |
| ~MPISession () | |
Static Public Member Functions | |
| static void | init (int *argc, void ***argv) |
| Initializer, calls MPI_Init() if necessary. | |
| static void | init (int *argc, char ***argv) |
| Initializer, calls MPI_Init() if necessary. | |
| static int | getRank () |
| Returns the process rank relative to MPI_COMM_WORLD. | |
| static int | getNProc () |
| Returns the number of processors in MPI_COMM_WORLD. | |
| static void | finalize () |
| Finalizer, calls MPI_Finalize() if necessary. | |
| static bool & | showStartupMessage () |
Private Member Functions | |
| MPISession (int *argc, char ***argv) | |
Static Private Attributes | |
| static int | rank_ = 0 |
| static int | nProc_ = 1 |
This class provides methods for initializing, finalizing, and querying the global MPI session.
Definition at line 62 of file PlayaMPISession.hpp.
| Playa::MPISession::MPISession | ( | int * | argc, |
| char *** | argv | ||
| ) | [private] |
private ctor, to be called only by init()
Definition at line 54 of file PlayaMPISession.cpp.
References nProc_, rank_, and showStartupMessage().
Referenced by init().
dtor calls MPI finalize
Definition at line 123 of file PlayaMPISession.cpp.
References Playa::MPIOp::clearOpRegistry(), and Playa::MPIDataType::clearTypeRegistry().
| void Playa::MPISession::finalize | ( | ) | [static] |
Finalizer, calls MPI_Finalize() if necessary.
Definition at line 117 of file PlayaMPISession.cpp.
| static int Playa::MPISession::getNProc | ( | ) | [inline, static] |
Returns the number of processors in MPI_COMM_WORLD.
Definition at line 75 of file PlayaMPISession.hpp.
References nProc_.
| static int Playa::MPISession::getRank | ( | ) | [inline, static] |
Returns the process rank relative to MPI_COMM_WORLD.
Definition at line 72 of file PlayaMPISession.hpp.
References rank_.
| void Playa::MPISession::init | ( | int * | argc, |
| void *** | argv | ||
| ) | [static] |
Initializer, calls MPI_Init() if necessary.
Definition at line 112 of file PlayaMPISession.cpp.
| void Playa::MPISession::init | ( | int * | argc, |
| char *** | argv | ||
| ) | [static] |
Initializer, calls MPI_Init() if necessary.
Definition at line 107 of file PlayaMPISession.cpp.
References MPISession().
| static bool& Playa::MPISession::showStartupMessage | ( | ) | [inline, static] |
Set to true if a message should be written by each processor at startup.
Definition at line 82 of file PlayaMPISession.hpp.
Referenced by MPISession().
int Playa::MPISession::nProc_ = 1 [static, private] |
Definition at line 86 of file PlayaMPISession.hpp.
Referenced by getNProc(), and MPISession().
int Playa::MPISession::rank_ = 0 [static, private] |
Definition at line 85 of file PlayaMPISession.hpp.
Referenced by getRank(), and MPISession().