40#ifndef Foam_argListRunControl_H
41#define Foam_argListRunControl_H
97 <<
"Finalising parallel run" <<
endl;
112 int dryRun(
int level)
noexcept
126 int verbose(
int level)
noexcept
155 return (parallel_ && distributed_);
161 distributed_ = (parallel_ && on);
177 void runPar(
int& argc,
char**& argv)
183 <<
"Failed to start parallel run" <<
endl;
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
int dryRun() const noexcept
Return the dry-run level (default: 0).
constexpr ParRunControl() noexcept
Default construct.
bool distributed() const noexcept
True if a parallel run and uses distributed roots.
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.
int dryRun(int level) noexcept
Change dry-run level, returns old value.
int verbose() const noexcept
Return the verbosity level (default: 0).
int verbose(int level) noexcept
Change verbosity level, returns old value.
void distributed(bool on) noexcept
Set use of distributed roots, but only if actually parallel.
void threads(bool on) noexcept
Set preference for use of MPI threads.
~ParRunControl()
Destructor. Shutdown (finalize) MPI as required.
void runPar(int &argc, char **&argv)
Initialize UPstream for a parallel run.
bool threads() const noexcept
True if MPI threads are desired (default: false).
void incrVerbose(int i=1) noexcept
Increase the verbosity level.
void incrDryRun(int i=1) noexcept
Increase the dry-run level.
static bool init(int &argc, char **&argv, const bool needsThread)
Initialisation function called from main.
static void shutdown(int errNo=0)
Shutdown (finalize) MPI as required.
static void exit(int errNo=1)
Shutdown (finalize) MPI as required and exit program with errNo.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
int infoDetailLevel
Global for selective suppression of Info output.
messageStream InfoErr
Information stream (stderr output on master, null elsewhere).