Open JosephMouallem opened 6 days ago
There are some nuances with respect to where
statements and the order things are evaluated leading to FPEs when you would expect to be protected against them. Whether you hit them or not is completely up to how the compiler is implemented.
Hi all,
I am encountering issues with
where
statements when running SHiELD/MOM6 in debug mode. For example, the model performs a division by zero and crashes in xgrid.F90 when computing the inverse area, wheregrid%area>0
so not sure how the division by zero is happening in this context: https://github.com/NOAA-GFDL/FMS/blob/23df6d7a905aaa9618e597b82c49b56009a0caa2/exchange/xgrid.F90#L1973-L1976A similar issue arises in the monin obukhov routine: https://github.com/NOAA-GFDL/FMS/blob/23df6d7a905aaa9618e597b82c49b56009a0caa2/monin_obukhov/include/monin_obukhov_inter.inc#L248-L253
I am using the standard SHiELD template and compile flags: https://github.com/NOAA-GFDL/SHiELD_build/blob/main/site/intel.mk.
These issues are specific to DEBUG mode; everything works fine when compiling in REPRO mode.