ESMF_VMIdGet Subroutine

public subroutine ESMF_VMIdGet(vmId, leftMostOnBit, isLocalPetActive, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_VMId), intent(in) :: vmId
integer, intent(out), optional :: leftMostOnBit
logical, intent(out), optional :: isLocalPetActive
integer, intent(out), optional :: rc

Calls

proc~~esmf_vmidget~~CallsGraph proc~esmf_vmidget ESMF_VMIdGet c_esmci_vmidgetislocalpetactive c_esmci_vmidgetislocalpetactive proc~esmf_vmidget->c_esmci_vmidgetislocalpetactive c_esmci_vmidgetleftmostonbit c_esmci_vmidgetleftmostonbit proc~esmf_vmidget->c_esmci_vmidgetleftmostonbit proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_vmidget->proc~esmf_logfounderror 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_vmidget~~CalledByGraph proc~esmf_vmidget ESMF_VMIdGet proc~esmf_reconcilesinglecompcase ESMF_ReconcileSingleCompCase proc~esmf_reconcilesinglecompcase->proc~esmf_vmidget proc~esmf_reconcilemulticompcase ESMF_ReconcileMultiCompCase proc~esmf_reconcilemulticompcase->proc~esmf_reconcilesinglecompcase proc~esmf_statereconcile_driver ESMF_StateReconcile_driver proc~esmf_statereconcile_driver->proc~esmf_reconcilemulticompcase proc~esmf_statereconcile ESMF_StateReconcile proc~esmf_statereconcile->proc~esmf_statereconcile_driver

Source Code

  subroutine ESMF_VMIdGet(vmId, leftMostOnBit, isLocalPetActive, rc)
!
! !ARGUMENTS:
    type(ESMF_VMId),   intent(in)            :: vmId
    integer,           intent(out), optional :: leftMostOnBit
    logical,           intent(out), optional :: isLocalPetActive
    integer,           intent(out), optional :: rc
!
! !DESCRIPTION:
!   Copy the contents of ESMF_VMId objects.  Note that the destination
!   objects must have been (deeply) allocated prior to calling this
!   copy.
!
!   The arguments are:
!   \begin{description}
!   \item[vmId]
!        VMId to get information from.
!   \item[{[leftMostOnBit]}]
!        The index (base 0) of the leftmost on bit in {\tt vmId}. If the index
!        is -1, then there were no on bits.
!   \item[{[isLocalPetActive]}]
!        Set to {\tt .true.} if the local PET is indicated as active in
!        {\tt vmId}.
!   \item[{[rc]}]
!        Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code
    type(ESMF_Logical)      :: tf

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

    ! Call into the C++ interface
    if (present(leftMostOnBit)) then
       call c_ESMCI_VMIdGetLeftMostOnBit(vmId, leftMostOnBit, localrc)
       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
            ESMF_CONTEXT, rcToReturn=rc)) return
    endif
    if (present(isLocalPetActive)) then
       call c_ESMCI_VMIdGetIsLocalPetActive(vmId, tf, localrc)
       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
            ESMF_CONTEXT, rcToReturn=rc)) return
       isLocalPetActive = tf == ESMF_TRUE
    endif

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

  end subroutine ESMF_VMIdGet