Timers and values for simple (simplistic) mpi-profiling. The entire class behaves as a singleton. More...
#include <profilingPstream.H>
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. | |
| typedef FixedList< uint64_t, timingType::nCategories > | countList |
| Fixed-size container for timing counts. | |
Static Public Member Functions | |
| static bool | active () noexcept |
| True if timer is active (ie, enabled and not suspended). | |
| static void | enable () |
| Create timer for measuring communication or un-suspend existing. | |
| static void | disable () noexcept |
| Remove timer for measuring communication activity. Does not affect times/counts. | |
| static void | reset () |
| Reset times/counts. Does not affect the timer itself. | |
| static bool | suspend () noexcept |
| Suspend use of timer. Return old status. | |
| static void | resume () noexcept |
| Resume use of timer (if previously active). | |
| static timingList & | times () noexcept |
| Access to the timing information. | |
| static countList & | counts () noexcept |
| Access to the timing counts. | |
| static double | times (const timingType idx) |
| Access to the timing information for given timing category. | |
| static uint64_t | counts (const timingType idx) |
| Access to the count for given timing category. | |
| static double | elapsedTime () |
| The total of times. | |
| static void | beginTiming () |
| Update timer prior to measurement. | |
| static void | addTime (const timingType idx) |
| Add time increment. | |
| static void | addBroadcastTime () |
| Add time increment to broadcast time. | |
| static void | addReduceTime () |
| Add time increment to reduce time. | |
| static void | addProbeTime () |
| Add time increment to probe time. | |
| static void | addRequestTime () |
| Add time increment to request time. | |
| static void | addWaitTime () |
| Add time increment to wait time. | |
| static void | addGatherTime () |
| Add time increment to gather time. | |
| static void | addScatterTime () |
| Add time increment to scatter time. | |
| static void | addAllToAllTime () |
| Add time increment to allToAll time. | |
| static void | addOtherTime () |
| Add time increment to other time. | |
| static void | report (const int reportLevel=0) |
| Report current information. Uses parallel communication! | |
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.
| typedef FixedList<uint64_t, timingType::nCategories> countList |
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.
References Foam::noexcept.
|
static |
Create timer for measuring communication or un-suspend existing.
Definition at line 38 of file profilingPstream.C.
Referenced by parProfiling::parProfiling(), and parProfilingSolver::solve().

|
staticnoexcept |
Remove timer for measuring communication activity. Does not affect times/counts.
Definition at line 50 of file profilingPstream.C.
References Foam::noexcept.
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.
Referenced by parProfilingSolver::parProfilingSolver().

|
inlinestaticnoexcept |
Suspend use of timer. Return old status.
Definition at line 138 of file profilingPstream.H.
References Foam::noexcept, and suspend().
Referenced by parProfilingSolver::parProfilingSolver(), report(), parProfilingSolver::solve(), and suspend().


|
inlinestaticnoexcept |
Resume use of timer (if previously active).
Definition at line 148 of file profilingPstream.H.
References Foam::noexcept.
Referenced by report().

|
inlinestaticnoexcept |
Access to the timing information.
Definition at line 159 of file profilingPstream.H.
References Foam::noexcept.
|
inlinestaticnoexcept |
Access to the timing counts.
Definition at line 164 of file profilingPstream.H.
References Foam::noexcept.
|
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.
|
inlinestatic |
Add time increment.
Definition at line 201 of file profilingPstream.H.
Referenced by addAllToAllTime(), addBroadcastTime(), addGatherTime(), addOtherTime(), addProbeTime(), addReduceTime(), addRequestTime(), addScatterTime(), and addWaitTime().

|
inlinestatic |
Add time increment to broadcast time.
Definition at line 213 of file profilingPstream.H.
References addTime(), and BROADCAST.

|
inlinestatic |
Add time increment to reduce time.
Definition at line 221 of file profilingPstream.H.
References addTime(), and REDUCE.

|
inlinestatic |
Add time increment to probe time.
Definition at line 229 of file profilingPstream.H.
References addTime(), and PROBE.

|
inlinestatic |
Add time increment to request time.
Definition at line 237 of file profilingPstream.H.
References addTime(), and REQUEST.

|
inlinestatic |
Add time increment to wait time.
Definition at line 245 of file profilingPstream.H.
References addTime(), and WAIT.

|
inlinestatic |
Add time increment to gather time.
Definition at line 253 of file profilingPstream.H.
References addTime(), and GATHER.

|
inlinestatic |
Add time increment to scatter time.
Definition at line 261 of file profilingPstream.H.
References addTime(), and SCATTER.

|
inlinestatic |
Add time increment to allToAll time.
Definition at line 269 of file profilingPstream.H.
References addTime(), and ALL_TO_ALL.

|
inlinestatic |
Add time increment to other time.
Definition at line 277 of file profilingPstream.H.
References addTime(), and OTHER.

|
static |
Report current information. Uses parallel communication!
Definition at line 191 of file profilingPstream.C.
References ALL_TO_ALL, BROADCAST, UPstream::commWorld(), UList< T >::data(), Foam::decrIndent(), Foam::extractValues(), Tuple2< T1, T2 >::first(), GATHER, Foam::incrIndent(), Foam::indent(), Foam::Info, UPstream::master(), UPstream::mpiGather(), nCategories, Foam::nl, UPstream::nProcs(), os(), UPstream::parRun(), Foam::printTimingDetail(), PROBE, REDUCE, REQUEST, List< T >::resize(), resume(), SCATTER, suspend(), and WAIT.
Referenced by parProfiling::report().

