[petsc-dev] ISRestoreNonlocalIS?

Jed Brown jed at 59A2.org
Thu Nov 18 14:15:32 CST 2010


What is going on here?  If IS is caching this nonlocal stuff, then every
function causing mutation (e.g. ISGeneralSetIndices, and a few others) needs
to be visited and made to discard the gathered and nonlocal caches.  But I
think this whole idea is just dangerous and abuses the IS.  The user can
always do ISAllGather if they really want everything, and it's potentially
cheaper than this new ISGetTotalIndices because it can maintain ISStride or
ISBlock structure.  If you want all the indices, use ISAllGather and then
ISGetIndices, it will cost the same and then the user has explicit control
over when to free this memory.  In principle, ISGetNonlocalIS could be
implemented to avoid the intermediate storage of ISAllGather followed by
ISDifference, but it's not currently done this way and currently both copies
are cached so they have to both exist, and since the IS is managing
ownership of this other nonlocal IS, you can't keep the nonlocal part.

I just don't understand the point of all these new functions, they feel like
an inferior interface to something that is currently available.

Same question for ISAllGatherIndices which has been around for a long time.
 It looks to me like the user can do ISCreateGeneral(), ISAllGather(),
ISGetIndices() to achieve exactly the same thing (no performance
difference).  Why even call it IS when no IS (or PETSc object of any kind is
used by this function)?  It is never used in PETSc.

Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101118/7098ba0b/attachment.html>


More information about the petsc-dev mailing list