Subtract time spend in callbacks from total

Since this is not time spent on the simulation itself, it is "unfair"
that this is accounted on the simulator.
This commit is contained in:
Roland Kaufmann 2013-05-14 11:38:09 +02:00
parent 37906058f5
commit d3db4922b4

View File

@ -419,6 +419,8 @@ namespace Opm
double ptime = 0.0;
Opm::time::StopWatch transport_timer;
double ttime = 0.0;
Opm::time::StopWatch callback_timer;
double time_in_callbacks = 0.0;
Opm::time::StopWatch step_timer;
Opm::time::StopWatch total_timer;
total_timer.start();
@ -597,7 +599,10 @@ namespace Opm
}
// notify all clients that we are done with the timestep
callback_timer.start ();
timestep_completed ();
callback_timer.stop ();
time_in_callbacks += callback_timer.secsSinceStart ();
}
if (output_) {
@ -623,7 +628,7 @@ namespace Opm
SimulatorReport report;
report.pressure_time = ptime;
report.transport_time = ttime;
report.total_time = total_timer.secsSinceStart();
report.total_time = total_timer.secsSinceStart() - time_in_callbacks;
return report;
}