Skip to content

Commit

Permalink
Fix MPT bug on 2.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Apr 20, 2020
1 parent 8dd1cd4 commit 3d3274b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.7] - 2020-04-20

### Fixed

- Workaround for MPT 2.17 build bug with `MPI_Comm_set_errhandler`

## [2.0.6] - 2020-04-15

### Fixed
Expand Down
7 changes: 5 additions & 2 deletions MAPL_Base/MAPL_Cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -578,15 +578,18 @@ subroutine finalize_mpi(this, unusable, rc)
class (KeywordEnforcer), optional, intent(in) :: unusable
integer, optional, intent(out) :: rc

integer :: ierror
integer :: ierror, local_comm_world
_UNUSED_DUMMY(unusable)

if (.not. this%mpi_already_initialized) then
#ifdef BUILD_TYPE_IS_NOT_DEBUG
! MPT 2.17 has a bug with its interface to MPI_Comm_set_errhandler
! defining comm as inout instead of in.
local_comm_world = this%comm_world
! Intel MPI at NCCS seems to have spurious MPI_Finalize errors that do
! not affect the answer or even the finalize step. This call suppresses
! the errors.
call MPI_Comm_set_errhandler(this%comm_world,MPI_ERRORS_RETURN,ierror)
call MPI_Comm_set_errhandler(local_comm_world,MPI_ERRORS_RETURN,ierror)
_VERIFY(ierror)
#endif
call MPI_Finalize(ierror)
Expand Down

0 comments on commit 3d3274b

Please sign in to comment.