-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some more debug flags with gnu #1621
Comments
Regarding adding 'invalid' to the 'ffpe-trap' list, and the problem with isnan: The ideal way to allow this may be to take advantage of the fact that - I think - recent versions of gfortran support Fortran 2003 ieee arithmetic, and modify shr_infnan_mod accordingly (rather than having special code for gnu in there). (I made some preliminary, feeble attempts at this which did not meet with success, but I'm hopeful that a more concerted effort would allow this to work.) If this is not possible, then maybe we could back off the compiler flags just for shr_infnan_mod using the Depends.gnu mechanism for the system build, and some other mechanism for the CMake-based unit test build. |
From the discussion in today's cime call: People feel that there's no harm in going ahead and adding I'm still wary of adding |
Actually, I'll take this: I'm finally making some headway on gnu's NaN handling, so I'll combine the changes here with that fix and then run a bunch of testing with gnu. |
-Og and -fbacktrace didn't break alpha/beta testing. |
Great, thanks for checking. If you've already done this, then go ahead and merge it and I'll do the other piece separately. |
Is there a PR associated with this issue? |
No, not yet. I was going to work on it today, but haven't made any actual mods yet. |
@fischer-ncar - I ended up getting stuck on adding |
Okay, turns out I've been able to make some progress after all, so I'm taking this back and combining it with what is likely to become a PR when I return. |
Inspired by ACME's gnu debug flags Test suite: SMS_D.f09_g16.X.cheyenne_gnu Also ran all of CESM's gnu tests on an earlier version of this, which had some other changes folded in (which I haven't kept) Test baseline: N/A Test namelist changes: none Test status: bit for bit Fixes #1621 User interface changes?: none Update gh-pages html (Y/N)?: N Code review:
Inspired by ACME's gnu debug flags Test suite: SMS_D.f09_g16.X.cheyenne_gnu Also ran all of CESM's gnu tests on an earlier version of this, which had some other changes folded in (which I haven't kept) Test baseline: N/A Test namelist changes: none Test status: bit for bit Fixes ESMCI/cime#1621 User interface changes?: none Update gh-pages html (Y/N)?: N Code review:
@rljacob pointed out that ACME has some extra flags beyond what we now have for gnu (even with #1618 ) (see #1618 (comment)). They add
-Og
and-fbacktrace
in both FFLAGS and CFLAGS in DEBUG mode. We should consider doing that, too. They also add 'invalid' to the 'ffpe-trap' list, though I'm a little wary of doing that based on my experience showing that the gnu isnan intrinsic barfs when you give it a signaling NaN with 'invalid' in this list of checks (isn't the whole point of isnan that you should be able to check for NaN values?)I don't want to add these extra flags unless someone ( @jedwards4b ?) signs off on them, since I don't completely understand the implications.
The text was updated successfully, but these errors were encountered: