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
PetscInt
array (of lengthcomm
group size) specifying the number of elements to send to each MPI processdispls -
PetscInt
array (of lengthcomm
group size). Entry i specifies the displacement (relative tosendbuf
) from which to take the outgoing data to process isendtype - data type of
sendbuf
elementsrecvcount - number of elements in
recvbuf
(non-negative integer)recvtype - data type of
recvbuf
elementsroot - Rank of the MPI root process, which will dispatch the data to scatter
comm -
MPI_Comm
communicator
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