Report after the timestep really is completed

If we report before we increment the timer, then we will report at
a time which is at the beginning and not at the end of the timestep.
This commit is contained in:
Roland Kaufmann 2013-11-27 00:04:45 +01:00
parent e1823dc9a7
commit 29afd2c378

View File

@ -452,7 +452,7 @@ namespace Opm
std::string filename = output_dir_ + "/step_timing.param";
tstep_os.open(filename.c_str(), std::fstream::out | std::fstream::app);
}
for (; !timer.done(); ++timer) {
while (!timer.done()) {
// Report timestep and (optionally) write state to disk.
step_timer.start();
timer.report(*log_);
@ -605,6 +605,10 @@ namespace Opm
sreport.reportParam(tstep_os);
}
// advance the timer to the end of the timestep *before* notifying
// the client that the timestep is done
++timer;
// notify all clients that we are done with the timestep
callback_timer.start ();
timestep_completed_.signal ();