Celeritas 0.6.0-dev.115+3b60a5fd
|
RAII class for initializing and finalizing MPI. More...
#include <ScopedMpiInit.hh>
Public Types | |
enum class | Status { disabled = -1 , uninitialized = 0 , initialized = 1 } |
Status of initialization. More... | |
Public Member Functions | |
ScopedMpiInit (int *argc, char ***argv) | |
Construct with argc/argv references. | |
ScopedMpiInit () | |
Construct with null argc/argv when those are unavailable. | |
~ScopedMpiInit () | |
Call MPI finalize on destruction. | |
bool | is_world_multiprocess () const |
Convenience method to determine whether a multiprocess job is running. | |
CELER_DELETE_COPY_MOVE (ScopedMpiInit) | |
Static Public Member Functions | |
static Status | status () |
Whether MPI has been initialized or disabled. | |
RAII class for initializing and finalizing MPI.
celeritas::ScopedMpiInit::CELER_DELETE_COPY_MOVE | ( | ScopedMpiInit | ) |
Prevent copying and moving for RAII class
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.
|
static |
Whether MPI has been initialized or disabled.
NOTE: This function cannot call the CELER_LOG macros because those macros query the status.