sum_allreduce_sub_integer_array Subroutine

private subroutine sum_allreduce_sub_integer_array(i, sub_comm)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), dimension (:) :: i
integer, intent(in) :: sub_comm

Contents


Source Code

  subroutine sum_allreduce_sub_integer_array (i,sub_comm)
    implicit none
    integer, dimension (:), intent (in out) :: i
    integer, intent(in) :: sub_comm
# ifdef MPI
    integer :: ierror
!$OMP MASTER
    call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
    call mpi_allreduce &
         (MPI_IN_PLACE, i, size(i), MPI_INTEGER, MPI_SUM, sub_comm, ierror)
!$OMP MASTER
    call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
# else
    UNUSED_DUMMY(sub_comm); UNUSED_DUMMY(i)
# endif
  end subroutine sum_allreduce_sub_integer_array