Loading...
Searching...
No Matches
profilingPstream Class Reference

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::nCategoriestimingList
 Fixed-size container for timing values.
typedef FixedList< uint64_t, timingType::nCategoriescountList
 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 timingListtimes () noexcept
 Access to the timing information.
static countListcounts () 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!

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

Fixed-size container for timing values.

Definition at line 75 of file profilingPstream.H.

◆ 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()

bool active ( )
inlinestaticnoexcept

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

Definition at line 117 of file profilingPstream.H.

References Foam::noexcept.

◆ enable()

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

Here is the caller graph for this function:

◆ disable()

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

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.

Referenced by parProfilingSolver::parProfilingSolver().

Here is the caller graph for this function:

◆ suspend()

bool suspend ( )
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().

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

◆ resume()

void resume ( )
inlinestaticnoexcept

Resume use of timer (if previously active).

Definition at line 148 of file profilingPstream.H.

References Foam::noexcept.

Referenced by report().

Here is the caller graph for this function:

◆ times() [1/2]

timingList & times ( )
inlinestaticnoexcept

Access to the timing information.

Definition at line 159 of file profilingPstream.H.

References Foam::noexcept.

◆ counts() [1/2]

countList & counts ( )
inlinestaticnoexcept

Access to the timing counts.

Definition at line 164 of file profilingPstream.H.

References Foam::noexcept.

◆ times() [2/2]

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]

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()

void beginTiming ( )
inlinestatic

Update timer prior to measurement.

Definition at line 190 of file profilingPstream.H.

◆ addTime()

void addTime ( const timingType idx)
inlinestatic

Add time increment.

Definition at line 201 of file profilingPstream.H.

Referenced by addAllToAllTime(), addBroadcastTime(), addGatherTime(), addOtherTime(), addProbeTime(), addReduceTime(), addRequestTime(), addScatterTime(), and addWaitTime().

Here is the caller graph for this function:

◆ addBroadcastTime()

void addBroadcastTime ( )
inlinestatic

Add time increment to broadcast time.

Definition at line 213 of file profilingPstream.H.

References addTime(), and BROADCAST.

Here is the call graph for this function:

◆ addReduceTime()

void addReduceTime ( )
inlinestatic

Add time increment to reduce time.

Definition at line 221 of file profilingPstream.H.

References addTime(), and REDUCE.

Here is the call graph for this function:

◆ addProbeTime()

void addProbeTime ( )
inlinestatic

Add time increment to probe time.

Definition at line 229 of file profilingPstream.H.

References addTime(), and PROBE.

Here is the call graph for this function:

◆ addRequestTime()

void addRequestTime ( )
inlinestatic

Add time increment to request time.

Definition at line 237 of file profilingPstream.H.

References addTime(), and REQUEST.

Here is the call graph for this function:

◆ addWaitTime()

void addWaitTime ( )
inlinestatic

Add time increment to wait time.

Definition at line 245 of file profilingPstream.H.

References addTime(), and WAIT.

Here is the call graph for this function:

◆ addGatherTime()

void addGatherTime ( )
inlinestatic

Add time increment to gather time.

Definition at line 253 of file profilingPstream.H.

References addTime(), and GATHER.

Here is the call graph for this function:

◆ addScatterTime()

void addScatterTime ( )
inlinestatic

Add time increment to scatter time.

Definition at line 261 of file profilingPstream.H.

References addTime(), and SCATTER.

Here is the call graph for this function:

◆ addAllToAllTime()

void addAllToAllTime ( )
inlinestatic

Add time increment to allToAll time.

Definition at line 269 of file profilingPstream.H.

References addTime(), and ALL_TO_ALL.

Here is the call graph for this function:

◆ addOtherTime()

void addOtherTime ( )
inlinestatic

Add time increment to other time.

Definition at line 277 of file profilingPstream.H.

References addTime(), and OTHER.

Here is the call graph for this function:

◆ report()

void report ( const int reportLevel = 0)
static

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