OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Timer class, assumed to be an attribute of engineering model, serving stop-watch facility for engineering model. More...
#include <timer.h>
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 Timer * | getTimer (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... | |
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 |
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().
|
inline |
double oofem::EngngModelTimer::getUtime | ( | EngngModelTimer::EngngModelTimerType | t | ) |
Returns total user time elapsed.
Definition at line 154 of file timer.C.
Referenced by oofem::EngngModel::balanceLoad(), oofem::EngngModel::giveAnalysisTime(), oofem::EngngModel::giveSolutionStepTime(), oofem::LoadBalancer::printStatistics(), and oofem::StaggeredProblem::solveYourself().
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().
|
inline |
Definition at line 132 of file timer.h.
References oofem::Timer::initTimer().
Referenced by oofem::StaggeredProblem::solveYourself(), and oofem::EngngModel::solveYourself().
|
inline |
Definition at line 130 of file timer.h.
References oofem::Timer::pauseTimer().
Referenced by oofem::EngngModel::assemble(), oofem::EngngModel::assembleExtrapolatedForces(), oofem::EngngModel::assemblePrescribedExtrapolatedForces(), oofem::EngngModel::assembleVectorFromBC(), oofem::EngngModel::assembleVectorFromDofManagers(), and oofem::EngngModel::assembleVectorFromElements().
|
inline |
Definition at line 131 of file timer.h.
References oofem::Timer::resumeTimer().
Referenced by oofem::EngngModel::assemble(), oofem::EngngModel::assembleExtrapolatedForces(), oofem::EngngModel::assemblePrescribedExtrapolatedForces(), oofem::EngngModel::assembleVectorFromBC(), oofem::EngngModel::assembleVectorFromDofManagers(), and oofem::EngngModel::assembleVectorFromElements().
|
inline |
Definition at line 128 of file timer.h.
References oofem::Timer::startTimer().
Referenced by oofem::EngngModel::balanceLoad(), oofem::StructuralMaterialEvaluator::solveYourself(), oofem::FluidMaterialEvaluator::solveYourself(), oofem::LinearStability::solveYourself(), oofem::StaggeredProblem::solveYourself(), and oofem::EngngModel::solveYourself().
|
inline |
Definition at line 129 of file timer.h.
References oofem::Timer::stopTimer().
Referenced by oofem::EngngModel::balanceLoad(), oofem::StructuralMaterialEvaluator::solveYourself(), oofem::FluidMaterialEvaluator::solveYourself(), oofem::StaggeredProblem::solveYourself(), oofem::EngngModel::solveYourself(), and oofem::EngngModel::terminateAnalysis().
void oofem::EngngModelTimer::toString | ( | EngngModelTimer::EngngModelTimerType | t, |
char * | buff | ||
) |
|
protected |