fixed: display exception message no matter which rank it occurred on

This commit is contained in:
Arne Morten Kvarving 2024-02-07 13:47:31 +01:00
parent 3ae685d47c
commit d4e311f9e0

View File

@ -114,6 +114,10 @@ inline void logAndCheckForExceptionsAndThrow(Opm::DeferredLogger& deferred_logge
const bool terminal_output,
Opm::Parallel::Communication comm)
{
// add exception message to logger in order to display message from all ranks
if (exc_type != Opm::ExceptionType::NONE && comm.size() > 1) {
deferred_logger.error("[Exception on rank " + std::to_string(comm.rank()) + "]: " + message);
}
Opm::DeferredLogger global_deferredLogger = gatherDeferredLogger(deferred_logger, comm);
if (terminal_output) {