各rankが values の自分の区間 (displacements(rank+1)+1 から counts(rank+1) 要素) を持ち寄り、
全rankで values の全区間を揃える。非MPIまたは単一rankでは何もしない。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx | |||
| real(kind=dp), | intent(inout) | :: | values(*) | |||
| integer(kind=i32), | intent(in) | :: | counts(:) | |||
| integer(kind=i32), | intent(in) | :: | displacements(:) |
subroutine mpi_allgatherv_inplace_real_dp(ctx, values, counts, displacements) type(mpi_context), intent(in) :: ctx real(dp), intent(inout) :: values(*) integer(i32), intent(in) :: counts(:), displacements(:) #ifdef USE_MPI integer :: ierr if (.not. ctx%enabled .or. ctx%size <= 1_i32) return call MPI_Allgatherv( & MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, values, int(counts), int(displacements), MPI_DOUBLE_PRECISION, & MPI_COMM_WORLD, ierr & ) #endif end subroutine mpi_allgatherv_inplace_real_dp