Skip to content

Commit

Permalink
Use ESMF_Initialize to get the vm
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Jan 26, 2024
1 parent 6b6707d commit 401eb47
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gridcomps/Cap/MAPL_Cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ subroutine run_model(this, comm, unusable, rc)
integer :: status
class(Logger), pointer :: lgr
logical :: file_exists
type (ESMF_VM) :: VM
type (ESMF_VM) :: vm
character(len=:), allocatable :: esmfComm

_UNUSED_DUMMY(unusable)
Expand All @@ -295,14 +295,13 @@ 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_VmGetCurrent(VM, _RC)
call ESMF_VmGet(VM, esmfComm = esmfComm, _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
Expand Down

0 comments on commit 401eb47

Please sign in to comment.