#include "petscvec.h" PetscErrorCode VecScatterCreate(Vec xin,IS ix,Vec yin,IS iy,VecScatter *newctx)Collective on Vec
xin | - a vector that defines the shape (parallel data layout of the vector) of vectors from which we scatter | |
yin | - a vector that defines the shape (parallel data layout of the vector) of vectors to which we scatter | |
ix | - the indices of xin to scatter (if NULL scatters all values) | |
iy | - the indices of yin to hold results (if NULL fills entire vector yin) |
Options Database Keys: (uses regular MPI_Sends by default)
--When packing is used--
MPI Datatypes (no packing) sendfirst merge packtogether persistent*
_nopack _sendfirst _merge _packtogether -vecscatter_
----------------------------------------------------------------------------------------------------------------------------
Message passing Send p X X X always
Ssend p X X X always _ssend
Rsend p nonsense X X always _rsend
AlltoAll v or w X nonsense always X nonsense _alltoall
MPI_Win p nonsense p p nonsense _window
Since persistent sends and receives require a constant memory address they can only be used when data is packed into the work vector
because the in and out array may be different for each call to VecScatterBegin/End().
p indicates possible, but not implemented. X indicates implemented
Currently the MPI_Send(), MPI_Ssend() and MPI_Rsend() all use PERSISTENT versions. (this unfortunately requires that the same in and out arrays be used for each use, this is why when not using MPI_alltoallw() we always need to pack the input into the work array before sending and unpack upon receeving instead of using MPI datatypes to avoid the packing/unpacking).
Both ix and iy cannot be NULL at the same time.