Fix (debug log) output of time taken per report step.

First, the stepReport variable was not used with adaptive timestepping.
Second, even when properly updating stepReport, solver_time is still 0.
It just happens that lots of other timing variables are updated, but not
solver_time (nor total_time, pressure_time and transport_time). Simplest
way to handle is to just report the solver_timer seconds (which are still added
to the "full sim report"'s solver_time).
This commit is contained in:
Atgeirr Flø Rasmussen 2017-04-06 21:08:21 +02:00
parent 98debed741
commit 6f9fcdf7a5

View File

@ -324,8 +324,9 @@ public:
events.hasEvent(ScheduleEvents::PRODUCTION_UPDATE, timer.currentStepNum()) ||
events.hasEvent(ScheduleEvents::INJECTION_UPDATE, timer.currentStepNum()) ||
events.hasEvent(ScheduleEvents::WELL_STATUS_CHANGE, timer.currentStepNum());
report += adaptiveTimeStepping->step( timer, *solver, state, well_state, event, output_writer_,
output_writer_.requireFIPNUM() ? &fipnum : nullptr );
stepReport = adaptiveTimeStepping->step( timer, *solver, state, well_state, event, output_writer_,
output_writer_.requireFIPNUM() ? &fipnum : nullptr );
report += stepReport;
}
else {
// solve for complete report step
@ -384,7 +385,7 @@ public:
std::string msg;
msg =
"Time step took " + std::to_string(stepReport.solver_time) + " seconds; "
"Time step took " + std::to_string(solver_timer.secsSinceStart()) + " seconds; "
"total solver time " + std::to_string(report.solver_time) + " seconds.";
OpmLog::note(msg);
}