OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::EngngModelTimer Class Reference

Timer class, assumed to be an attribute of engineering model, serving stop-watch facility for engineering model. More...

#include <timer.h>

+ Collaboration diagram for oofem::EngngModelTimer:

Public Types

enum  EngngModelTimerType {
  EMTT_AnalysisTimer, EMTT_SolutionStepTimer, EMTT_NetComputationalStepTimer, EMTT_LoadBalancingTimer,
  EMTT_DataTransferTimer, EMTT_LastTimer
}
 Enumeration to distinguish different type of timers. More...
 

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. More...
 

Reporting routines.

double getUtime (EngngModelTimerType t)
 Returns total user time elapsed. More...
 
double getWtime (EngngModelTimerType t)
 Returns elapsed wall clock time. More...
 
const TimergetTimer (EngngModelTimerType t)
 Returns pointer to timer determined by EngngModelTimerType. More...
 
void toString (EngngModelTimerType t, char *buff)
 Printing & formatting. More...
 
static void convert2HMS (int &nhrs, int &nmin, int &nsec, double tsec)
 Converts total seconds into hours, mins, and seconds. More...
 

Detailed Description

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.

Definition at line 98 of file timer.h.

Member Enumeration Documentation

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 

Definition at line 109 of file timer.h.

Constructor & Destructor Documentation

oofem::EngngModelTimer::EngngModelTimer ( )
inline

Definition at line 123 of file timer.h.

oofem::EngngModelTimer::~EngngModelTimer ( )
inline

Definition at line 124 of file timer.h.

Member Function Documentation

void oofem::EngngModelTimer::convert2HMS ( int &  nhrs,
int &  nmin,
int &  nsec,
double  tsec 
)
static

Converts total seconds into hours, mins, and seconds.

Definition at line 164 of file timer.C.

References oofem::Timer::convert2HMS().

Referenced by oofem::EngngModel::giveAnalysisTime().

const Timer* oofem::EngngModelTimer::getTimer ( EngngModelTimerType  t)
inline

Returns pointer to timer determined by EngngModelTimerType.

Definition at line 142 of file timer.h.

double oofem::EngngModelTimer::getWtime ( EngngModelTimer::EngngModelTimerType  t)

Returns elapsed wall clock time.

Definition at line 159 of file timer.C.

Referenced by oofem::WallClockLoadBalancerMonitor::decide(), oofem::EngngModel::giveAnalysisTime(), and oofem::LoadBalancer::printStatistics().

void oofem::EngngModelTimer::initTimer ( EngngModelTimerType  t)
inline
void oofem::EngngModelTimer::toString ( EngngModelTimer::EngngModelTimerType  t,
char *  buff 
)

Printing & formatting.

Definition at line 169 of file timer.C.

Member Data Documentation

Timer oofem::EngngModelTimer::timers[EMTT_LastTimer]
protected

Array of Timer classes.

Definition at line 120 of file timer.h.


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:35 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011