ESMF_VMRecvI4 Subroutine

private subroutine ESMF_VMRecvI4(vm, recvData, count, srcPet, keywordEnforcer, syncflag, commhandle, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_VM), intent(in) :: vm
integer(kind=ESMF_KIND_I4), intent(out), target :: recvData(:)
integer, intent(in) :: count
integer, intent(in) :: srcPet
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
type(ESMF_Sync_Flag), intent(in), optional :: syncflag
type(ESMF_CommHandle), intent(out), optional :: commhandle
integer, intent(out), optional :: rc

Calls

proc~~esmf_vmrecvi4~~CallsGraph proc~esmf_vmrecvi4 ESMF_VMRecvI4 interface~c_esmc_vmrecv c_ESMC_VMRecv proc~esmf_vmrecvi4->interface~c_esmc_vmrecv interface~c_esmc_vmrecvnb c_ESMC_VMRecvNB proc~esmf_vmrecvi4->interface~c_esmc_vmrecvnb proc~esmf_imerr ESMF_IMErr proc~esmf_vmrecvi4->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_vmrecvi4->proc~esmf_logfounderror proc~esmf_vmgetinit ESMF_VMGetInit proc~esmf_vmrecvi4->proc~esmf_vmgetinit proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Called by

proc~~esmf_vmrecvi4~~CalledByGraph proc~esmf_vmrecvi4 ESMF_VMRecvI4 interface~esmf_vmrecv ESMF_VMRecv interface~esmf_vmrecv->proc~esmf_vmrecvi4 proc~esmf_outputweightfile ESMF_OutputWeightFile proc~esmf_outputweightfile->interface~esmf_vmrecv proc~esmf_webservcplcompwaitforrqst ESMF_WebServCplCompWaitForRqst proc~esmf_webservcplcompwaitforrqst->interface~esmf_vmrecv proc~esmf_webservwaitforrequest ESMF_WebServWaitForRequest proc~esmf_webservwaitforrequest->interface~esmf_vmrecv proc~executeupdatepackets ExecuteUpdatePackets proc~executeupdatepackets->interface~esmf_vmrecv program~esmf_vmepochlargemsgutest ESMF_VMEpochLargeMsgUTest program~esmf_vmepochlargemsgutest->interface~esmf_vmrecv program~esmf_vmhigherrankdataex ESMF_VMHigherRankDataEx program~esmf_vmhigherrankdataex->interface~esmf_vmrecv program~esmf_vmnonblockingex ESMF_VMNonBlockingEx program~esmf_vmnonblockingex->interface~esmf_vmrecv program~esmf_vmsendnbvmrecvnbutest ESMF_VMSendNbVMRecvNbUTest program~esmf_vmsendnbvmrecvnbutest->interface~esmf_vmrecv program~esmf_vmsendvmrecvex ESMF_VMSendVMRecvEx program~esmf_vmsendvmrecvex->interface~esmf_vmrecv program~esmf_vmsendvmrecvutest ESMF_VMSendVMRecvUTest program~esmf_vmsendvmrecvutest->interface~esmf_vmrecv proc~esmf_sparsematrixwrite ESMF_SparseMatrixWrite proc~esmf_sparsematrixwrite->proc~esmf_outputweightfile proc~esmf_webservicescplcomploop ESMF_WebServicesCplCompLoop proc~esmf_webservicescplcomploop->proc~esmf_webservcplcompwaitforrqst proc~esmf_webservicesloop ESMF_WebServicesLoop proc~esmf_webservicesloop->proc~esmf_webservwaitforrequest proc~run Run proc~run->proc~executeupdatepackets program~esmf_ioutest ESMF_IOUTest program~esmf_ioutest->proc~esmf_outputweightfile proc~f_esmf_regridstorefile f_esmf_regridstorefile proc~f_esmf_regridstorefile->proc~esmf_sparsematrixwrite proc~test_regrid_store_from_file test_regrid_store_from_file proc~test_regrid_store_from_file->proc~esmf_sparsematrixwrite program~esmf_webservcomponentutest ESMF_WebServComponentUTest program~esmf_webservcomponentutest->proc~esmf_webservicescplcomploop program~esmf_webservcomponentutest->proc~esmf_webservicesloop program~esmf_webservicesstest ESMF_WebServicesSTest program~esmf_webservicesstest->proc~esmf_webservicesloop

Source Code

  subroutine ESMF_VMRecvI4(vm, recvData, count, srcPet, keywordEnforcer, &
    syncflag, commhandle, rc)
!
! !ARGUMENTS:
    type(ESMF_VM),                 intent(in)            :: vm
    integer(ESMF_KIND_I4), target, intent(out)           :: recvData(:)
    integer,                       intent(in)            :: count
    integer,                       intent(in)            :: srcPet
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    type(ESMF_Sync_Flag),          intent(in),  optional :: syncflag
    type(ESMF_CommHandle),         intent(out), optional :: commhandle
    integer,                       intent(out), optional :: rc
!
!EOPI
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code
    integer(ESMF_KIND_I8)   :: size
    logical                 :: blocking
    type(ESMF_CommHandle)   :: localcommhandle

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! Check init status of arguments
    ESMF_INIT_CHECK_DEEP(ESMF_VMGetInit, vm, rc)

    ! Initialize commhandle to an invalid pointer
    if (present(commhandle)) commhandle%this = ESMF_NULL_POINTER

    ! Decide whether this is blocking or non-blocking
    blocking = .true. !default is blocking
    if (present(syncflag)) then
      if (syncflag == ESMF_SYNC_NONBLOCKING) blocking = .false. ! non-blocking
    endif
    
    if (count > 0) then
      ! There is data to be received
      size = count
      size = size * 4 ! 4 bytes
      ! Call into the C++ interface.
      if (blocking) then
        call c_ESMC_VMRecv(vm, recvData, size, srcPet, localrc)
        if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
          ESMF_CONTEXT, rcToReturn=rc)) return
      else
        call c_ESMC_VMRecvNB(vm, recvData, size, srcPet, localcommhandle, &
          localrc)
        if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
          ESMF_CONTEXT, rcToReturn=rc)) return
        ! Check if we need to pass back the commhandle
        if (present(commhandle)) then
          commhandle = localcommhandle  ! copy the commhandle pointer back
          ! Set init code
          ESMF_INIT_SET_CREATED(commhandle)
        endif
      endif
    endif

    ! return successfully
    if (present(rc)) rc = ESMF_SUCCESS

  end subroutine ESMF_VMRecvI4