Go to the documentation of this file.
41 namespace functionObjects
76 if (
x[0].second() >
y[0].second())
78 x[0].second() =
y[0].second();
79 x[0].first() =
y[0].first();
81 if (
x[1].second() <
y[1].second())
83 x[1].second() =
y[1].second();
84 x[1].first() =
y[1].first();
86 x[2].second() +=
y[2].second();
97 Foam::functionObjects::parProfiling::parProfiling
106 profilingPstream::enable();
131 const scalar masterTime =
142 minTime.
second() = masterTime;
146 maxTime.
second() = masterTime;
150 sumTime.
second() = masterTime;
154 const scalar allTime =
164 minTime.
second() = allTime;
168 maxTime.
second() = allTime;
172 sumTime.
second() = allTime;
184 const statData& reduceStats = times[0];
185 const statData& allToAllStats = times[1];
192 <<
indent <<
"reduce : avg = " << reduceAvg <<
's' <<
nl
193 <<
indent <<
" min = " << reduceStats[0].second()
194 <<
"s (processor " << reduceStats[0].
first() <<
')' <<
nl
195 <<
indent <<
" max = " << reduceStats[1].second()
196 <<
"s (processor " << reduceStats[1].
first() <<
')' <<
nl
197 <<
indent <<
"all-all : avg = " << allToAllAvg <<
's' <<
nl
198 <<
indent <<
" min = " << allToAllStats[0].second()
199 <<
"s (processor " << allToAllStats[0].
first() <<
')' <<
nl
200 <<
indent <<
" max = " << allToAllStats[1].second()
201 <<
"s (processor " << allToAllStats[1].
first() <<
')'
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
void report()
Report the current profiling information.
static void suspend()
Suspend use of timer (if active)
static bool master(const label communicator=worldComm)
Am I the master process.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool execute()
Report.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Abstract base-class for Time/database function objects.
#define forAll(list, i)
Loop across all elements in list.
T & first() noexcept
The first element of the list, position [0].
static bool active()
Timer is active.
virtual bool end()
Report.
messageStream Info
Information stream (stdout output on master, null elsewhere)
static void resume()
Resume use of timer (if previously active)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
static timingList & times()
Access to the timing information.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
static void combineGather(const List< commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)
Ostream & indent(Ostream &os)
Indent stream.
Inter-processor communication reduction functions.
virtual bool write()
Do nothing.
static void disable()
Remove timer for measuring communication activity.
Reduction class. If x and y are not equal assign value.
static int myProcNo(const label communicator=worldComm)
Number of this process (starting from masterNo() = 0)
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
A 1D vector of objects of type <T> with a fixed length <N>.
defineTypeNameAndDebug(ObukhovLength, 0)
const T2 & second() const noexcept
Return second.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
FixedList< Tuple2< label, scalar >, 3 > statData
virtual ~parProfiling()
Destructor.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
const T1 & first() const noexcept
Return first.
static label nProcs(const label communicator=worldComm)
Number of processes in parallel run, and 1 for serial run.