comm_recv_integer_array Subroutine

private subroutine comm_recv_integer_array(comm, data, source, tag, status)

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
integer(kind=int32), intent(out), allocatable :: data(:)
integer(kind=int32), intent(in) :: source
integer(kind=int32), intent(in) :: tag
type(MPI_Status), intent(out) :: status

Calls

proc~~comm_recv_integer_array~2~~CallsGraph proc~comm_recv_integer_array~2 comm_recv_integer_array mpi_get_count mpi_get_count proc~comm_recv_integer_array~2->mpi_get_count mpi_probe mpi_probe proc~comm_recv_integer_array~2->mpi_probe mpi_recv mpi_recv proc~comm_recv_integer_array~2->mpi_recv proc~status_array_to_type status_array_to_type proc~comm_recv_integer_array~2->proc~status_array_to_type

Called by

proc~~comm_recv_integer_array~2~~CalledByGraph proc~comm_recv_integer_array~2 comm_recv_integer_array interface~recv~2 recv interface~recv~2->proc~comm_recv_integer_array~2

Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private :: count
integer(kind=int32), private :: ierr
integer, private :: stat(MPI_STATUS_SIZE)

Source Code

   subroutine comm_recv_integer_array(comm, data, source, tag, status)
      type(comm_t), intent(in) :: comm
      integer(int32), allocatable, intent(out) :: data(:)
      integer(int32), intent(in) :: source
      integer(int32), intent(in) :: tag
      type(MPI_Status), intent(out) :: status
      integer(int32) :: count
      integer(int32) :: ierr
      integer :: stat(MPI_STATUS_SIZE)

      ! First probe to get message size
      call MPI_Probe(source, tag, comm%m_comm, stat, ierr)
      call MPI_Get_count(stat, MPI_INTEGER, count, ierr)

      ! Allocate and receive
      allocate (data(count))
      call MPI_Recv(data, count, MPI_INTEGER, source, tag, comm%m_comm, stat, ierr)

      ! Convert status
      status = status_array_to_type(stat)
   end subroutine comm_recv_integer_array