ESMF_VMEpochEnter Subroutine

public subroutine ESMF_VMEpochEnter(keywordEnforcer, vm, epoch, keepAlloc, throttle, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
type(ESMF_VM), intent(in), optional :: vm
type(ESMF_VMEpoch_Flag), intent(in), optional :: epoch
logical, intent(in), optional :: keepAlloc
integer, intent(in), optional :: throttle
integer, intent(out), optional :: rc

Calls

proc~~esmf_vmepochenter~~CallsGraph proc~esmf_vmepochenter ESMF_VMEpochEnter c_esmc_vmepochenter c_esmc_vmepochenter proc~esmf_vmepochenter->c_esmc_vmepochenter proc~esmf_imerr ESMF_IMErr proc~esmf_vmepochenter->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_vmepochenter->proc~esmf_logfounderror proc~esmf_vmgetcurrent ESMF_VMGetCurrent proc~esmf_vmepochenter->proc~esmf_vmgetcurrent proc~esmf_vmgetinit ESMF_VMGetInit proc~esmf_vmepochenter->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 proc~esmf_vmgetcurrent->proc~esmf_logfounderror c_esmc_vmgetcurrent c_esmc_vmgetcurrent proc~esmf_vmgetcurrent->c_esmc_vmgetcurrent 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_vmepochenter~~CalledByGraph proc~esmf_vmepochenter ESMF_VMEpochEnter proc~run Run proc~run->proc~esmf_vmepochenter program~esmf_rhandlevmepochex ESMF_RHandleVMEpochEx program~esmf_rhandlevmepochex->proc~esmf_vmepochenter program~esmf_vmepochlargemsgutest ESMF_VMEpochLargeMsgUTest program~esmf_vmepochlargemsgutest->proc~esmf_vmepochenter program~esmf_vmnonblockingex ESMF_VMNonBlockingEx program~esmf_vmnonblockingex->proc~esmf_vmepochenter

Source Code

  subroutine ESMF_VMEpochEnter(keywordEnforcer, vm, epoch, keepAlloc, throttle, rc)
!
! !ARGUMENTS:
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    type(ESMF_VM),            intent(in),  optional :: vm
    type(ESMF_VMEpoch_Flag),  intent(in),  optional :: epoch
    logical,                  intent(in),  optional :: keepAlloc
    integer,                  intent(in),  optional :: throttle
    integer,                  intent(out), optional :: rc
!
! !DESCRIPTION:
!   Enter a specific VM epoch. VM epochs change low level communication behavior
!   which can have significant performance implications. It is an error to call
!   {\tt ESMF\_VMEpochEnter()} again before exiting a previous epoch with 
!   {\tt ESMF\_VMEpochExit()}. Also, blocking collective calls
!   (e.g. {\tt ESMF\_VMBroadcast()}) should not be used within a VMEpoch region.
!   Doing so will result in a deadlock. 
!
!   The arguments are:
!   \begin{description}
!   \item[{[vm]}]
!        {\tt ESMF\_VM} object. Defaults to the current VM.
!   \item[{[epoch]}]
!        The epoch to be entered. See section \ref{const:vmepoch_flag} for a
!        complete list of options. Defaults to {\tt ESMF\_VMEPOCH\_NONE}.
!   \item[{[keepAlloc]}]
!        For {\tt .true.}, keep internal allocations to be reused by consecutive
!        epoch phases. For {\tt .false.}, deallocate all internal buffers not
!        actively used.
!        The flag only affects the local PET. Defaults to {\tt .true.}.
!   \item[{[throttle]}]
!        Maximum number of outstanding communication calls beween any two PETs.
!        Lower numbers reduce memory pressure at the expense of the level of
!        asynchronizity achievable. Defaults to 10.
!   \item[{[rc]}]
!        Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOP
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code
    type(ESMF_VM)           :: vm_opt
    type(ESMF_VMEpoch_Flag) :: epoch_opt
    type(ESMF_Logical)      :: keepAlloc_opt  ! helper variable

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

    ! deal with optional arguments
    if (present(vm)) then
      vm_opt = vm
    else
      call ESMF_VMGetCurrent(vm_opt, rc=localrc)
      if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return
    endif

    keepAlloc_opt = ESMF_TRUE ! default
    if (present(keepAlloc)) keepAlloc_opt = keepAlloc

    if (present(epoch)) then
      epoch_opt = epoch
    else
      epoch_opt = ESMF_VMEPOCH_NONE
    endif

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

    ! Call into the C++ interface
    call c_ESMC_VMEpochEnter(vm_opt, epoch_opt, keepAlloc_opt, throttle, &
      localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

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

  end subroutine ESMF_VMEpochEnter