comm_send_real_sp_array_2d Subroutine

private subroutine comm_send_real_sp_array_2d(comm, data, dest, tag)

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
real(kind=sp), intent(in) :: data(:,:)
integer(kind=int32), intent(in) :: dest
integer(kind=int32), intent(in) :: tag

Calls

proc~~comm_send_real_sp_array_2d~2~~CallsGraph proc~comm_send_real_sp_array_2d~2 comm_send_real_sp_array_2d mpi_send mpi_send proc~comm_send_real_sp_array_2d~2->mpi_send

Called by

proc~~comm_send_real_sp_array_2d~2~~CalledByGraph proc~comm_send_real_sp_array_2d~2 comm_send_real_sp_array_2d interface~send~2 send interface~send~2->proc~comm_send_real_sp_array_2d~2

Variables

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

Source Code

   subroutine comm_send_real_sp_array_2d(comm, data, dest, tag)
      type(comm_t), intent(in) :: comm
      real(sp), intent(in) :: data(:, :)
      integer(int32), intent(in) :: dest
      integer(int32), intent(in) :: tag
      integer(int32) :: ierr, dim1, dim2

      ! Send dimensions first
      dim1 = size(data, 1)
      dim2 = size(data, 2)
      call MPI_Send(dim1, 1_int32, MPI_INTEGER, dest, tag, comm%m_comm, ierr)
      call MPI_Send(dim2, 1_int32, MPI_INTEGER, dest, tag, comm%m_comm, ierr)

      ! Send data
      call MPI_Send(data, size(data), MPI_REAL, dest, tag, comm%m_comm, ierr)
   end subroutine comm_send_real_sp_array_2d