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); }