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".
This commit is contained in:
Mark Olesen 2017-07-14 16:22:23 +02:00
parent 58cc6b8b82
commit 7380f53efb
2 changed files with 30 additions and 5 deletions

View File

@ -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

View File

@ -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;