ESMF_ArrayRedistRelease Subroutine

public subroutine ESMF_ArrayRedistRelease(routehandle, keywordEnforcer, noGarbage, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_RouteHandle), intent(inout) :: routehandle
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
logical, intent(in), optional :: noGarbage
integer, intent(out), optional :: rc

Calls

proc~~esmf_arrayredistrelease~~CallsGraph proc~esmf_arrayredistrelease ESMF_ArrayRedistRelease proc~esmf_imerr ESMF_IMErr proc~esmf_arrayredistrelease->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_arrayredistrelease->proc~esmf_logfounderror proc~esmf_routehandlegetinit ESMF_RouteHandleGetInit proc~esmf_arrayredistrelease->proc~esmf_routehandlegetinit proc~esmf_routehandlerelease ESMF_RouteHandleRelease proc~esmf_arrayredistrelease->proc~esmf_routehandlerelease 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_routehandlerelease->proc~esmf_imerr proc~esmf_routehandlerelease->proc~esmf_logfounderror proc~esmf_routehandlerelease->proc~esmf_routehandlegetinit proc~esmf_routehandledestroy ESMF_RouteHandleDestroy proc~esmf_routehandlerelease->proc~esmf_routehandledestroy 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_routehandledestroy->proc~esmf_imerr proc~esmf_routehandledestroy->proc~esmf_logfounderror proc~esmf_routehandledestroy->proc~esmf_routehandlegetinit c_esmc_routehandledestroy c_esmc_routehandledestroy proc~esmf_routehandledestroy->c_esmc_routehandledestroy 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_arrayredistrelease~~CalledByGraph proc~esmf_arrayredistrelease ESMF_ArrayRedistRelease proc~array_redist_test array_redist_test proc~array_redist_test->proc~esmf_arrayredistrelease proc~compfinal1 compFinal1 proc~compfinal1->proc~esmf_arrayredistrelease proc~compfinal2 compFinal2 proc~compfinal2->proc~esmf_arrayredistrelease proc~compfinal~2 compFinal proc~compfinal~2->proc~esmf_arrayredistrelease proc~computeredistareamesh computeRedistAreaMesh proc~computeredistareamesh->proc~esmf_arrayredistrelease proc~esmf_gridcreatecopyfromnewdg ESMF_GridCreateCopyFromNewDG proc~esmf_gridcreatecopyfromnewdg->proc~esmf_arrayredistrelease proc~gatherredistfracfieldmesh gatherRedistFracFieldMesh proc~gatherredistfracfieldmesh->proc~esmf_arrayredistrelease proc~user_final~12 user_final proc~user_final~12->proc~esmf_arrayredistrelease proc~user_final~19 user_final proc~user_final~19->proc~esmf_arrayredistrelease proc~user_final~23 user_final proc~user_final~23->proc~esmf_arrayredistrelease proc~user_final~38 user_final proc~user_final~38->proc~esmf_arrayredistrelease proc~user_final~41 user_final proc~user_final~41->proc~esmf_arrayredistrelease proc~user_final~43 user_final proc~user_final~43->proc~esmf_arrayredistrelease proc~user_final~50 user_final proc~user_final~50->proc~esmf_arrayredistrelease proc~user_final~60 user_final proc~user_final~60->proc~esmf_arrayredistrelease proc~user_final~61 user_final proc~user_final~61->proc~esmf_arrayredistrelease proc~user_final~82 user_final proc~user_final~82->proc~esmf_arrayredistrelease program~esmf_arraycommnbex ESMF_ArrayCommNBEx program~esmf_arraycommnbex->proc~esmf_arrayredistrelease program~esmf_arrayredistex ESMF_ArrayRedistEx program~esmf_arrayredistex->proc~esmf_arrayredistrelease program~esmf_arrayredistutest ESMF_ArrayRedistUTest program~esmf_arrayredistutest->proc~esmf_arrayredistrelease program~esmf_arrayscattergatherarbex ESMF_ArrayScatterGatherArbEx program~esmf_arrayscattergatherarbex->proc~esmf_arrayredistrelease program~esmf_rhandlevmepochex ESMF_RHandleVMEpochEx program~esmf_rhandlevmepochex->proc~esmf_arrayredistrelease interface~esmf_gridcreate ESMF_GridCreate interface~esmf_gridcreate->proc~esmf_gridcreatecopyfromnewdg proc~esmf_gridcreatefrmncfile ESMF_GridCreateFrmNCFile proc~esmf_gridcreatefrmncfile->proc~esmf_gridcreatecopyfromnewdg proc~esmf_gridcreatefrmncfiledg ESMF_GridCreateFrmNCFileDG proc~esmf_gridcreatefrmncfiledg->proc~esmf_gridcreatecopyfromnewdg proc~runtests RunTests proc~runtests->proc~array_redist_test

Source Code

  subroutine ESMF_ArrayRedistRelease(routehandle, keywordEnforcer, noGarbage, rc)
! 
! !ARGUMENTS:
    type(ESMF_RouteHandle), intent(inout)         :: routehandle
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    logical,                intent(in),  optional :: noGarbage
    integer,                intent(out), optional :: rc
!
! !STATUS:
! \begin{itemize}
! \item\apiStatusCompatibleVersion{5.2.0r}
! \item\apiStatusModifiedSinceVersion{5.2.0r}
! \begin{description}
! \item[8.0.0] Added argument {\tt noGarbage}.
!   The argument provides a mechanism to override the default garbage collection
!   mechanism when destroying an ESMF object.
! \end{description}
! \end{itemize}
!
! !DESCRIPTION:
!   Release resources associated with an Array redistribution. After this call
!   {\tt routehandle} becomes invalid.
!
!   \begin{description}
!   \item [routehandle]
!     Handle to the precomputed Route.
!   \item[{[noGarbage]}]
!     If set to {\tt .TRUE.} the object will be fully destroyed and removed
!     from the ESMF garbage collection system. Note however that under this 
!     condition ESMF cannot protect against accessing the destroyed object 
!     through dangling aliases -- a situation which may lead to hard to debug 
!     application crashes.
! 
!     It is generally recommended to leave the {\tt noGarbage} argument
!     set to {\tt .FALSE.} (the default), and to take advantage of the ESMF 
!     garbage collection system which will prevent problems with dangling
!     aliases or incorrect sequences of destroy calls. However this level of
!     support requires that a small remnant of the object is kept in memory
!     past the destroy call. This can lead to an unexpected increase in memory
!     consumption over the course of execution in applications that use 
!     temporary ESMF objects. For situations where the repeated creation and 
!     destruction of temporary objects leads to memory issues, it is 
!     recommended to call with {\tt noGarbage} set to {\tt .TRUE.}, fully 
!     removing the entire temporary object from memory.
!   \item [{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOP
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code

    ! 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, deal with optional Array args
    ESMF_INIT_CHECK_DEEP(ESMF_RouteHandleGetInit, routehandle, rc)
        
    ! Call into the RouteHandle code
    call ESMF_RouteHandleRelease(routehandle, noGarbage=noGarbage, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    
    ! return successfully
    if (present(rc)) rc = ESMF_SUCCESS

  end subroutine ESMF_ArrayRedistRelease