Skip to content

Commit e7facee

Browse files
authored
Merge pull request #4110 from GEOS-ESM/bugfix/nvhpc-ieee
2 parents 84f088b + 1580dd1 commit e7facee

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Fixed
1111

1212
- Fixed `mapl_acg.cmake` to allow for more than one StateSpecs file per target
13+
- Fix NVHPC issue with IEEE halting code
1314

1415
### Added
1516

gridcomps/Cap/MAPL_Cap.F90

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,11 +478,7 @@ subroutine initialize_mpi(this, unusable, rc)
478478
integer :: npes_world
479479
logical :: halting_mode(5)
480480

481-
logical :: set_halting_allowed = ieee_support_halting(ieee_invalid) .and. &
482-
ieee_support_halting(ieee_overflow) .and. &
483-
ieee_support_halting(ieee_divide_by_zero) .and. &
484-
ieee_support_halting(ieee_underflow) .and. &
485-
ieee_support_halting(ieee_inexact)
481+
logical :: set_halting_allowed
486482

487483
_UNUSED_DUMMY(unusable)
488484

@@ -492,6 +488,12 @@ subroutine initialize_mpi(this, unusable, rc)
492488
if (.not. this%mpi_already_initialized) then
493489
call ESMF_InitializePreMPI(_RC)
494490

491+
set_halting_allowed = ieee_support_halting(ieee_invalid) .and. &
492+
ieee_support_halting(ieee_overflow) .and. &
493+
ieee_support_halting(ieee_divide_by_zero) .and. &
494+
ieee_support_halting(ieee_underflow) .and. &
495+
ieee_support_halting(ieee_inexact)
496+
495497
! Testing with GCC 14 + MVAPICH 4 found that it was failing with
496498
! a SIGFPE in MPI_Init_thread(). Turning off ieee halting
497499
! around the call seems to "fix" it.

0 commit comments

Comments
 (0)