GEOS-ESM / ESMA_cmake

Custom CMake macros for the GEOS Earth System Model
Apache License 2.0
4 stars 9 forks source link

Fix Intel Debug flags for Intel ifort 2021.10+ #364

Closed mathomp4 closed 7 months ago

mathomp4 commented 7 months ago

Testing by @tclune found a weird failure in pfio unit tests in MAPL (see https://github.com/GEOS-ESM/MAPL/issues/2641). Further testing found the bug could be triggered in a standalong netCDF-Fortran code.

Eventually, it was found that setting either -init=snan,arrays or -fpe0 caused the nf90_create call to crash.

This PR removes those flags if the ifort version is 2021.10 or higher.

NOTE: I have no idea if this is zero-diff or non-zero-diff. I'm not sure if -fpe0 causes a change...