Skip to content
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

Stricter DEBUG checks when using GCC #857

Closed
billsacks opened this issue Nov 30, 2016 · 2 comments · Fixed by #1618
Closed

Stricter DEBUG checks when using GCC #857

billsacks opened this issue Nov 30, 2016 · 2 comments · Fixed by #1618
Assignees

Comments

@billsacks
Copy link
Member

From @quantheory on August 4, 2015 17:5

This is an extension of the issue here:

http://bugs.cgd.ucar.edu/show_bug.cgi?id=1773

Right now we really don't have any of the major run-time checks turned on for GNU compilers. We should probably use an option such as -fcheck=all. (This prints unnecessary creation of array temporary warnings, but unlike Intel's equivalent option, it should only print once per code location, so it shouldn't produce as much spam.)

Copied from original issue: CESM-Development#91

@billsacks
Copy link
Member Author

@jedwards4b points out that check=all is pretty noisy. We'll try to set equivalent debug flags to what we do for (e.g.) intel.

@billsacks
Copy link
Member Author

I propose adding the following to the

<ADD_FFLAGS DEBUG="TRUE">

clause for gnu in config_compilers.xml:

-ffpe-trap=invalid,zero,overflow -fcheck=bounds

@jedwards4b and others: does this sound reasonable?

@rljacob rljacob added the ready label Jan 6, 2017
rljacob pushed a commit that referenced this issue Feb 8, 2017
…(PR #857)

jenkins_generic_job: Add -j flag

Will allow parallelism to be dialed-down from Jenkins.

[BFB]

* jgfouca/scripts/jenkins_generic_job_j_opt:
  jenkins_generic_job: Add -j flag
@ghost ghost added in progress and removed ready labels Apr 12, 2017
@ghost ghost removed the in progress label Apr 12, 2017
fischer-ncar added a commit that referenced this issue May 28, 2017
This adds more debug checks with gnu.

I thought this was done in #1339 (which claimed to fix #857), but I
realized that that only added flags for the C compiler, not the Fortran
compiler. This PR adds debug flags for the Fortran compiler, too.

Ideally, we would also have 'invalid' in the ffpe-trap list. But at
least with some versions of gfortran (confirmed with 5.3.0), 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. (This
problem showed up in the unit tests on my Mac: Adding 'invalid' caused
the shr_strconvert unit tests to fail (specifically, the tests
toString_prints_snan_r4 and toString_prints_snan_r8).)

Test suite: Ran nearly all gnu debug tests that I could find in all CESM
test suites. This included:

    aux_clm45 yellowstone-gnu: all pass and are bit-for-bit

    The following yellowstone tests:

    ERS_D_Ly3.f09_g16_gl5.TG1.yellowstone_gnu.cism-noevolve
    SMS_D.T31_g37_gl20.IGCLM45.yellowstone_gnu.cism-test_coupling
    SMS_D.f09_g16_gl20.TG1.yellowstone_gnu
    SMS_D_Ly1.f09_g16_gl20.THISTG.yellowstone_gnu
    SMS_D_Ld5.f10_f10.IMCRUCLM50BGC.yellowstone_gnu.mosart-default
    SMS_D_Ld5.f10_f10.ICRUCLM50BGC.yellowstone_gnu.rtm-default
    SMS_D.f09_g16_gl20.TG1.yellowstone_gnu
    ERI_D.T31_g37_rx1.A.yellowstone_gnu
    SMS_D_Ld1.5x5_amazon.ITEST.yellowstone_gnu.clm-40default

    All pass except a build failure for
    SMS_D_Ld1.5x5_amazon.ITEST.yellowstone_gnu.clm-40default which doesn't
    look related to these new debug flags. This is a CLM40 test that isn't
    important.

    The following cheyenne tests:

    SMS_D.f09_g16_gl20.TG1.cheyenne_gnu
    ERI_D.T31_g37_rx1.A.cheyenne_gnu
    SMS_D_Ld1.5x5_amazon.ITEST.cheyenne_gnu.clm-40default

    The A test passed. The ITEST failed as for yellowstone. The TG1 test
    failed, unable to link some lapack routines (seems unrelated to the
    new build flags).

I ran these tests from
https://svn-ccsm-models.cgd.ucar.edu/clm2/branches/externals_update_cesm2_0_alpha06k
at r85267, with cime changes rebased onto cime5.3.0-alpha.13

Test baseline: For aux_clm45 tests, I compared against the above version
of CLM unmodified. For other tests, I didn't do baseline comparisons
Test namelist changes: none
Test status: bit for bit

Fixes #1615

User interface changes?: none

Code review:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants