![]() |
QMCPACK
|
Collaboration diagram for RunTimeControl< CLOCK >:Public Member Functions | |
| RunTimeControl (RunTimeManager< CLOCK > &rm, int maxCPUSecs, const std::string &stop_file_prefix, bool cleanup=true) | |
| constructor More... | |
| bool | checkStop (LoopTimer< CLOCK > &loop_timer) |
| check if the run needs to stop because of walltime or stop control file. More... | |
| std::string | generateProgressMessage (const std::string &driverName, int block, int num_blocks) const |
| generate terse progress messages More... | |
| std::string | generateStopMessage (const std::string &driverName, int block) const |
| generate stop message explaining why More... | |
| void | runtime_padding (int runtime_padding) |
| void | loop_margin (int loopMargin) |
Private Types | |
| enum | StopStatus { CONTINUE, MAX_SECONDS_PASSED, NOT_ENOUGH_TIME, STOP_FILE } |
Private Member Functions | |
| bool | enough_time_for_next_iteration (LoopTimer< CLOCK > &loop_timer) |
| bool | stop_file_requested () |
Private Attributes | |
| const int | MaxCPUSecs |
| double | m_runtime_safety_padding |
| double | m_loop_margin |
| double | m_loop_time |
| double | m_elapsed |
| double | m_remaining |
| RunTimeManager< CLOCK > & | runtimeManager |
| const std::string | stop_filename_ |
| the prefix of the stop file (stop_file_prefix + ".STOP") More... | |
| enum qmcplusplus::RunTimeControl::StopStatus | stop_status_ |
Definition at line 70 of file RunTimeManager.h.
|
strongprivate |
| Enumerator | |
|---|---|
| CONTINUE | |
| MAX_SECONDS_PASSED | |
| NOT_ENOUGH_TIME | |
| STOP_FILE | |
Definition at line 82 of file RunTimeManager.h.
| RunTimeControl | ( | RunTimeManager< CLOCK > & | rm, |
| int | maxCPUSecs, | ||
| const std::string & | stop_file_prefix, | ||
| bool | cleanup = true |
||
| ) |
constructor
| rm | the RunTimeManager attached to |
| maxCPUSecs | maxmimal allowed seconds from the beginning of the simulation |
| stop_file_prefix | the prefix of the stop file |
| cleanup | if true, clean up stop files left from previous simulations. Rank 0 handle this. |
Definition at line 67 of file RunTimeManager.cpp.
References RunTimeControl< CLOCK >::m_loop_margin, RunTimeControl< CLOCK >::m_runtime_safety_padding, and RunTimeControl< CLOCK >::stop_filename_.
| bool checkStop | ( | LoopTimer< CLOCK > & | loop_timer | ) |
check if the run needs to stop because of walltime or stop control file.
it should be called at the end of each block in a driver.
Definition at line 125 of file RunTimeManager.cpp.
Referenced by qmcplusplus::TEST_CASE().
|
private |
Definition at line 92 of file RunTimeManager.cpp.
References LoopTimer< CLOCK >::get_time_per_iteration().
| std::string generateProgressMessage | ( | const std::string & | driverName, |
| int | block, | ||
| int | num_blocks | ||
| ) | const |
generate terse progress messages
Definition at line 134 of file RunTimeManager.cpp.
References qmcplusplus::log(), and qmcplusplus::hdf::num_blocks.
| std::string generateStopMessage | ( | const std::string & | driverName, |
| int | block | ||
| ) | const |
generate stop message explaining why
Definition at line 150 of file RunTimeManager.cpp.
References qmcplusplus::log().
Referenced by qmcplusplus::TEST_CASE().
|
inline |
Definition at line 114 of file RunTimeManager.h.
|
inline |
Definition at line 113 of file RunTimeManager.h.
References RunTimeControl< CLOCK >::runtime_padding().
Referenced by RunTimeControl< CLOCK >::runtime_padding(), and qmcplusplus::TEST_CASE().
|
private |
Definition at line 113 of file RunTimeManager.cpp.
|
private |
Definition at line 76 of file RunTimeManager.h.
|
private |
Definition at line 74 of file RunTimeManager.h.
Referenced by RunTimeControl< CLOCK >::RunTimeControl().
|
private |
Definition at line 75 of file RunTimeManager.h.
|
private |
Definition at line 77 of file RunTimeManager.h.
|
private |
Definition at line 73 of file RunTimeManager.h.
Referenced by RunTimeControl< CLOCK >::RunTimeControl().
|
private |
Definition at line 72 of file RunTimeManager.h.
|
private |
Definition at line 78 of file RunTimeManager.h.
|
private |
the prefix of the stop file (stop_file_prefix + ".STOP")
Definition at line 80 of file RunTimeManager.h.
Referenced by RunTimeControl< CLOCK >::RunTimeControl().
|
private |