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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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