mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
e1823dc9a7
commit
29afd2c378
@ -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 ();
|
||||
|
Loading…
Reference in New Issue
Block a user