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