Aufgrund einer Wartung wird GitLab am 17.08. zwischen 8:30 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 17.08. between 8:30 and 9:00 am.

Commit fcf08d9b authored by Lukas Weber's avatar Lukas Weber

safe sweep counts properly

parent 02a0d3ec
......@@ -86,8 +86,8 @@ void mc::_write(const std::string &dir) {
if(pt_mode_) {
therm *= pt_sweeps_per_global_update_;
}
g.write("thermalization_sweeps", std::min(sweep_,therm_));
g.write("sweeps", std::max(0,sweep_-therm_));
g.write("thermalization_sweeps", std::min(sweep_,therm));
g.write("sweeps", std::max(0,sweep_-therm));
}
rename((dir + ".dump.h5.tmp").c_str(), (dir + ".dump.h5").c_str());
......
......@@ -188,7 +188,7 @@ void runner_pt_master::construct_pt_chains() {
int target_sweeps = task.get<int>("sweeps");
if(chain.target_sweeps >= 0 && target_sweeps != chain.target_sweeps) {
throw std::runtime_error{
fmt::format(pt_sweep_error, chain.id, "target_sweeps", i, chain.target_sweeps, target_sweeps)};
fmt::format(pt_sweep_error, chain.id, i, "target_sweeps", chain.target_sweeps, target_sweeps)};
}
chain.target_sweeps = target_sweeps;
......
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