Skip to content

Commit

Permalink
Merge branch 'azamat/machines/add-gnu-invalid-check' (PR #5808)
Browse files Browse the repository at this point in the history
Add check for invalid fp-ops for GNU in debug mode.

Also, fix ncol/pcol indexes in 2 eam-chemistry subroutines
(flagged by `-ffpe-trap=invalid`).

[non-BFB] - in fully-coupled tests
  • Loading branch information
amametjanov committed Oct 13, 2023
2 parents cff4226 + 77c90e6 commit f6f7b13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cime_config/machines/cmake_macros/gnu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ endif()
if (DEBUG)
string(APPEND CFLAGS " -g -Wall -fbacktrace -fcheck=bounds -ffpe-trap=invalid,zero,overflow")
string(APPEND CXXFLAGS " -g -Wall -fbacktrace")
string(APPEND FFLAGS " -g -Wall -fbacktrace -fcheck=bounds -ffpe-trap=zero,overflow")
string(APPEND FFLAGS " -g -Wall -fbacktrace -fcheck=bounds,pointer -ffpe-trap=invalid,zero,overflow")
string(APPEND CPPDEFS " -DYAKL_DEBUG")
endif()
if (NOT DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion components/eam/src/chemistry/mozart/mo_chm_diags.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,7 @@ subroutine gaschmmass_diags( lchnk, ncol, vmr, vmr_old, pdeldry, mbar, rdelt, fl
real(r8), intent(in) :: mbar(ncol,pver)
real(r8), intent(in) :: rdelt ! inverse of timestep (1/s)
character(len=*), intent(in) :: flag ! flag for diagnostic output locations
real(r8), optional, intent(in) :: tropFlagInt(ncol, pver)
real(r8), optional, intent(in) :: tropFlagInt(pcols, pver)

!--------------------------------------------------------------------
! ... local variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ subroutine gas_phase_chemdr(lchnk, ncol, imozart, q, &
call t_startf('chemdr_diags')
call chm_diags( lchnk, ncol, vmr(:ncol,:,:), mmr_new(:ncol,:,:), &
reaction_rates(:ncol,:,:), invariants(:ncol,:,:), depvel(:ncol,:), sflx(:ncol,:), &
mmr_tend(:ncol,:,:), pmid(:ncol,:), pdel(:ncol,:), pdeldry(:ncol,:), pbuf, troplev(:ncol), tropFlag=tropFlag )
mmr_tend(:ncol,:,:), pmid, pdel(:ncol,:), pdeldry(:ncol,:), pbuf, troplev, tropFlag=tropFlag )

call rate_diags_calc( reaction_rates(:,:,:), vmr(:,:,:), invariants(:,:,indexm), ncol, lchnk, &
pver, pdeldry(:ncol,:), mbar)
Expand Down

0 comments on commit f6f7b13

Please sign in to comment.