Send real array from root node to all nodes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | array | |||
integer, | intent(in) | :: | size |
subroutine comms_bcast_real(array, size)
!! Send real array from root node to all nodes
implicit none
real(kind=dp), intent(inout) :: array
integer, intent(in) :: size
#ifdef MPI
integer :: error
call MPI_bcast(array, size, MPI_double_precision, root_id, mpi_comm_world, error)
if (error .ne. MPI_success) then
call io_error('Error in comms_bcast_real')
end if
#endif
return
end subroutine comms_bcast_real