|
OOFEM 3.0
|
#include <timer.h>
Public Types | |
| enum | EngngModelTimerType { EMTT_AnalysisTimer , EMTT_SolutionStepTimer , EMTT_NetComputationalStepTimer , EMTT_LoadBalancingTimer , EMTT_DataTransferTimer , EMTT_LastTimer } |
Public Member Functions | |
| EngngModelTimer () | |
| ~EngngModelTimer () | |
Profiling routines. | |
| void | startTimer (EngngModelTimerType t) |
| void | stopTimer (EngngModelTimerType t) |
| void | pauseTimer (EngngModelTimerType t) |
| void | resumeTimer (EngngModelTimerType t) |
| void | initTimer (EngngModelTimerType t) |
Protected Attributes | |
| Timer | timers [EMTT_LastTimer] |
| Array of Timer classes. | |
Reporting routines. | |
| double | getUtime (EngngModelTimerType t) |
| Returns total user time elapsed. | |
| double | getWtime (EngngModelTimerType t) |
| Returns elapsed wall clock time. | |
| const Timer * | getTimer (EngngModelTimerType t) |
| Returns pointer to timer determined by EngngModelTimerType. | |
| void | toString (EngngModelTimerType t, char *buff) |
| Printing & formatting. | |
| static void | convert2HMS (int &nhrs, int &nmin, int &nsec, double tsec) |
| Converts total seconds into hours, mins, and seconds. | |
Timer class, assumed to be an attribute of engineering model, serving stop-watch facility for engineering model. It can handle several timers independently, each corresponding to different solution stage, etc. Each timer is capable to track elapsed wall clock time as well as user time.
Enumeration to distinguish different type of timers.
EMTT_NetComputationalStepTimer timer (and particularly its wall clock time) should measure only computation itself, no communication, therefore it should be measure of workload (in terms of wall clock time) on particular processors. It also typically not include time needed to solve the system of equations, since this has to be done in parallel, so solution takes the same time on all processors and include unwanted synchronization.
| Enumerator | |
|---|---|
| EMTT_AnalysisTimer | |
| EMTT_SolutionStepTimer | |
| EMTT_NetComputationalStepTimer | |
| EMTT_LoadBalancingTimer | |
| EMTT_DataTransferTimer | |
| EMTT_LastTimer | |
|
static |
|
inline |
Returns pointer to timer determined by EngngModelTimerType.
Definition at line 142 of file timer.h.
References timers.
| double oofem::EngngModelTimer::getUtime | ( | EngngModelTimerType | t | ) |
Returns total user time elapsed.
Definition at line 154 of file timer.C.
References timers.
Referenced by oofem::LoadBalancer::printStatistics().
| double oofem::EngngModelTimer::getWtime | ( | EngngModelTimerType | t | ) |
Returns elapsed wall clock time.
Definition at line 159 of file timer.C.
References timers.
Referenced by oofem::LoadBalancer::printStatistics().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void oofem::EngngModelTimer::toString | ( | EngngModelTimerType | t, |
| char * | buff ) |
|
protected |
Array of Timer classes.
Definition at line 120 of file timer.h.
Referenced by getTimer(), getUtime(), getWtime(), initTimer(), pauseTimer(), resumeTimer(), startTimer(), stopTimer(), and toString().