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

|
inlinenoexcept |
Return the dry-run level (default: 0).
Definition at line 115 of file parRun.H.
References Foam::noexcept.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Return the verbosity level (default: 0).
Definition at line 135 of file parRun.H.
References Foam::noexcept.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
True if this is (or will be) a parallel run.
Definition at line 158 of file parRun.H.
References Foam::noexcept.
|
inlinenoexcept |
|
inlinenoexcept |
True if a parallel run and uses distributed roots.
Definition at line 179 of file parRun.H.
References Foam::noexcept.
|
inlinenoexcept |
|
inlinenoexcept |
True if MPI threads are desired (default: false).
Definition at line 195 of file parRun.H.
References Foam::noexcept.
|
inlinenoexcept |
|
inline |
Initialize UPstream for a parallel run.
Definition at line 211 of file parRun.H.
References Foam::endl(), UPstream::exit(), Foam::Info, Foam::infoDetailLevel, Foam::InfoErr, and UPstream::init().
