40 #ifndef Foam_argListRunControl_H 41 #define Foam_argListRunControl_H 97 <<
"Finalising parallel run" <<
endl;
155 return (parallel_ && distributed_);
161 distributed_ = (parallel_ && on);
177 void runPar(
int& argc,
char**& argv)
183 <<
"Failed to start parallel run" <<
endl;
Helper class for initializing parallel jobs from the command arguments, storing 'dry-run' state etc...
messageStream InfoErr
Information stream (stderr output on master, null elsewhere)
~ParRunControl()
Destructor. Shutdown (finalize) MPI as required.
int verbose() const noexcept
Return the verbosity level (default: 0)
int infoDetailLevel
Global for selective suppression of Info output.
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr ParRunControl() noexcept
Default construct.
void runPar(int &argc, char **&argv)
Initialize UPstream for a parallel run.
static void shutdown(int errNo=0)
Shutdown (finalize) MPI as required.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
static void exit(int errNo=1)
Shutdown (finalize) MPI as required and exit program with errNo.
static bool init(int &argc, char **&argv, const bool needsThread)
Initialisation function called from main.
OSstream & stream(OSstream *alternative=nullptr, int communicator=-1)
Return OSstream for output operations.
bool threads() const noexcept
True if MPI threads are desired (default: false)
void incrDryRun(int i=1) noexcept
Increase the dry-run level.
int dryRun() const noexcept
Return the dry-run level (default: 0)
bool distributed() const noexcept
True if a parallel run and uses distributed roots.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void incrVerbose(int i=1) noexcept
Increase the verbosity level.
bool parRun() const noexcept
True if this is (or will be) a parallel run.