MPIU_Scatterv#
A replacement for MPI_Scatterv() that can be called with PetscInt types when PETSc is built for either 32-bit indices or 64-bit indices.
Synopsis#
#include <petscsys.h>
PetscMPIInt MPIU_Scatterv(const void *sendbuf, const PetscInt sendcounts[], const PetscInt displs[], MPI_Datatype sendtype, void *recvbuf, PetscInt recvcount, MPI_Datatype recvtype, PetscMPIInt root, MPI_Comm comm)
Collective
Input Parameters#
- sendbuf - address of send buffer 
- sendcounts - non-negative - PetscIntarray (of length- commgroup size) specifying the number of elements to send to each MPI process
- displs - - PetscIntarray (of length- commgroup size). Entry i specifies the displacement (relative to- sendbuf) from which to take the outgoing data to process i
- sendtype - data type of - sendbufelements
- recvcount - number of elements in - recvbuf(non-negative integer)
- recvtype - data type of - recvbufelements
- root - Rank of the MPI root process, which will dispatch the data to scatter 
- comm - - MPI_Commcommunicator
Output Parameter#
- recvbuf - the resulting scattered values on this MPI process 
Notes#
Should be wrapped with PetscCallMPI() for error checking
This is different than most of the MPIU_ wrappers in that all the count arguments are in PetscInt
See Also#
PETSc and standard datatypes, MPI_Allreduce(), MPIU_Gatherv()
Level#
developer
Location#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages