Subroutine to create an MPI based PFASST communicator using the MPI communicator mpi_comm. assign communicator
assign number of processors
assign procedure pointers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_comm_t), | intent(out) | :: | pf_comm | |||
integer, | intent(in) | :: | mpi_comm |
subroutine pf_mpi_create(pf_comm, mpi_comm)
type(pf_comm_t), intent(out) :: pf_comm
integer, intent(in) :: mpi_comm
integer :: ierror
pf_comm%comm = mpi_comm !! assign communicator
!> assign number of processors
call mpi_comm_size(mpi_comm, pf_comm%nproc, ierror)
!> assign procedure pointers
pf_comm%post => pf_mpi_post
pf_comm%recv => pf_mpi_recv
pf_comm%send => pf_mpi_send
pf_comm%wait => pf_mpi_wait
pf_comm%broadcast => pf_mpi_broadcast
pf_comm%recv_status => pf_mpi_recv_status
pf_comm%send_status => pf_mpi_send_status
end subroutine pf_mpi_create