https://github.com/GEOS-ESM/GEOSgcm_GridComp/tree/feature/jkolassa_cnclm51 -------------------------------------------------------------------- Science code: CNBalanceCheckMod.F90: ====================== use abortutils , only : endrun call endrun(msg=errMsg(sourcefile, __LINE__)) -------------------------------------------------------------------- abortutils.F90: =============== module abortutils public :: endrun interface endrun module procedure endrun_vanilla module procedure endrun_globalindex end interface CONTAINS subroutine endrun_vanilla(msg, additional_msg) use shr_sys_mod , only: shr_sys_abort call shr_sys_abort(msg) ------------------------------------------------------------------------ shr_sys_mod.F90: ================ MODULE shr_sys_mod use shr_abort_mod, only: shr_sys_abort => shr_abort_abort ! Imported from shr_abort_mod and republished with renames. Other code that wishes to ! use these routines should use these shr_sys names rather than directly using the ! routines from shr_abort_abort. (This is for consistency with older code, from when ! these routines were defined in shr_sys_mod.) public :: shr_sys_abort ! abort a program ------------------------------------------------------------------------ shr_abort_mod.F90: ================== module shr_abort_mod use MAPL_ExceptionHandling ! The public routines here are only meant to be used directly by shr_sys_mod. Other code ! that wishes to use these routines should use the republished names from shr_sys_mod ! (shr_sys_abort, shr_sys_backtrace). (This is for consistency with older code, from ! when these routines were defined in shr_sys_mod.) public :: shr_abort_abort ! abort a program subroutine shr_abort_abort(string,ec,rc) _ASSERT(.FALSE.,trim(local_string)) =========================================================================================