From 84ca3cd9b9fe5452e133ca2fde2bec5eb1dc72dc Mon Sep 17 00:00:00 2001 From: Rohith Nair Date: Mon, 26 Jun 2017 12:21:44 +0200 Subject: [PATCH 1/2] Removes multiple problem logging for linear solver convergence failure --- opm/autodiff/ISTLSolver.hpp | 3 --- opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/opm/autodiff/ISTLSolver.hpp b/opm/autodiff/ISTLSolver.hpp index 567ab2697..af0ff16a4 100644 --- a/opm/autodiff/ISTLSolver.hpp +++ b/opm/autodiff/ISTLSolver.hpp @@ -446,9 +446,6 @@ namespace Opm // Check for failure of linear solver. if (!parameters_.ignoreConvergenceFailure_ && !result.converged) { const std::string msg("Convergence failure for linear solver."); - if (isIORank_) { - OpmLog::problem(msg); - } OPM_THROW_NOLOG(LinearSolverProblem, msg); } } diff --git a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp index 0c3753a0e..78d25641c 100644 --- a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp +++ b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp @@ -370,7 +370,7 @@ namespace Opm { substepTimer.provideTimeStepEstimate( newTimeStep ); if( solver_verbose_ ) { std::string msg; - msg = cause_of_failure + "\n Timestep chopped to " + msg = cause_of_failure + "\nTimestep chopped to " + std::to_string(unit::convert::to( substepTimer.currentStepLength(), unit::day )) + " days\n"; OpmLog::problem(msg); } From 7500d3eb0c24af45e068cfaf4b12a94e45f0fdcd Mon Sep 17 00:00:00 2001 From: Rohith Nair Date: Mon, 26 Jun 2017 12:46:09 +0200 Subject: [PATCH 2/2] edit --- opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp index 78d25641c..63b8ed28c 100644 --- a/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp +++ b/opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp @@ -251,7 +251,7 @@ namespace Opm { } catch (const Opm::LinearSolverProblem& e) { substepReport += solver.failureReport(); - cause_of_failure = "Linear Solver convergence failure"; + cause_of_failure = "Linear solver convergence failure"; detail::logException(e, solver_verbose_); // since linearIterations is < 0 this will restart the solver