ESMF_VMPlanConstruct Subroutine

public subroutine ESMF_VMPlanConstruct(vmplan, vm, npetlist, petlist, ndevlist, devlist, contextflag, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_VMPlan), intent(inout) :: vmplan
type(ESMF_VM), intent(in) :: vm
integer, intent(in) :: npetlist
integer, intent(in) :: petlist(:)
integer, intent(in) :: ndevlist
integer, intent(in) :: devlist(:)
type(ESMF_Context_Flag), intent(in) :: contextflag
integer, intent(out), optional :: rc

Source Code

  subroutine ESMF_VMPlanConstruct(vmplan, vm, npetlist, petlist, &
    ndevlist, devlist, contextflag, rc)
!
! !ARGUMENTS:
    type(ESMF_VMPlan),       intent(inout)         :: vmplan
    type(ESMF_VM),           intent(in)            :: vm
    integer,                 intent(in)            :: npetlist
    integer,                 intent(in)            :: petlist(:)
    integer,                 intent(in)            :: ndevlist
    integer,                 intent(in)            :: devlist(:)
    type(ESMF_Context_Flag), intent(in)            :: contextflag
    integer,                 intent(out), optional :: rc
!
! !DESCRIPTION:
!   Construct a default plan.
!
!   The arguments are:
!   \begin{description}
!   \item[vmplan]
!        VMPlan
!   \item[vm]
!        VM
!   \item[npetlist]
!        Number of PETs in petlist
!   \item[petlist]
!        List of PETs that the parent VM will provide to the child VM.
!   \item[ndevlist]
!        Number of DEVs in devlist
!   \item[devlist]
!        List of DEVs that are associated with the child VM.
!   \item[{[rc]}]
!        Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    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
    ESMF_INIT_CHECK_DEEP(ESMF_VMGetInit, vm, rc)
    
    ! Call into the C++ interface.
    call c_ESMC_VMPlanConstruct(vmplan, vm, npetlist, petlist, &
      ndevlist, devlist, contextflag, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Set init code
    ESMF_INIT_SET_CREATED(vmplan)
 
    ! return successfully
    if (present(rc)) rc = ESMF_SUCCESS
 
  end subroutine ESMF_VMPlanConstruct