mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: parProfiling: do not print on exit. Fixes #1298.
This commit is contained in:
@ -183,28 +183,19 @@ void Foam::functionObjects::parProfiling::report()
|
||||
const statData& allToAllStats = times[1];
|
||||
|
||||
scalar reduceAvg = reduceStats[2].second()/Pstream::nProcs();
|
||||
scalar reduceRelMin =
|
||||
(reduceStats[0].second()-reduceAvg)/(reduceAvg + VSMALL);
|
||||
scalar reduceRelMax =
|
||||
(reduceStats[1].second()-reduceAvg)/(reduceAvg + VSMALL);
|
||||
|
||||
scalar allToAllAvg = allToAllStats[2].second()/Pstream::nProcs();
|
||||
scalar allToAllRelMin =
|
||||
(allToAllStats[0].second()-allToAllAvg)/(allToAllAvg + VSMALL);
|
||||
scalar allToAllRelMax =
|
||||
(allToAllStats[1].second()-allToAllAvg)/(allToAllAvg + VSMALL);
|
||||
|
||||
Info<< type() << ':' << nl
|
||||
<< "\treduce : avg = " << reduceAvg << 's' << nl
|
||||
<< "\t min = " << reduceRelMin*100
|
||||
<< "% (processor " << reduceStats[0].first() << ')' << nl
|
||||
<< "\t max = +" << reduceRelMax*100
|
||||
<< "% (processor " << reduceStats[1].first() << ')' << nl
|
||||
<< "\t min = " << reduceStats[0].second()
|
||||
<< "s (processor " << reduceStats[0].first() << ')' << nl
|
||||
<< "\t max = " << reduceStats[1].second()
|
||||
<< "s (processor " << reduceStats[1].first() << ')' << nl
|
||||
<< "\tall-all : avg = " << allToAllAvg << 's' << nl
|
||||
<< "\t min = " << allToAllRelMin*100
|
||||
<< "% (processor " << allToAllStats[0].first() << ')' << nl
|
||||
<< "\t max = +" << allToAllRelMax*100
|
||||
<< "% (processor " << allToAllStats[1].first() << ')' << endl;
|
||||
<< "\t min = " << allToAllStats[0].second()
|
||||
<< "s (processor " << allToAllStats[0].first() << ')' << nl
|
||||
<< "\t max = " << allToAllStats[1].second()
|
||||
<< "s (processor " << allToAllStats[1].first() << ')' << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,7 +215,6 @@ bool Foam::functionObjects::parProfiling::write()
|
||||
|
||||
bool Foam::functionObjects::parProfiling::end()
|
||||
{
|
||||
report();
|
||||
profilingPstream::disable();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -30,6 +30,20 @@ Group
|
||||
Description
|
||||
Simple (simplistic) mpi-profiling.
|
||||
|
||||
Usage
|
||||
Example of function object specification:
|
||||
\verbatim
|
||||
profiling
|
||||
{
|
||||
type parProfiling;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
|
||||
// Report stats on exit only (instead of every time step)
|
||||
executeControl onEnd;
|
||||
writeControl none;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
parProfiling.C
|
||||
|
||||
|
||||
@ -12,8 +12,9 @@ profiling
|
||||
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
|
||||
executeControl none;
|
||||
writeControl writeTime;
|
||||
// Report stats on exit only (instead of every time step)
|
||||
executeControl onEnd;
|
||||
writeControl none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user