[petsc-dev] PetscLayoutSetWeights?

Jed Brown jedbrown at mcs.anl.gov
Mon Sep 23 14:06:29 CDT 2013


If the row lengths are not uniform, the threadcomm implementations of
MatMult and such should be able to partition by some other metric, most
obviously, the nonzeros.  Since we currently keep thread offsets in
PetscLayout, this is an obvious place to put it.  To start the
discussion, consider this interface where there is one integer-valued
weight per block (set via PetscLayoutSetBlockSize).

PetscErrorCode PetscLayoutSetWeights(PetscLayout,const PetscInt[],PetscCopyMode);

Reasonable?  Should we allow PetscLayoutGetWeights to be implementable?
If so, we have to make a copy of the integer weights.  If not, we can
pledge to discard our reference in PetscLayoutSetUp and then the caller
(e.g., MatSeqAIJSetPreallocation_SeqAIJ) can just pass its const
PetscInt[] along rather than needing to make a copy.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130923/f21f259c/attachment.sig>


More information about the petsc-dev mailing list