ESMCI / ccs_config_cesm

CESM CIME Case Control System configuration files
3 stars 44 forks source link

Add 'invalid' to 'ffpe-trap' list for gnu in CESM, once a working gnu version is widely available #4

Open billsacks opened 6 years ago

billsacks commented 6 years ago

I'd like to be able to add invalid to the ffpe-trap list for gnu. However, this currently causes problems: gfortran's isnan (which is called in cime via the CPRGNU-specific shr_infnan_isnan) causes a floating point exception when called on a signaling NaN. We use isnan in various places in CESM, so this would presumably cause problems when running in debug mode.

This appears to be a known gnu bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66462

Once gnu fixes that bug and we can rely on having versions of gcc/gfortran with that bug fixed, we should add invalid to the ffpe-trap list for gnu.

(This is a revision of ESMCI/cime#1763 . See that issue for details of things I tried, unsuccessfully, to workaround gnu's current issues.)

ekluzek commented 6 years ago

Could this be done for CESM2.0?

billsacks commented 6 years ago

@ekluzek no, this relies on a fix to the gnu compiler which I don't think is in place yet (at least not in the versions of gnu that we typically use).

jedwards4b commented 2 years ago

@billsacks Do we have a working gnu compiler yet? I believe that with the cmake system we can add flags that depend on compiler version.

billsacks commented 2 years ago

I haven't tested this recently, but the relevant gcc issue is still open, so my best guess is that it's still an issue with the latest gfortran (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66462).