From 51dabf36f2885d5d5c734ea3eea3d3ee97a13e8c Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Fri, 16 Dec 2016 11:30:04 +0100 Subject: [PATCH] Only log messages about failed timesteps on one processes. This OPM_THROW was introduced lately and results in all processes logging the failure. With this commit the message is logged only once. --- opm/autodiff/NonlinearSolver_impl.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/opm/autodiff/NonlinearSolver_impl.hpp b/opm/autodiff/NonlinearSolver_impl.hpp index 3d92a8aac..4cdc3cfdf 100644 --- a/opm/autodiff/NonlinearSolver_impl.hpp +++ b/opm/autodiff/NonlinearSolver_impl.hpp @@ -150,7 +150,13 @@ namespace Opm } while ( (!converged && (iteration <= maxIter())) || (iteration < minIter())); if (!converged) { - OPM_THROW(Opm::NumericalProblem, "Failed to complete a time step within "+std::to_string(maxIter())+" iterations."); + if (model_->terminalOutputEnabled()) { + OPM_THROW(Opm::NumericalProblem, "Failed to complete a time step within "+std::to_string(maxIter())+" iterations."); + } + else + { + OPM_THROW_NOLOG(Opm::NumericalProblem, "Failed to complete a time step within "+std::to_string(maxIter())+" iterations."); + } } // Do model-specific post-step actions.