Timers and values for simple (simplistic) mpi-profiling. The entire class behaves as a singleton. More...
Public Types | |
enum | timingType : unsigned { ALL_TO_ALL = 0, BROADCAST, PROBE, REDUCE, GATHER, SCATTER, REQUEST, WAIT, OTHER, nCategories } |
The enumerated timing categories (for times and counts arrays) More... | |
typedef FixedList< double, timingType::nCategories > | timingList |
Fixed-size container for timing values. More... | |
typedef FixedList< uint64_t, timingType::nCategories > | countList |
Fixed-size container for timing counts. More... | |
Static Public Member Functions | |
static bool | active () noexcept |
True if timer is active (ie, enabled and not suspended) More... | |
static void | enable () |
Create timer for measuring communication or un-suspend existing. More... | |
static void | disable () noexcept |
Remove timer for measuring communication activity. Does not affect times/counts. More... | |
static void | reset () |
Reset times/counts. Does not affect the timer itself. More... | |
static bool | suspend () noexcept |
Suspend use of timer. Return old status. More... | |
static void | resume () noexcept |
Resume use of timer (if previously active) More... | |
static timingList & | times () noexcept |
Access to the timing information. More... | |
static countList & | counts () noexcept |
Access to the timing counts. More... | |
static double | times (const timingType idx) |
Access to the timing information for given timing category. More... | |
static uint64_t | counts (const timingType idx) |
Access to the count for given timing category. More... | |
static double | elapsedTime () |
The total of times. More... | |
static void | beginTiming () |
Update timer prior to measurement. More... | |
static void | addTime (const timingType idx) |
Add time increment. More... | |
static void | addBroadcastTime () |
Add time increment to broadcast time. More... | |
static void | addReduceTime () |
Add time increment to reduce time. More... | |
static void | addProbeTime () |
Add time increment to probe time. More... | |
static void | addRequestTime () |
Add time increment to request time. More... | |
static void | addWaitTime () |
Add time increment to wait time. More... | |
static void | addGatherTime () |
Add time increment to gather time. More... | |
static void | addScatterTime () |
Add time increment to scatter time. More... | |
static void | addAllToAllTime () |
Add time increment to allToAll time. More... | |
static void | addOtherTime () |
Add time increment to other time. More... | |
static void | report (const int reportLevel=0) |
Report current information. Uses parallel communication! More... | |
Timers and values for simple (simplistic) mpi-profiling. The entire class behaves as a singleton.
Definition at line 49 of file profilingPstream.H.
typedef FixedList<double, timingType::nCategories> timingList |
Fixed-size container for timing values.
Definition at line 75 of file profilingPstream.H.
Fixed-size container for timing counts.
Definition at line 80 of file profilingPstream.H.
enum timingType : unsigned |
The enumerated timing categories (for times and counts arrays)
Enumerator | |
---|---|
ALL_TO_ALL | |
BROADCAST | |
PROBE | |
REDUCE | |
GATHER | |
SCATTER | |
REQUEST | |
WAIT | |
OTHER | |
nCategories |
Definition at line 58 of file profilingPstream.H.
|
inlinestaticnoexcept |
True if timer is active (ie, enabled and not suspended)
Definition at line 117 of file profilingPstream.H.
|
static |
Create timer for measuring communication or un-suspend existing.
Definition at line 38 of file profilingPstream.C.
|
staticnoexcept |
Remove timer for measuring communication activity. Does not affect times/counts.
Definition at line 50 of file profilingPstream.C.
Referenced by parProfiling::end(), and parProfiling::~parProfiling().
|
static |
Reset times/counts. Does not affect the timer itself.
Definition at line 57 of file profilingPstream.C.
|
inlinestaticnoexcept |
Suspend use of timer. Return old status.
Definition at line 138 of file profilingPstream.H.
|
inlinestaticnoexcept |
Resume use of timer (if previously active)
Definition at line 148 of file profilingPstream.H.
|
inlinestaticnoexcept |
Access to the timing information.
Definition at line 159 of file profilingPstream.H.
|
inlinestaticnoexcept |
Access to the timing counts.
Definition at line 164 of file profilingPstream.H.
|
inlinestatic |
Access to the timing information for given timing category.
Definition at line 169 of file profilingPstream.H.
|
inlinestatic |
Access to the count for given timing category.
Definition at line 177 of file profilingPstream.H.
|
static |
The total of times.
Definition at line 64 of file profilingPstream.C.
|
inlinestatic |
Update timer prior to measurement.
Definition at line 190 of file profilingPstream.H.
Referenced by UPstream_mpi_receive().
|
inlinestatic |
Add time increment.
Definition at line 201 of file profilingPstream.H.
Referenced by profilingPstream::addAllToAllTime(), profilingPstream::addBroadcastTime(), profilingPstream::addGatherTime(), profilingPstream::addOtherTime(), profilingPstream::addProbeTime(), profilingPstream::addReduceTime(), profilingPstream::addRequestTime(), profilingPstream::addScatterTime(), and profilingPstream::addWaitTime().
|
inlinestatic |
Add time increment to broadcast time.
Definition at line 213 of file profilingPstream.H.
References profilingPstream::addTime().
|
inlinestatic |
Add time increment to reduce time.
Definition at line 221 of file profilingPstream.H.
References profilingPstream::addTime().
|
inlinestatic |
Add time increment to probe time.
Definition at line 229 of file profilingPstream.H.
References profilingPstream::addTime().
|
inlinestatic |
Add time increment to request time.
Definition at line 237 of file profilingPstream.H.
References profilingPstream::addTime().
Referenced by UPstream_mpi_receive().
|
inlinestatic |
Add time increment to wait time.
Definition at line 245 of file profilingPstream.H.
References profilingPstream::addTime().
|
inlinestatic |
Add time increment to gather time.
Definition at line 253 of file profilingPstream.H.
References profilingPstream::addTime().
Referenced by UPstream_mpi_receive().
|
inlinestatic |
Add time increment to scatter time.
Definition at line 261 of file profilingPstream.H.
References profilingPstream::addTime().
|
inlinestatic |
Add time increment to allToAll time.
Definition at line 269 of file profilingPstream.H.
References profilingPstream::addTime().
|
inlinestatic |
Add time increment to other time.
Definition at line 277 of file profilingPstream.H.
References profilingPstream::addTime().
|
static |
Report current information. Uses parallel communication!
Definition at line 191 of file profilingPstream.C.
References UPstream::commWorld(), UList< T >::data_bytes(), Foam::decrIndent(), Foam::extractValues(), Tuple2< T1, T2 >::first(), Foam::incrIndent(), Foam::indent(), Foam::Info, UPstream::master(), UPstream::mpiGather(), Foam::nl, UPstream::nProcs(), os(), UPstream::parRun(), Foam::printTimingDetail(), List< T >::resize(), and Foam::HashTableOps::values().
Referenced by parProfiling::report().