RAII class for initializing and finalizing MPI.
More...
#include <ScopedMpiInit.hh>
RAII class for initializing and finalizing MPI.
- Note
- Unlike the MpiCommunicator and MpiOperations class, it is not necessary to link against MPI to use this class.
◆ Status
Status of initialization.
Enumerator |
---|
disabled | Not compiled or disabled via environment.
|
uninitialized | MPI_Init has not been called anywhere.
|
initialized | MPI_Init has been called somewhere.
|
◆ CELER_DELETE_COPY_MOVE()
celeritas::ScopedMpiInit::CELER_DELETE_COPY_MOVE |
( |
ScopedMpiInit |
| ) |
|
Prevent copying and moving for RAII class
◆ is_world_multiprocess()
bool celeritas::ScopedMpiInit::is_world_multiprocess |
( |
| ) |
const |
Convenience method to determine whether a multiprocess job is running.
This is a shortcut for comm_world().size() > 1
meant primarily for applications. Linking against MPI is not required to use it.
◆ status()
auto celeritas::ScopedMpiInit::status |
( |
| ) |
|
|
static |
Whether MPI has been initialized or disabled.
NOTE: This function cannot call the CELER_LOG macros because those macros query the status.
The documentation for this class was generated from the following files: