#include <dlbtimer.h>
Definition at line 32 of file dlbtimer.h.
◆ DlbTimer()
maia::dlbTimer::DlbTimer::DlbTimer |
( |
const MInt |
timerId | ) |
|
|
inline |
Definition at line 54 of file dlbtimer.h.
const MInt m_dlbTimerId
Unique DLB timer id among all DLB timers.
◆ disableDlbTimers()
void maia::dlbTimer::DlbTimer::disableDlbTimers |
( |
| ) |
|
|
inline |
Definition at line 71 of file dlbtimer.h.
71 {
73 TERMM(1, "Error: load balancing timers not enabled.");
74 }
76 }
MBool m_dlbTimersEnabled
Stores if the timers are enabled.
◆ dlbTimersEnabled()
MBool maia::dlbTimer::DlbTimer::dlbTimersEnabled |
( |
| ) |
const |
|
inline |
◆ enableDlbTimers()
void maia::dlbTimer::DlbTimer::enableDlbTimers |
( |
| ) |
|
|
inline |
Enable timers for dynamic load balancing, disabled by default since not supported by all solvers/run loops
Definition at line 58 of file dlbtimer.h.
58 {
60 TERMM(1, "Error: load balancing timers already enabled.");
61 }
63
64
66 i = false;
67 }
68 }
MBool m_timerRunning[2]
Status of the timers.
◆ isLoadTimerRunning()
MBool maia::dlbTimer::DlbTimer::isLoadTimerRunning |
( |
| ) |
const |
|
inline |
Definition at line 88 of file dlbtimer.h.
const MInt m_loadTimerId
Timer indices.
◆ noTimers()
static MInt maia::dlbTimer::DlbTimer::noTimers |
( |
| ) |
|
|
inlinestatic |
Definition at line 156 of file dlbtimer.h.
156 {
157 return 2;
158 }
◆ reEnableDlbTimer()
void maia::dlbTimer::DlbTimer::reEnableDlbTimer |
( |
| ) |
|
|
inline |
Definition at line 78 of file dlbtimer.h.
78 {
80 TERMM(1, "Error: load balancing timers already enabled.");
81 }
83 }
◆ resetIdleRecord()
void maia::dlbTimer::DlbTimer::resetIdleRecord |
( |
| ) |
|
|
inline |
Definition at line 143 of file dlbtimer.h.
void resetSolverTimer(const MInt timerId)
Reset the timer with the given id.
◆ resetLoadRecord()
void maia::dlbTimer::DlbTimer::resetLoadRecord |
( |
| ) |
|
|
inline |
◆ resetSolverTimer()
void maia::dlbTimer::DlbTimer::resetSolverTimer |
( |
const MInt |
timerId | ) |
|
|
inlineprivate |
Definition at line 204 of file dlbtimer.h.
204 {
206 TERMM(1, "error in resetSolverTimer(" + std::to_string(timerId) + "): timer still running, dlbTimerId "
208 } else {
211#ifdef MAIA_DEBUG_DLB_TIMER
212 m_log <<
"DLB timer #" <<
m_dlbTimerId <<
" resetSolverTimer #" << timerId << std::endl;
213#endif
214 }
215 }
MFloat m_recordedWallTime[2]
Recorded time of the timers.
MFloat m_recordedUserTime[2]
◆ returnIdleRecord()
MFloat maia::dlbTimer::DlbTimer::returnIdleRecord |
( |
const MInt |
mode = 0 | ) |
const |
|
inline |
Definition at line 146 of file dlbtimer.h.
146 {
147#ifdef MAIA_DEBUG_DLB_TIMER
151 << " diff " << diff << std::endl;
152#endif
154 }
◆ returnLoadRecord()
MFloat maia::dlbTimer::DlbTimer::returnLoadRecord |
( |
const MInt |
mode = 0 | ) |
const |
|
inline |
Definition at line 113 of file dlbtimer.h.
113 {
114#ifdef MAIA_DEBUG_DLB_TIMER
118 << " diff " << diff << std::endl;
119#endif
121 }
◆ startIdleTimer()
void maia::dlbTimer::DlbTimer::startIdleTimer |
( |
const MString & |
name | ) |
|
|
inline |
Definition at line 124 of file dlbtimer.h.
124 {
126 return;
127 }
129 TERMM(1, name + "; Error: cannot start idle timer while load timer still running.");
130 }
132 }
void startSolverTimer(const MInt timerId, const MString &name)
Start the timer with the given id.
◆ startLoadTimer()
void maia::dlbTimer::DlbTimer::startLoadTimer |
( |
const MString & |
name | ) |
|
|
inline |
Definition at line 91 of file dlbtimer.h.
91 {
93 return;
94 }
96 TERMM(1, name + "; Error: cannot start load timer while idle timer still running.");
97 }
99 }
◆ startSolverTimer()
void maia::dlbTimer::DlbTimer::startSolverTimer |
( |
const MInt |
timerId, |
|
|
const MString & |
name |
|
) |
| |
|
inlineprivate |
Definition at line 164 of file dlbtimer.h.
164 {
166 TERMM(1, name + "; error in startSolverTimer(" + std::to_string(timerId) + "): timer already running, dlbTimerId "
168 } else {
171
173#ifdef MAIA_DEBUG_DLB_TIMER
174 m_log <<
"DLB timer #" <<
m_dlbTimerId <<
" startSolverTimer #" << timerId <<
" at time "
176#endif
177 }
178 }
MFloat m_timerUserTime[2]
MFloat m_timerWallTime[2]
Current time when the timers were started.
MFloat cpuTime()
Return the process cpu time (user time) (high-resolution timer - do not use clock())
◆ stopIdleTimer()
void maia::dlbTimer::DlbTimer::stopIdleTimer |
( |
const MString & |
name | ) |
|
|
inline |
Definition at line 135 of file dlbtimer.h.
135 {
137 return;
138 }
140 }
void stopSolverTimer(const MInt timerId, const MString &name)
Stop the timer with the given id.
◆ stopLoadTimer()
void maia::dlbTimer::DlbTimer::stopLoadTimer |
( |
const MString & |
name | ) |
|
|
inline |
Definition at line 102 of file dlbtimer.h.
102 {
104 return;
105 }
107 }
◆ stopSolverTimer()
void maia::dlbTimer::DlbTimer::stopSolverTimer |
( |
const MInt |
timerId, |
|
|
const MString & |
name |
|
) |
| |
|
inlineprivate |
Definition at line 181 of file dlbtimer.h.
181 {
183 TERMM(1, name + "; error in stopSolverTimer(" + std::to_string(timerId) + "): timer not running, dlbTimerId "
185 } else {
186 const MFloat t_stop = MPI_Wtime();
189
193
195#ifdef MAIA_DEBUG_DLB_TIMER
196 m_log <<
"DLB timer #" <<
m_dlbTimerId <<
" stopSolverTimer #" << timerId <<
" at time "
197 <<
m_timerWallTime[timerId] <<
" with t_diff " << t_diff <<
" user time diff " << t_user_diff <<
" from "
198 << name << std::endl;
199#endif
200 }
201 }
MBool dlbTimersEnabled() const
Return if timers are enabled.
◆ m_dlbTimerId
const MInt maia::dlbTimer::DlbTimer::m_dlbTimerId = -1 |
|
private |
◆ m_dlbTimersEnabled
MBool maia::dlbTimer::DlbTimer::m_dlbTimersEnabled = false |
|
private |
◆ m_idleTimerId
const MInt maia::dlbTimer::DlbTimer::m_idleTimerId = 1 |
|
private |
◆ m_loadTimerId
const MInt maia::dlbTimer::DlbTimer::m_loadTimerId = 0 |
|
private |
◆ m_recordedUserTime
MFloat maia::dlbTimer::DlbTimer::m_recordedUserTime[2] = {0.0, 0.0} |
|
private |
◆ m_recordedWallTime
MFloat maia::dlbTimer::DlbTimer::m_recordedWallTime[2] = {0.0, 0.0} |
|
private |
◆ m_timerRunning
MBool maia::dlbTimer::DlbTimer::m_timerRunning[2] = {false, false} |
|
private |
◆ m_timerUserTime
MFloat maia::dlbTimer::DlbTimer::m_timerUserTime[2] = {0.0, 0.0} |
|
private |
◆ m_timerWallTime
MFloat maia::dlbTimer::DlbTimer::m_timerWallTime[2] = {0.0, 0.0} |
|
private |
The documentation for this class was generated from the following file:
- /home/gitlab-runner/scratch/builds/oxpnswJ6/1/aia/m-AIA/m-AIA/src/UTIL/dlbtimer.h