[petsc-dev] IS block size meaning
Smith, Barry F.
bsmith at mcs.anl.gov
Tue Aug 14 16:02:09 CDT 2018
I am ok with "changing" the meaning of blocksize for IS since it appears to have been already changed :-)
I have approved the pull request.
Barry
I am not sure that turning the IS into an "integer" Vec was necessary or good but I guess we are stuck with it now.
> On Aug 14, 2018, at 4:31 AM, Vaclav Hapla <vaclav.hapla at erdw.ethz.ch> wrote:
>
> Hello
>
> I would like to move the discussion from the PR https://bitbucket.org/petsc/petsc/pull-requests/1076/fix-issetblocksize_general because it's quite a general concern.
>
> It's about the meaning of block size for IS.
>
> Barry thinks that IS block size is something completely different than Vec block size:
> Blocked IS "consists of continous runs of entries where the first entry of a run is divisible by the bs so for example: for a block size of 2 the IS 0 1 4 5 10 11 is a block IS. 0 1 3 5 10 11 does not have a block size. Another way of looking at it is that a ISGeneral with a given blocksize can be converted to a ISCreateBlock() while other ISs are not (except with the trivial block size of 1)."
>
> Barry originally wanted to enforce this property for ISGENERAL. But I say it's only checked in ISSetBlockSize_General() under PETSC_DEBUG and only if indices are set before (see the PR description and diff), and from documentation it’s also not really obvious. There is otherwise nothing which would prevent one from breaking the "block-wise contiguity" requirement.
>
> At least Matt and other contributors to HDF5 IO for IS and DMPlex (including me) grasped the same meaning of "blocksize" as Vec has without that additional requirement. In this context, it's used just as an "integer vector". For instance, in the dataset /viz/topology/cells in DMPlex HDF5 IO each block is an element and each entry is a vertex index.
>
> My opinion is that if anybody wants to have IS with Barry's original meaning of "blocked", they can just use ISCreateBlock() which really enforces "block-wise contiguity" by API and data structure. There could be also an additional standalone function ISCheckBlockwiseContiguous() with the same checking code as is currently in ISSetBlockSize_General().
>
> On the other hand, if I’m thinking about any alternative, it could perhaps be PetscSection. But it would be quite some manpower to implement PetscSection IO and employ it in DMPlex IO. And I'm not sure about the worth of the outcome for users.
>
> Opinions?
>
> Vaclav
More information about the petsc-dev
mailing list