Skip to content

Commit

Permalink
Fixes #2553. Detect mpiuni builds of ESMF
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Jan 26, 2024
1 parent 1026735 commit 6b6707d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added

- Convert from ABI Fixed Grid to lon/lat coordinates used in MAPL_XYGridFactory (supporting geostationary GOES-R series)
- Modify trajectory sampler for a collection with multiple platforms: P3B (air craft) + FIREX
- Modify swath sampler to handle two Epoch swath grids
Expand All @@ -16,8 +17,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- parse "GOCART::CO2" from 'geovals_fields' entry in PLATFORM
- Add call MAPL_InitializeShmem to ExtDataDriverGridComp.F90
- Read swath data on root, call MAPL_CommsBcast [which sends data to Shmem (when Shmem initialized) or to MAPL_comm otherwise]. This approach avoids race in reading nc files [e.g. 37 files for 3 hr swath data]


- Added memory utility, MAPL_MemReport that can be used in any code linking MAPL
- Added capability in XY grid factory to add a mask to the grid any points are missing needed for geostationary input data
- Added capability in the MAPL ESMF regridding wrapper to apply a destination mask if the destination grid contains a mask
Expand All @@ -41,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Explictly `use` some `iso_c_binding` types previously pulled in through ESMF. This is fixed in future ESMF versions (8.7+) and so
we anticipate this here
- Add explicit `Fortran_MODULE_DIRECTORY` to `CMakeLists.txt` in benchmarks to avoid race condition in Ninja builds
- Add check to make sure ESMF was not built as `mpiuni`

### Removed

Expand Down
7 changes: 7 additions & 0 deletions gridcomps/Cap/MAPL_Cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ subroutine run_model(this, comm, unusable, rc)
integer :: status
class(Logger), pointer :: lgr
logical :: file_exists
type (ESMF_VM) :: VM
character(len=:), allocatable :: esmfComm

_UNUSED_DUMMY(unusable)

Expand All @@ -298,6 +300,11 @@ subroutine run_model(this, comm, unusable, rc)
call ESMF_Initialize (logKindFlag=this%cap_options%esmf_logging_mode, mpiCommunicator=comm, _RC)
end if

! We check to see if ESMF_COMM was built as mpiuni which is not allowed for MAPL
call ESMF_VmGetCurrent(VM, _RC)
call ESMF_VmGet(VM, esmfComm = esmfComm, _RC)
_ASSERT( esmfComm /= 'mpiuni', 'ESMF_COMM=mpiuni is not allowed for MAPL')

! Note per ESMF this is a temporary routine as eventually MOAB will
! be the only mesh generator. But until then, this allows us to
! test it
Expand Down

0 comments on commit 6b6707d

Please sign in to comment.