|
| Timer () |
| Default constructor.
|
|
void | Start (unsigned long startpos=0) |
| Start the stop-watch.
|
|
void | Stop (unsigned long endpos=0) |
| Stop the stop-watch.
|
|
void | Reset () |
| Reset the stop-watch.
|
|
double | Measurement () |
| Interval since the start or the last reset in seconds.
|
|
void | PrintInterval () |
| Print interval between start and stop in hours, minutes, seconds etc.
|
|
void | space_axis_name (std::string nam) |
| A name for what is changing with time.
|
|
void | set_new_goal (unsigned long newgoal) |
| Set a new target to be reached.
|
|
void | set_current_progress (unsigned long progr) |
| Tell the timer how much progress has been made.
|
|
void | have_endless_time () |
| Tell the timer that we have infinite time for the task.
|
|
void | allocate_time (double dur) |
| Tell the timer how much time is available for the task.
|
|
void | flush_timing_data (const char *timefile) |
| Write data about how much time was spent in different stages of the task.
|
|
void | n_progress_reports (int ntpt) |
| Set how often the timer should talk about the progress made, time left etc.
|
|
void | record (unsigned long progr) |
| Record progress at intervals of progress.
|
|
void | forecast () |
| Calculate how much more time is needed for the job etc.
|
|
recommendation_type | recommendation () |
| Ask the timer, if the application should continue or stop.
|
|
bool | goal_reached () |
| Has the goal been reached ?
|
|
void | abandon () |
| Tell the timer that we are not going any further.
|
|
Meaningful simulations of interesting protein systems take a long time. Even with the simplified force field and optimized code of ProFASi, a run might require weeks of computing time. But on large computing facilities, there are limits to how long a single job can run, let's say 12 hours.
ProFASi's simulation programs, such as ParTempRun or SimTempRun make use of this timer class to cleanly suspend an on going run when the allocated time is about to finish. The runs are started with a certain amount of "available time", passed to the programs through the settings file or the command line arguments. The timer measures how fast the program is going about its task. It estimates how far it can go in the available time. If it estimates that it will not come back to the next "check point" (configuration save) before the allocated time is up and the run is killed by the system, it recommends that the simulation program "suspends".