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

Add check for invalid fp-ops for GNU in debug mode #5808

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -19,7 +19,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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All calls to gaschmmass_diags pass the whole tropFlagInt(:pcols,pver) array.


!--------------------------------------------------------------------
! ... 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 )
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chm_diags declares pmid and troplev arrays with pcols.


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