Helper class for initializing parallel jobs from the command arguments, storing 'dry-run' state etc. Also handles cleanup of parallel (or serial) jobs. More...
Public Member Functions | |
ParRunControl () noexcept | |
Default construct. More... | |
~ParRunControl () | |
Destructor. Shutdown (finalize) MPI as required. More... | |
int | dryRun () const noexcept |
Return the dry-run level (default: 0) More... | |
void | incrDryRun (int level=1) noexcept |
Increase the dry-run level. More... | |
int | dryRun (const int level) noexcept |
Change dry-run level, returns old value. More... | |
int | verbose () const noexcept |
Return the verbosity level (default: 0) More... | |
void | incrVerbose (int level=1) noexcept |
Increase the verbosity level. More... | |
int | verbose (const int level) noexcept |
Change verbosity level, returns old value. More... | |
bool | parRun () const noexcept |
True if this is (or will be) a parallel run. More... | |
bool | parRun (const bool on) noexcept |
Set as parallel run on/off, return the previous value. More... | |
bool | distributed () const noexcept |
True if a parallel run and uses distributed roots. More... | |
void | distributed (bool on) noexcept |
Set use of distributed roots, but only if actually parallel. More... | |
bool | threads () const noexcept |
True if MPI threads are desired (default: false) More... | |
void | threads (bool on) noexcept |
Set preference for use of MPI threads. More... | |
void | runPar (int &argc, char **&argv) |
Initialize UPstream for a parallel run. More... | |
Helper class for initializing parallel jobs from the command arguments, storing 'dry-run' state etc. Also handles cleanup of parallel (or serial) jobs.
|
inlinenoexcept |
|
inline |
Destructor. Shutdown (finalize) MPI as required.
Definition at line 98 of file parRun.H.
References Foam::endl(), Foam::Info, and UPstream::shutdown().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Initialize UPstream for a parallel run.
Definition at line 209 of file parRun.H.
References Foam::endl(), UPstream::exit(), Foam::Info, and UPstream::init().