41namespace functionObjects
93 auto statsEqOp = [](statDataTimes& xStats,
const statDataTimes& yStats)
97 statData&
x = xStats[i];
98 const statData&
y = yStats[i];
101 if (
x[0].first() >
y[0].first())
105 if (
x[1].first() <
y[1].first())
109 x[2].first() +=
y[2].first();
116 const double masterTime =
129 const double allTime =
147 const statData& reduceStats = times[0];
148 const statData& allToAllStats = times[1];
156 <<
indent <<
"reduce : avg = " << reduceAvg <<
's' <<
nl
157 <<
indent <<
" min = " << reduceStats[0].first()
158 <<
"s (processor " << reduceStats[0].second() <<
')' <<
nl
159 <<
indent <<
" max = " << reduceStats[1].first()
160 <<
"s (processor " << reduceStats[1].second() <<
')' <<
nl
162 <<
indent <<
"all-all : avg = " << allToAllAvg <<
's' <<
nl
163 <<
indent <<
" min = " << allToAllStats[0].first()
164 <<
"s (processor " << allToAllStats[0].second() <<
')' <<
nl
165 <<
indent <<
" max = " << allToAllStats[1].first()
166 <<
"s (processor " << allToAllStats[1].second() <<
')'
Inter-processor communication reduction functions.
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D vector of objects of type <T> with a fixed length <N>.
label nProcs() const noexcept
Number of ranks associated with PstreamBuffers.
static void combineGather(const List< commsStruct > &comms, T &value, const CombineOp &cop, const int tag, const label comm)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
Simple (simplistic) mpi-profiling.
virtual ~parProfiling()
Destructor.
virtual bool execute()
Report.
void report()
Report the current profiling information.
virtual bool write()
Do nothing.
virtual bool end()
Report.
int myProcNo() const noexcept
Return processor number.
static void resume()
Resume use of timer (if previously active)
static void enable()
Create timer for measuring communication, or reset existing.
static bool active()
Timer is active.
static void disable()
Remove timer for measuring communication activity.
static void suspend()
Suspend use of timer (if active)
static timingList & times()
Access to the timing information.
splitCell * master() const
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.