Go to the documentation of this file.
40 #ifndef argListRunControl_H
41 #define argListRunControl_H
78 Info<<
"Finalising parallel run" <<
endl;
87 void runPar(
int& argc,
char**& argv,
bool needsThread)
91 Info<<
"Failed to start parallel run" <<
endl;
99 bool parRun() const noexcept
107 return (parallel_ && distributed_);
113 distributed_ = (parallel_ && on);
120 int dryRun() const noexcept
126 int dryRun(
const int level) noexcept
140 int verbose(
const int level) noexcept
int dryRun(const int level) noexcept
Change 'dry-run', return old value.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
~ParRunControl()
Destructor. Shutdown (finalize) MPI as required.
ParRunControl()
Default construct.
bool parRun() const noexcept
True if this is a parallel run.
Ostream & endl(Ostream &os)
Add newline and flush stream.
messageStream Info
Information stream (stdout output on master, null elsewhere)
int verbose() const noexcept
Non-zero if set as 'verbose'.
bool distributed() const noexcept
True if this is a parallel run and uses distributed roots.
int verbose(const int level) noexcept
Change 'verbose', return old value.
void distributed(bool on) noexcept
Set use of distributed roots, but only if actually parallel.
static void shutdown(int errNo=0)
Shutdown (finalize) MPI as required.
Helper class for initializing parallel jobs from the command arguments, storing 'dry-run' state etc....
void runPar(int &argc, char **&argv, bool needsThread)
Initialize Pstream for a parallel run.
int dryRun() const noexcept
Non-zero if set as 'dry-run'.
static bool init(int &argc, char **&argv, const bool needsThread)
Initialisation function called from main.
static void exit(int errNo=1)
Shutdown (finalize) MPI as required and exit program with errNo.