f_esmf_compcollectgarbage1 Subroutine

recursive subroutine f_esmf_compcollectgarbage1(comp, rc)

Uses

  • proc~~f_esmf_compcollectgarbage1~~UsesGraph proc~f_esmf_compcollectgarbage1 f_esmf_compcollectgarbage1 module~esmf_basemod ESMF_BaseMod proc~f_esmf_compcollectgarbage1->module~esmf_basemod module~esmf_compmod ESMF_CompMod proc~f_esmf_compcollectgarbage1->module~esmf_compmod module~esmf_logerrmod ESMF_LogErrMod proc~f_esmf_compcollectgarbage1->module~esmf_logerrmod module~esmf_utiltypesmod ESMF_UtilTypesMod proc~f_esmf_compcollectgarbage1->module~esmf_utiltypesmod module~esmf_basemod->module~esmf_logerrmod module~esmf_basemod->module~esmf_utiltypesmod iso_c_binding iso_c_binding module~esmf_basemod->iso_c_binding module~esmf_initmacrosmod ESMF_InitMacrosMod module~esmf_basemod->module~esmf_initmacrosmod module~esmf_ioutilmod ESMF_IOUtilMod module~esmf_basemod->module~esmf_ioutilmod module~esmf_vmmod ESMF_VMMod module~esmf_basemod->module~esmf_vmmod module~esmf_compmod->module~esmf_basemod module~esmf_compmod->module~esmf_logerrmod module~esmf_compmod->module~esmf_utiltypesmod module~esmf_calendarmod ESMF_CalendarMod module~esmf_compmod->module~esmf_calendarmod module~esmf_clockmod ESMF_ClockMod module~esmf_compmod->module~esmf_clockmod module~esmf_configmod ESMF_ConfigMod module~esmf_compmod->module~esmf_configmod module~esmf_gridmod ESMF_GridMod module~esmf_compmod->module~esmf_gridmod module~esmf_hconfigmod ESMF_HConfigMod module~esmf_compmod->module~esmf_hconfigmod module~esmf_compmod->module~esmf_initmacrosmod module~esmf_compmod->module~esmf_ioutilmod module~esmf_locstreammod ESMF_LocStreamMod module~esmf_compmod->module~esmf_locstreammod module~esmf_meshmod ESMF_MeshMod module~esmf_compmod->module~esmf_meshmod module~esmf_statemod ESMF_StateMod module~esmf_compmod->module~esmf_statemod module~esmf_statetypesmod ESMF_StateTypesMod module~esmf_compmod->module~esmf_statetypesmod module~esmf_utilmod ESMF_UtilMod module~esmf_compmod->module~esmf_utilmod module~esmf_compmod->module~esmf_vmmod module~esmf_xgridmod ESMF_XGridMod module~esmf_compmod->module~esmf_xgridmod module~esmf_logerrmod->module~esmf_utiltypesmod module~esmf_logerrmod->module~esmf_ioutilmod module~esmf_utilstringmod ESMF_UtilStringMod module~esmf_logerrmod->module~esmf_utilstringmod module~esmf_utiltypesmod->iso_c_binding

Arguments

Type IntentOptional Attributes Name
type(ESMF_CWrap) :: comp
integer, intent(out) :: rc

Calls

proc~~f_esmf_compcollectgarbage1~~CallsGraph proc~f_esmf_compcollectgarbage1 f_esmf_compcollectgarbage1 proc~esmf_compdestruct ESMF_CompDestruct proc~f_esmf_compcollectgarbage1->proc~esmf_compdestruct proc~esmf_logfounderror ESMF_LogFoundError proc~f_esmf_compcollectgarbage1->proc~esmf_logfounderror proc~esmf_compdestruct->proc~esmf_logfounderror c_esmc_comptunneldestroy c_esmc_comptunneldestroy proc~esmf_compdestruct->c_esmc_comptunneldestroy c_esmc_ftabledestroy c_esmc_ftabledestroy proc~esmf_compdestruct->c_esmc_ftabledestroy c_esmc_methodtabledestroy c_esmc_methodtabledestroy proc~esmf_compdestruct->c_esmc_methodtabledestroy proc~esmf_basegetstatus ESMF_BaseGetStatus proc~esmf_compdestruct->proc~esmf_basegetstatus proc~esmf_compexecute ESMF_CompExecute proc~esmf_compdestruct->proc~esmf_compexecute proc~esmf_configdestroy ESMF_ConfigDestroy proc~esmf_compdestruct->proc~esmf_configdestroy proc~esmf_logfounddeallocerror ESMF_LogFoundDeallocError proc~esmf_compdestruct->proc~esmf_logfounddeallocerror proc~esmf_logseterror ESMF_LogSetError proc~esmf_compdestruct->proc~esmf_logseterror proc~esmf_vmplandestruct ESMF_VMPlanDestruct proc~esmf_compdestruct->proc~esmf_vmplandestruct proc~esmf_vmshutdown ESMF_VMShutdown proc~esmf_compdestruct->proc~esmf_vmshutdown 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

Source Code

recursive subroutine f_esmf_compcollectgarbage1(comp, rc)
  use ESMF_UtilTypesMod
  use ESMF_BaseMod
  use ESMF_LogErrMod
  use ESMF_CompMod
  
  implicit none

  type(ESMF_CWrap)     :: comp
  integer, intent(out) :: rc

  integer :: localrc
  integer :: timeout
  logical :: timeoutFlag

  ! initialize return code; assume routine not implemented
  localrc = ESMF_RC_NOT_IMPL
  rc = ESMF_RC_NOT_IMPL

  !print *, "collecting Component garbage #1"

  ! only wrap up the inter component communications, but do no take down
  ! data structures that may render this call collective
  timeout = 10  ! allow for 10s timeout
  ! calling with 'timeoutFlag' prevents timeout to propagate as error condition
  call ESMF_CompDestruct(comp%compp, interCompComm=.true., &
    fullShutdown=.false., timeout=timeout, timeoutFlag=timeoutFlag, rc=localrc)
  if (ESMF_LogFoundError(localrc, &
    ESMF_ERR_PASSTHRU, &
    ESMF_CONTEXT, rcToReturn=rc)) return

  ! return successfully  
  rc = ESMF_SUCCESS

end subroutine f_esmf_compcollectgarbage1