From 70222af46f2d41d247ce0cda4c327c439b7e6e04 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 5 Sep 2024 17:30:34 -0600 Subject: [PATCH] EAMxx: in the fpe_guard_wrapper for CIME runs, capture all exceptions --- .../eamxx/src/mct_coupling/scream_cxx_f90_interface.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/eamxx/src/mct_coupling/scream_cxx_f90_interface.cpp b/components/eamxx/src/mct_coupling/scream_cxx_f90_interface.cpp index 006bea1bef6..3e1514b3865 100644 --- a/components/eamxx/src/mct_coupling/scream_cxx_f90_interface.cpp +++ b/components/eamxx/src/mct_coupling/scream_cxx_f90_interface.cpp @@ -65,6 +65,14 @@ void fpe_guard_wrapper (const Lambda& f) { auto raw_comm = c.get().mpi_comm(); c.clean_up(); + MPI_Abort (raw_comm,1); + } catch (...) { + + // Get raw comm before cleaning up singleton + auto& c = ScreamContext::singleton(); + auto raw_comm = c.get().mpi_comm(); + c.clean_up(); + MPI_Abort (raw_comm,1); }