Skip to content

Commit

Permalink
Merge branch 'azamat/theta/rm-div0-ck' into next (PR #3162)
Browse files Browse the repository at this point in the history
Update machine file on theta.
Also, turn off a div-by-zero check for debug+knl+intel runs.

Fixes #3098

[BFB]
  • Loading branch information
amametjanov committed Aug 30, 2019
2 parents a28bc15 + 5643fdf commit 62d0875
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
31 changes: 31 additions & 0 deletions cime/config/e3sm/allactive/config_pesall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8819,4 +8819,35 @@
</pes>
</mach>
</grid>
<grid name="a%T62.+_oi%oEC60to30.*">
<mach name="theta">
<pes compset=".*MPASSI.*DOCN.+" pesize="any">
<comment>--res T62_oEC60to30v3 --compset DTESTM on 2 nodes</comment>
<ntasks>
<ntasks_atm>128</ntasks_atm>
<ntasks_lnd>128</ntasks_lnd>
<ntasks_rof>128</ntasks_rof>
<ntasks_ice>128</ntasks_ice>
<ntasks_ocn>128</ntasks_ocn>
<ntasks_cpl>128</ntasks_cpl>
</ntasks>
<nthrds>
<nthrds_atm>2</nthrds_atm>
<nthrds_lnd>2</nthrds_lnd>
<nthrds_rof>2</nthrds_rof>
<nthrds_ice>2</nthrds_ice>
<nthrds_ocn>2</nthrds_ocn>
<nthrds_cpl>2</nthrds_cpl>
</nthrds>
<rootpe>
<rootpe_atm>0</rootpe_atm>
<rootpe_lnd>0</rootpe_lnd>
<rootpe_rof>0</rootpe_rof>
<rootpe_ice>0</rootpe_ice>
<rootpe_ocn>0</rootpe_ocn>
<rootpe_cpl>0</rootpe_cpl>
</rootpe>
</pes>
</mach>
</grid>
</config_pes>
17 changes: 17 additions & 0 deletions components/cam/src/physics/clubb/lapack_wrap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ subroutine tridag_solve &

use clubb_precision, only: &
core_rknd ! Variable(s)
#ifndef NDEBUG
#if defined(ARCH_MIC_KNL) && defined(CPRINTEL)
use, intrinsic :: ieee_exceptions
#endif
#endif

use error_code, only: &
err_code, & ! Error Indicator
Expand Down Expand Up @@ -257,8 +262,20 @@ subroutine tridag_solve &
!-----------------------------------------------------------------------

if ( kind( diag(1) ) == dp ) then
#ifndef NDEBUG
#if defined(ARCH_MIC_KNL) && defined(CPRINTEL)
! when floating-point exceptions are turned on, this call was failing with a div-by-zero on KNL with Intel/MKL. Solution
! was to turn off exceptions only here at this call (and only for machine with ARCH_MIC_KNL defined) (github 1183)
call ieee_set_halting_mode(IEEE_DIVIDE_BY_ZERO, .false.) ! Turn off stopping on div-by-zero only
#endif
#endif
call dgtsv( ndim, nrhs, subd(2:ndim), diag, supd(1:ndim-1), &
rhs, ndim, info )
#ifndef NDEBUG
#if defined(ARCH_MIC_KNL) && defined(CPRINTEL)
call ieee_set_halting_mode(IEEE_DIVIDE_BY_ZERO, .true.) ! Turn back on stopping on div-by-zero only
#endif
#endif

else if ( kind( diag(1) ) == sp ) then
call sgtsv( ndim, nrhs, subd(2:ndim), diag, supd(1:ndim-1), &
Expand Down

0 comments on commit 62d0875

Please sign in to comment.