32bit整数配列の総和Allreduceをin-placeで実行する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx | |||
| integer(kind=i32), | intent(inout) | :: | values(:) |
subroutine mpi_allreduce_sum_i32_array(ctx, values) type(mpi_context), intent(in) :: ctx integer(i32), intent(inout) :: values(:) #ifdef USE_MPI integer :: ierr if (.not. ctx%enabled) return call MPI_Allreduce(MPI_IN_PLACE, values, size(values), MPI_INTEGER4, MPI_SUM, MPI_COMM_WORLD, ierr) #endif end subroutine mpi_allreduce_sum_i32_array