Skip to content
Snippets Groups Projects
Commit d0898b43 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: add infoSwitch to control reporting of slaves/roots (closes #531)

- With many processors, the number of entries becomes quite large.

  New controlDict InfoSwitches: "writeSlaves", "writeRoots".
parent 611fea2e
Branches
Tags
No related merge requests found
......@@ -35,11 +35,21 @@ Documentation
InfoSwitches
{
// The default ASCII write precision
writePrecision 6;
// Enable job info
writeJobInfo 0;
writeDictionaries 0;
writeOptionalEntries 0;
// Report list of slaves/pids used (parallel)
writeSlaves 1;
// Report list of roots used (parallel)
writeRoots 1;
// Allow profiling
allowProfiling 1;
......@@ -88,10 +98,11 @@ OptimisationSwitches
setNaN 0;
// Force dumping (at next timestep) upon signal (-1 to disable)
writeNowSignal -1; // 10;
// See 'kill -l' for signal numbers (eg, 10=USR1, 12=USR2)
writeNowSignal -1; // 10;
// Force dumping (at next timestep) upon signal (-1 to disable) and exit
stopAtWriteNowSignal -1;
stopAtWriteNowSignal -1;
}
/* Can specify fallback profiling settings
......
......@@ -885,10 +885,9 @@ void Foam::argList::parse
case_ = globalCase_;
}
stringList slaveProcs;
// Collect slave machine/pid
// Collect slave machine/pid, and check that the build is identical
if (parRunControl_.parRun())
{
if (Pstream::master())
......@@ -934,6 +933,18 @@ void Foam::argList::parse
}
}
// Keep or discard slave and root information for reporting:
if (Pstream::master() && parRunControl_.parRun())
{
if (!debug::infoSwitch("writeSlaves", 1))
{
slaveProcs.clear();
}
if (!debug::infoSwitch("writeRoots", 1))
{
roots.clear();
}
}
if (Pstream::master() && bannerEnabled_)
{
......@@ -942,7 +953,10 @@ void Foam::argList::parse
if (parRunControl_.parRun())
{
Info<< "Slaves : " << slaveProcs << nl;
if (slaveProcs.size())
{
Info<< "Slaves : " << slaveProcs << nl;
}
if (roots.size())
{
Info<< "Roots : " << roots << nl;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment