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

Fixes #2553. Detect mpiuni builds of ESMF #2556

Merged
merged 3 commits into from
Jan 30, 2024
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
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
10 changes: 8 additions & 2 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 @@ -293,11 +295,15 @@ subroutine run_model(this, comm, unusable, rc)
! If the file exists, we pass it into ESMF_Initialize, else, we
! use the one from the command line arguments
if (file_exists) then
call ESMF_Initialize (configFileName='ESMF.rc', mpiCommunicator=comm, _RC)
call ESMF_Initialize (configFileName='ESMF.rc', mpiCommunicator=comm, vm=vm, _RC)
else
call ESMF_Initialize (logKindFlag=this%cap_options%esmf_logging_mode, mpiCommunicator=comm, _RC)
call ESMF_Initialize (logKindFlag=this%cap_options%esmf_logging_mode, mpiCommunicator=comm, vm=vm, _RC)
end if

! We check to see if ESMF_COMM was built as mpiuni which is not allowed for MAPL
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
Loading