Receive real array from specified node
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | array | |||
integer, | intent(in) | :: | size | |||
integer, | intent(in) | :: | from |
subroutine comms_recv_real(array, size, from)
!! Receive real array from specified node
implicit none
real(kind=dp), intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: from
#ifdef MPI
integer :: error
integer :: status(MPI_status_size)
call MPI_recv(array, size, MPI_double_precision, from, &
mpi_send_tag, mpi_comm_world, status, error)
if (error .ne. MPI_success) then
call io_error('Error in comms_recv_real')
end if
#endif
return
end subroutine comms_recv_real