pf_mpi_create Subroutine

public subroutine pf_mpi_create(pf_comm, mpi_comm)

Subroutine to create an MPI based PFASST communicator using the MPI communicator mpi_comm. assign communicator

assign number of processors

assign procedure pointers

Arguments

Type IntentOptional AttributesName
type(pf_comm_t), intent(out) :: pf_comm
integer, intent(in) :: mpi_comm

Calls

proc~~pf_mpi_create~~CallsGraph proc~pf_mpi_create pf_mpi_create mpi_comm_size mpi_comm_size proc~pf_mpi_create->mpi_comm_size

Contents

Source Code


Source Code

  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