FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension (:,:) | :: | z | ||
integer, | intent(in) | :: | dest | |||
type(comm_type), | intent(in) | :: | sub |
subroutine sum_reduce_complex_2array_sub (z, dest, sub)
implicit none
complex, dimension (:,:), intent (in out) :: z
integer, intent (in) :: dest
type(comm_type), intent(in) :: sub
# ifdef MPI
integer :: ierror
!$OMP MASTER
call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
if(sub%iproc.eq.dest) then
call mpi_reduce &
(MPI_IN_PLACE, z, size(z), mpicmplx, MPI_SUM, dest, sub%id, ierror)
else
call mpi_reduce &
(z, z, size(z), mpicmplx, MPI_SUM, dest, sub%id, ierror)
endif
!$OMP MASTER
call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
# else
UNUSED_DUMMY(z); UNUSED_DUMMY(sub)
if (dest /= 0) call mp_abort ("reduce to")
# endif
end subroutine sum_reduce_complex_2array_sub