scatter_field_from_root Subroutine

public subroutine scatter_field_from_root(gather_buf, decomp, local_field, n_local)

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.

Arguments

Type IntentOptional 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