Hybrid cpp split mirrors src/parallel_reductions.F90 and
src/solution_gather.F90: MS-MPI ships only the legacy use mpi
module; OpenMPI ships both and we prefer mpi_f08 for strong typing.
Gather (neq, n_local) slices from every rank into (neq, n_global)
on rank 0 via MPI_Gatherv. On non-root ranks gather_buf is not
accessed; pass a (neq, 0) sentinel allocation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | local_field(:,:) | |||
| integer, | intent(in) | :: | n_local | |||
| type(decomp_t), | intent(in) | :: | decomp | |||
| real(kind=wp), | intent(inout) | :: | gather_buf(:,:) |
Scatter (neq, n_global) on rank 0 into per-rank (neq, n_local)
slices via MPI_Scatterv. On non-root ranks gather_buf is not
accessed; pass a (neq, 0) sentinel allocation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | gather_buf(:,:) | |||
| type(decomp_t), | intent(in) | :: | decomp | |||
| real(kind=wp), | intent(inout) | :: | local_field(:,:) | |||
| integer, | intent(in) | :: | n_local |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(decomp_t), | intent(in) | :: | decomp | |||
| integer, | intent(out), | allocatable | :: | counts(:) | ||
| integer, | intent(out), | allocatable | :: | displs(:) |