nb_max_allreduce_real_array Subroutine

private subroutine nb_max_allreduce_real_array(a, request)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
real, intent(inout), dimension (:) :: a
integer, intent(out) :: request

Contents


Source Code

  subroutine nb_max_allreduce_real_array (a, request)
    implicit none
    real, dimension (:), intent (in out) :: a
    integer, intent (out) :: request
# ifdef MPI3
    integer :: ierror
!$OMP MASTER
    call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
    call mpi_iallreduce &
         (MPI_IN_PLACE, a, size(a), mpireal, MPI_MAX, mp_comm, request, ierror)
!$OMP MASTER
    call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
# else
    call max_allreduce(a)
    request = mp_request_null
# endif
  end subroutine nb_max_allreduce_real_array