mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support default profiling settings from etc/controlDict (issue #441)
- patch from Bernhard Gschaider
This commit is contained in:
@ -78,6 +78,15 @@ OptimisationSwitches
|
||||
stopAtWriteNowSignal -1;
|
||||
}
|
||||
|
||||
/* Can specify fallback profiling settings
|
||||
profiling
|
||||
{
|
||||
active true;
|
||||
cpuInfo true;
|
||||
memInfo false;
|
||||
sysInfo true;
|
||||
}
|
||||
*/
|
||||
|
||||
DebugSwitches
|
||||
{
|
||||
|
||||
@ -324,6 +324,11 @@ void Foam::Time::setControls()
|
||||
void Foam::Time::setMonitoring(const bool forceProfiling)
|
||||
{
|
||||
const dictionary* profilingDict = controlDict_.subDictPtr("profiling");
|
||||
if (!profilingDict)
|
||||
{
|
||||
// ... or from etc/controlDict
|
||||
profilingDict = debug::controlDict().subDictPtr("profiling");
|
||||
}
|
||||
|
||||
// initialize profiling on request
|
||||
// otherwise rely on profiling entry within controlDict
|
||||
|
||||
Reference in New Issue
Block a user