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