ESMF_VMPlanMaxPEs Subroutine

public subroutine ESMF_VMPlanMaxPEs(vmplan, vm, max, pref_intra_process, pref_intra_ssi, pref_inter_ssi, npetlist, petlist, forceEachChildPetOwnPthread, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_VMPlan), intent(inout) :: vmplan
type(ESMF_VM), intent(in) :: vm
integer, intent(in), optional :: max
integer, intent(in), optional :: pref_intra_process
integer, intent(in), optional :: pref_intra_ssi
integer, intent(in), optional :: pref_inter_ssi
integer, intent(in) :: npetlist
integer, intent(in) :: petlist(:)
logical, intent(in), optional :: forceEachChildPetOwnPthread
integer, intent(out), optional :: rc

Source Code

  subroutine ESMF_VMPlanMaxPEs(vmplan, vm, max, &
    pref_intra_process, pref_intra_ssi, pref_inter_ssi, npetlist, petlist, &
    forceEachChildPetOwnPthread, rc)
!
! !ARGUMENTS:
    type(ESMF_VMPlan), intent(inout)         :: vmplan
    type(ESMF_VM),     intent(in)            :: vm
    integer,           intent(in),  optional :: max
    integer,           intent(in),  optional :: pref_intra_process
    integer,           intent(in),  optional :: pref_intra_ssi
    integer,           intent(in),  optional :: pref_inter_ssi
    integer,           intent(in)            :: npetlist
    integer,           intent(in)            :: petlist(:)
    logical,           intent(in),  optional :: forceEachChildPetOwnPthread
    integer,           intent(out), optional :: rc
!
! !DESCRIPTION:
!   Set up a MaxPEs vmplan.
!
!   The arguments are:
!   \begin{description}
!   \item[vmplan] 
!        VMPlan
!   \item[vm] 
!        VM
!   \item[{[max]}] 
!        Maximum number of cores per thread
!   \item[{[pref_intra_process]}] 
!        Intra process communication preference
!   \item[{[pref_intra_ssi]}] 
!        Intra SSI communication preference
!   \item[{[pref_inter_ssi]}] 
!        Inter process communication preference
!   \item[npetlist] 
!        Number of PETs in petlist
!   \item[petlist] 
!        List of PETs that the parent VM will provide to the child VM
!   \item[{[forceEachChildPetOwnPthread]}] 
!        For {\tt .true.}, force each child PET to execute in its own Pthread.
!        By default, {\tt .false.}, single PETs spawned from a parent PET
!        execute in the same thread (or MPI process) as the parent PET. Multiple
!        child PETs spawned by the same parent PET always execute as their own
!        Pthreads.
!   \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_VMPlanGetInit, vmplan, rc)
    ESMF_INIT_CHECK_DEEP(ESMF_VMGetInit, vm, rc)

    ! Call into the C++ interface.
    call c_ESMC_VMPlanMaxPEs(vmplan, vm, max, &
      pref_intra_process, pref_intra_ssi, pref_inter_ssi, &
      npetlist, petlist, forceEachChildPetOwnPthread, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

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

  end subroutine ESMF_VMPlanMaxPEs