[petsc-users] Repacking/scattering of multi-dimensional arrays
Jed Brown
jedbrown at mcs.anl.gov
Mon Mar 26 14:22:52 CDT 2012
On Mon, Mar 26, 2012 at 14:15, Dag Sverre Seljebotn <
d.s.seljebotn at astro.uio.no> wrote:
> The problem with VecScatter is that it requires indexing all elements,
> which can be rather wasteful in some situations. So I'm wondering if
> VecScatter could potentially work with elements of any size, so that one
> could send a bunch of elements (a picture of this is only indexing rows of
> a row-major 2D array, thus amortizing the indexing overhead and memory use
> by the number of columns).
IS is abstract, it doesn't have to enumerate every entry.
http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/IS/ISCreateStride.html
http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/IS/ISCreateBlock.html
As Matt says, PetscSF has a similarly convenient API (although somewhat
lower level), but is more flexible. It requires MPI-2 right now because it
uses one-sided communication (low setup cost), but I plan to write an
implementation over point-to-point so that it would have similar
flexibility to in which MPI calls actually get used.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120326/e8f8fbb9/attachment.htm>
More information about the petsc-users
mailing list