40 #ifndef Foam_argListRunControl_H 41 #define Foam_argListRunControl_H 95 Info<<
"Finalising parallel run" <<
endl;
153 return (parallel_ && distributed_);
159 distributed_ = (parallel_ && on);
175 void runPar(
int& argc,
char**& argv)
179 Info<<
"Failed to start parallel run" <<
endl;
Helper class for initializing parallel jobs from the command arguments, storing 'dry-run' state etc...
~ParRunControl()
Destructor. Shutdown (finalize) MPI as required.
int verbose() const noexcept
Return the verbosity level (default: 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void incrVerbose(int level=1) noexcept
Increase the verbosity level.
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.
bool threads() const noexcept
True if MPI threads are desired (default: false)
ParRunControl() noexcept
Default construct.
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)
bool parRun() const noexcept
True if this is (or will be) a parallel run.
void incrDryRun(int level=1) noexcept
Increase the dry-run level.