Commit 1702f55b authored by Lukas Weber's avatar Lukas Weber

make jobstatus work for pt and change parameter file name

parent 77c0d7da
...@@ -32,10 +32,10 @@ class JobFile: ...@@ -32,10 +32,10 @@ class JobFile:
except OSError as e: except OSError as e:
if e.errno != errno.EEXIST: if e.errno != errno.EEXIST:
raise raise
job_input_filename = os.path.join(datadir, 'parameters.yaml') job_input_filename = os.path.join(datadir, 'parameters.yml')
with open(job_input_filename, 'w') as f: with open(job_input_filename, 'w') as f:
f.write(self.raw_jobfile) f.write(self.raw_jobfile)
except Exception as e: except Exception as e:
raise JobFileGenError('Could not write parameters.yaml: {}'.format(e)) raise JobFileGenError('Could not write parameters.yml: {}'.format(e))
return job_input_filename return job_input_filename
...@@ -35,8 +35,10 @@ class JobProgress: ...@@ -35,8 +35,10 @@ class JobProgress:
tp.num_runs += 1 tp.num_runs += 1
with h5py.File(runfile, 'r') as f: with h5py.File(runfile, 'r') as f:
tp.therm_sweeps += f['/thermalization_sweeps'][0] sweeps = f['/sweeps'][0]//jobfile.tasks[task].get('pt_sweeps_per_global_update',1)
tp.sweeps += f['/sweeps'][0]-f['/thermalization_sweeps'][0]
tp.therm_sweeps += min(sweeps,tp.target_therm)
tp.sweeps += sweeps - tp.therm_sweeps
if tp.sweeps < tp.target_sweeps: if tp.sweeps < tp.target_sweeps:
......
...@@ -93,7 +93,6 @@ void mc::_write(const std::string &dir) { ...@@ -93,7 +93,6 @@ void mc::_write(const std::string &dir) {
g.write("max_meas_time", max_meas_time_); g.write("max_meas_time", max_meas_time_);
g.write("sweeps", sweep_); g.write("sweeps", sweep_);
g.write("thermalization_sweeps", std::min(therm_, sweep_)); // only for convenience
} }
rename((dir + ".dump.h5.tmp").c_str(), (dir + ".dump.h5").c_str()); rename((dir + ".dump.h5.tmp").c_str(), (dir + ".dump.h5").c_str());
......
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