From b166b53fed069956e3ba5a067b5bdfd27b906b0b Mon Sep 17 00:00:00 2001 From: Lukas Weber Date: Wed, 21 Aug 2019 13:09:52 +0200 Subject: [PATCH] fix need restart for thermalization only stuff --- python/loadleveller/jobstatus.py | 2 +- src/runner_pt.cpp | 2 +- src/runner_pt.h | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/python/loadleveller/jobstatus.py b/python/loadleveller/jobstatus.py index bfbea0e..7391bd0 100644 --- a/python/loadleveller/jobstatus.py +++ b/python/loadleveller/jobstatus.py @@ -41,7 +41,7 @@ class JobProgress: tp.sweeps += max(0,sweeps - tp.target_therm) - if tp.sweeps < tp.target_sweeps: + if tp.therm_sweeps < tp.target_therm or tp.sweeps < tp.target_sweeps: self.restart = True self.progress.append(tp) diff --git a/src/runner_pt.cpp b/src/runner_pt.cpp index e4502b7..215b806 100644 --- a/src/runner_pt.cpp +++ b/src/runner_pt.cpp @@ -516,6 +516,7 @@ void runner_pt_master::react() { pt_param_optimization(chain, chain_run); } + std::fill(chain_run.weight_ratios.begin(), chain_run.weight_ratios.end(), -1); for(int target = 0; target < chain_len_; target++) { int target_rank = rank_section * chain_len_ + target + 1; int pos = chain_run.rank_to_pos[target]; @@ -545,7 +546,6 @@ void runner_pt_master::react() { } pt_global_update(chain, chain_run); - std::fill(chain_run.weight_ratios.begin(), chain_run.weight_ratios.end(), -1); for(int target = 0; target < chain_len_; target++) { int new_task_id = chain.task_ids[chain_run.rank_to_pos[target]]; diff --git a/src/runner_pt.h b/src/runner_pt.h index 658aaca..67fb3bf 100644 --- a/src/runner_pt.h +++ b/src/runner_pt.h @@ -28,7 +28,6 @@ struct pt_chain { void checkpoint_write(const iodump::group &g); void clear_histograms(); - int histogram_entries(); std::tuple optimize_params(); }; -- GitLab