Hello Erik,
Cactus offers functions "CCTK_isnan" etc. that always do what the name suggests, so that compilers can optimize "isnan" away if they want.
Are you sure about this? I have (in src/util/Math.c):
--8<-- int CCTK_isnan(double x) { #ifdef HAVE_ISNAN return isnan(x); #else return 0; /* default */ #endif } --8<-- and -ffinite-math-only turns isnan into a no-op that always returns "true".
HAVE_ISNAN is set by the configure script. NaNChecker uses CCTK_isnan yet it failed on machines using unbuntu.cfg which uses -ffast-math (which includes -ffinite-math-only).
Yours, Roland