profilingPstream Class Reference

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 timingListtimes () noexcept
 Access to the timing information. More...
 
static countListcounts () 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...
 

Detailed Description

Timers and values for simple (simplistic) mpi-profiling. The entire class behaves as a singleton.

Source files

Definition at line 49 of file profilingPstream.H.

Member Typedef Documentation

◆ timingList

typedef FixedList<double, timingType::nCategories> timingList

Fixed-size container for timing values.

Definition at line 75 of file profilingPstream.H.

◆ countList

typedef FixedList<uint64_t, timingType::nCategories> countList

Fixed-size container for timing counts.

Definition at line 80 of file profilingPstream.H.

Member Enumeration Documentation

◆ timingType

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.

Member Function Documentation

◆ active()

static bool active ( )
inlinestaticnoexcept

True if timer is active (ie, enabled and not suspended)

Definition at line 117 of file profilingPstream.H.

◆ enable()

void enable ( )
static

Create timer for measuring communication or un-suspend existing.

Definition at line 38 of file profilingPstream.C.

◆ disable()

void disable ( )
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().

Here is the caller graph for this function:

◆ reset()

void reset ( )
static

Reset times/counts. Does not affect the timer itself.

Definition at line 57 of file profilingPstream.C.

◆ suspend()

static bool suspend ( )
inlinestaticnoexcept

Suspend use of timer. Return old status.

Definition at line 138 of file profilingPstream.H.

◆ resume()

static void resume ( )
inlinestaticnoexcept

Resume use of timer (if previously active)

Definition at line 148 of file profilingPstream.H.

◆ times() [1/2]

static timingList& times ( )
inlinestaticnoexcept

Access to the timing information.

Definition at line 159 of file profilingPstream.H.

◆ counts() [1/2]

static countList& counts ( )
inlinestaticnoexcept

Access to the timing counts.

Definition at line 164 of file profilingPstream.H.

◆ times() [2/2]

static double times ( const timingType  idx)
inlinestatic

Access to the timing information for given timing category.

Definition at line 169 of file profilingPstream.H.

◆ counts() [2/2]

static uint64_t counts ( const timingType  idx)
inlinestatic

Access to the count for given timing category.

Definition at line 177 of file profilingPstream.H.

◆ elapsedTime()

double elapsedTime ( )
static

The total of times.

Definition at line 64 of file profilingPstream.C.

◆ beginTiming()

static void beginTiming ( )
inlinestatic

Update timer prior to measurement.

Definition at line 190 of file profilingPstream.H.

Referenced by UPstream_mpi_receive().

Here is the caller graph for this function:

◆ addTime()

◆ addBroadcastTime()

static void addBroadcastTime ( )
inlinestatic

Add time increment to broadcast time.

Definition at line 213 of file profilingPstream.H.

References profilingPstream::addTime().

Here is the call graph for this function:

◆ addReduceTime()

static void addReduceTime ( )
inlinestatic

Add time increment to reduce time.

Definition at line 221 of file profilingPstream.H.

References profilingPstream::addTime().

Here is the call graph for this function:

◆ addProbeTime()

static void addProbeTime ( )
inlinestatic

Add time increment to probe time.

Definition at line 229 of file profilingPstream.H.

References profilingPstream::addTime().

Here is the call graph for this function:

◆ addRequestTime()

static void addRequestTime ( )
inlinestatic

Add time increment to request time.

Definition at line 237 of file profilingPstream.H.

References profilingPstream::addTime().

Referenced by UPstream_mpi_receive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addWaitTime()

static void addWaitTime ( )
inlinestatic

Add time increment to wait time.

Definition at line 245 of file profilingPstream.H.

References profilingPstream::addTime().

Here is the call graph for this function:

◆ addGatherTime()

static void addGatherTime ( )
inlinestatic

Add time increment to gather time.

Definition at line 253 of file profilingPstream.H.

References profilingPstream::addTime().

Referenced by UPstream_mpi_receive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addScatterTime()

static void addScatterTime ( )
inlinestatic

Add time increment to scatter time.

Definition at line 261 of file profilingPstream.H.

References profilingPstream::addTime().

Here is the call graph for this function:

◆ addAllToAllTime()

static void addAllToAllTime ( )
inlinestatic

Add time increment to allToAll time.

Definition at line 269 of file profilingPstream.H.

References profilingPstream::addTime().

Here is the call graph for this function:

◆ addOtherTime()

static void addOtherTime ( )
inlinestatic

Add time increment to other time.

Definition at line 277 of file profilingPstream.H.

References profilingPstream::addTime().

Here is the call graph for this function:

◆ report()

void report ( const int  reportLevel = 0)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: