Global sum for double precision array (DDI_GSUMF equivalent)
In-place reduction across all ranks.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | buffer(*) | |||
| integer(kind=int32), | intent(in) | :: | n |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | private, | allocatable | :: | temp(:) |
subroutine darray_gsumf(buffer, n) real(dp), intent(inout) :: buffer(*) integer(int32), intent(in) :: n real(dp), allocatable :: temp(:) allocate (temp(n)) temp = buffer(1:n) call allreduce(wrapper_comm, temp, n) buffer(1:n) = temp deallocate (temp) end subroutine darray_gsumf