Commit 21631892 authored by Lukas Weber's avatar Lukas Weber

display max thermsweeps

parent 3c7c752d
...@@ -36,7 +36,7 @@ class JobProgress: ...@@ -36,7 +36,7 @@ class JobProgress:
sweeps_per_global_update = jobfile.tasks[task].get('pt_sweeps_per_global_update',1) sweeps_per_global_update = jobfile.tasks[task].get('pt_sweeps_per_global_update',1)
with h5py.File(runfile, 'r') as f: with h5py.File(runfile, 'r') as f:
tp.sweeps += f['/sweeps'][0]//sweeps_per_global_update tp.sweeps += f['/sweeps'][0]//sweeps_per_global_update
tp.therm_sweeps += f['/thermalization_sweeps'][0]//sweeps_per_global_update tp.therm_sweeps = max(tp.therm_sweeps, f['/thermalization_sweeps'][0]//sweeps_per_global_update)
if tp.sweeps < tp.target_sweeps: if tp.sweeps < tp.target_sweeps:
...@@ -97,8 +97,7 @@ def print_status(jobfile, args): ...@@ -97,8 +97,7 @@ def print_status(jobfile, args):
for task, tp in zip(job_prog.tasks, job_prog.progress): for task, tp in zip(job_prog.tasks, job_prog.progress):
therm_per_run = tp.therm_sweeps/tp.num_runs if tp.num_runs > 0 else 0 print('{t}: {tp.num_runs} runs, {tp.sweeps:8d}/{tp.target_sweeps} sweeps, max {tp.therm_sweeps:8d}/{tp.target_therm} thermalization'.format(t=task,tp=tp))
print('{t}: {tp.num_runs} runs, {tp.sweeps:8d}/{tp.target_sweeps} sweeps, {therm_per_run:8d}/{tp.target_therm} thermalization'.format(t=task,tp=tp,therm_per_run=int(round(therm_per_run))))
except FileNotFoundError as e: except FileNotFoundError as e:
print("Error: jobfile '{}' not found.".format(args.jobfile)) print("Error: jobfile '{}' not found.".format(args.jobfile))
...@@ -34,7 +34,7 @@ class MCArchive: ...@@ -34,7 +34,7 @@ class MCArchive:
o = self.observables[obs] o = self.observables[obs]
o.rebinning_bin_length[i] = int(value.get('rebin_len',0)) o.rebinning_bin_length[i] = int(value.get('rebin_len',0))
o.rebinning_bin_count[i] = int(value.get('rebin_count',0)) o.rebinning_bin_count[i] = int(value.get('rebin_count',0))
o.autocorrelation_time[i] = float(value.get('autocorr_time',0)) o.autocorrelation_time[i] = value.get('autocorr_time',0)
o.mean[i] = np.array(value['mean'], dtype=float) o.mean[i] = np.array(value['mean'], dtype=float)
o.error[i] = np.array(value['error'], dtype=float) o.error[i] = np.array(value['error'], dtype=float)
......
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