pf_mpi_setup Subroutine

public subroutine pf_mpi_setup(pf_comm, pf, ierror)

Uses

  • proc~~pf_mpi_setup~~UsesGraph proc~pf_mpi_setup pf_mpi_setup module~pf_mod_mpi pf_mod_mpi proc~pf_mpi_setup->module~pf_mod_mpi

Subroutine to set up the PFASST communicator. This should be called soon after adding levels to the PFASST controller set the rank

allocate arrarys for and and receive requests

Arguments

Type IntentOptional AttributesName
type(pf_comm_t), intent(inout) :: pf_comm

communicator

type(pf_pfasst_t), intent(inout) :: pf

main pfasst structure

integer, intent(inout) :: ierror

error flag


Calls

proc~~pf_mpi_setup~~CallsGraph proc~pf_mpi_setup pf_mpi_setup mpi_comm_rank mpi_comm_rank proc~pf_mpi_setup->mpi_comm_rank

Called by

proc~~pf_mpi_setup~~CalledByGraph proc~pf_mpi_setup pf_mpi_setup proc~pf_pfasst_create pf_pfasst_create proc~pf_pfasst_create->proc~pf_mpi_setup

Contents

Source Code


Source Code

  subroutine pf_mpi_setup(pf_comm, pf,ierror)
    use pf_mod_mpi, only: MPI_REQUEST_NULL

    type(pf_comm_t),   intent(inout) :: pf_comm    !!  communicator 
    type(pf_pfasst_t), intent(inout) :: pf         !!  main pfasst structure
    integer,           intent(inout) :: ierror     !!  error flag

    !>  set the rank
    call mpi_comm_rank(pf_comm%comm, pf%rank, ierror)

    !>  allocate arrarys for and and receive requests
    allocate(pf_comm%recvreq(pf%nlevels))
    allocate(pf_comm%sendreq(pf%nlevels))

    pf_comm%sendreq = MPI_REQUEST_NULL
    pf_comm%statreq = -66   !Tells the first send_status not to wait for previous one to arrive
  end subroutine pf_mpi_setup