Commit a4521853 authored by Lukas Weber's avatar Lukas Weber

be more talkative about the safety window

parent 43a1aca7
......@@ -83,6 +83,10 @@ void mc::_write(const std::string &dir) {
rng->checkpoint_write(g.open_group("random_number_generator"));
checkpoint_write(g.open_group("simulation"));
g.write("max_checkpoint_write_time", max_checkpoint_write_time_);
g.write("max_sweep_time", max_sweep_time_);
g.write("max_meas_time", max_meas_time_);
g.write("sweeps", sweep_);
g.write("thermalization_sweeps", std::min(therm_, sweep_)); // only for convenience
}
......@@ -125,6 +129,10 @@ bool mc::_read(const std::string &dir) {
g.read("sweeps", sweep_);
g.read("max_checkpoint_write_time", max_checkpoint_write_time_);
g.read("max_sweep_time", max_sweep_time_);
g.read("max_meas_time", max_meas_time_);
clock_gettime(CLOCK_MONOTONIC_RAW, &tend);
measure.add("_ll_checkpoint_read_time",
(tend.tv_sec - tstart.tv_sec) + 1e-9 * (tend.tv_nsec - tstart.tv_nsec));
......
......@@ -292,8 +292,8 @@ void runner_slave::start() {
std::unique_ptr<mc>{mccreator_(job_.jobfile["tasks"][job_.task_names[task_id_]])};
if(!sys_->_read(job_.rundir(task_id_, run_id_))) {
sys_->_init();
// checkpointing();
job_.log(fmt::format("* initialized {}", job_.rundir(task_id_, run_id_)));
checkpointing();
} else {
job_.log(fmt::format("* read {}", job_.rundir(task_id_, run_id_)));
}
......@@ -320,15 +320,14 @@ void runner_slave::start() {
if(time_is_up()) {
what_is_next(S_TIMEUP);
job_.log(fmt::format("rank {} exits: walltime up (safety interval = {} s)", rank_, sys_->safe_exit_interval()));
break;
}
action = what_is_next(S_BUSY);
}
if(time_is_up()) {
job_.log(fmt::format("rank {} exits: walltime up", rank_));
} else {
if(action == A_EXIT) {
job_.log(fmt::format("rank {} exits: out of work", rank_));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment