Commit 9e88a8a2 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: enable profiling output for postProcess and -postProcess (closes #526)

- added an explicit print, but only report profiling to the log
  file from master process.

  We don't wish to overwrite any profiling that was conducted during
  the simulation. Besides which, we don't have a proper Time object
  for handling the write nicely either.
parent 9161c228
......@@ -32,6 +32,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "profiling.H"
#include "timeSelector.H"
#include "ReadFields.H"
#include "volFields.H"
......@@ -132,6 +133,7 @@ void executeFunctionObjects
int main(int argc, char *argv[])
{
Foam::timeSelector::addOptions();
#include "addProfilingOption.H"
#include "addRegionOption.H"
#include "addFunctionObjectOptions.H"
......@@ -202,6 +204,9 @@ int main(int argc, char *argv[])
functionsPtr(),
timei == timeDirs.size()-1
);
// Report to output (avoid overwriting values from simulation)
profiling::print(Info);
}
catch (IOerror& err)
{
......
......@@ -4931,7 +4931,7 @@ _of_postProcess()
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
local opts="-constant -latestTime -list -newTimes -noFunctionObjects -noZero -parallel -srcDoc -doc -help "
local opts="-constant -latestTime -list -newTimes -noFunctionObjects -noZero -parallel -profiling -srcDoc -doc -help "
local optsWithArgs="-case -decomposeParDict -dict -field -fields -func -funcs -region -roots -time "
case ${prev} in
......
......@@ -143,6 +143,9 @@ if (argList::postProcess(argc, argv))
{
functionsPtr->end();
}
// Report to output (avoid overwriting values from simulation)
profiling::print(Info);
}
catch (IOerror& err)
{
......
Supports Markdown
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