comm_recv_integer64_array Subroutine

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

Blocking receive of an integer64 array from specified source. Array is automatically allocated to the correct size.

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
integer(kind=int64), 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_integer64_array~~CallsGraph proc~comm_recv_integer64_array comm_recv_integer64_array mpi_get_count mpi_get_count proc~comm_recv_integer64_array->mpi_get_count mpi_probe mpi_probe proc~comm_recv_integer64_array->mpi_probe mpi_recv mpi_recv proc~comm_recv_integer64_array->mpi_recv

Called by

proc~~comm_recv_integer64_array~~CalledByGraph proc~comm_recv_integer64_array comm_recv_integer64_array interface~recv recv interface~recv->proc~comm_recv_integer64_array

Variables

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

Source Code

   subroutine comm_recv_integer64_array(comm, data, source, tag, status)
   !! Blocking receive of an integer64 array from specified source.
   !! Array is automatically allocated to the correct size.
      type(comm_t), intent(in) :: comm
      integer(int64), 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

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

      ! Allocate and receive
      allocate (data(count))
      call MPI_Recv(data, count, MPI_INTEGER8, source, tag, comm%m_comm, MPI_STATUS_IGNORE, ierr)
   end subroutine comm_recv_integer64_array