broadcast_character_array Subroutine

private subroutine broadcast_character_array(char)

FIXME : Add documentation

An array of characters, each of same length

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout), dimension(:) :: char

Contents


Source Code

  subroutine broadcast_character_array (char)
    implicit none
    character(len = *), dimension(:), intent (in out) :: char
# ifdef MPI
    integer :: ierror
!$OMP MASTER
    call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
    call mpi_bcast (char, size(char) * len(char(1)), MPI_CHARACTER, 0, mp_comm, ierror)
!$OMP MASTER
    call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
# else
    if (.false.) write(*,*) char
# endif
  end subroutine broadcast_character_array