<div class="gmail_quote">On Mon, Mar 26, 2012 at 14:15, Dag Sverre Seljebotn <span dir="ltr"><<a href="mailto:d.s.seljebotn@astro.uio.no">d.s.seljebotn@astro.uio.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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).</blockquote>
</div><div><br></div>IS is abstract, it doesn't have to enumerate every entry.<div><br><div><a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/IS/ISCreateStride.html">http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/IS/ISCreateStride.html</a></div>
<div><a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/IS/ISCreateBlock.html">http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/IS/ISCreateBlock.html</a></div><div><br></div><div><br></div><div>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.</div>
</div>