[petsc-dev] API changes in MatIS

Jed Brown jedbrown at mcs.anl.gov
Tue May 8 13:14:15 CDT 2012


On Tue, May 8, 2012 at 11:05 AM, Stefano Zampini
<stefano.zampini at gmail.com>wrote:

> Not since now. I think it is were such an approach belongs, apart from the
> fact that PCREDISTRIBUTE is not so visible from a standard user's
> perspective (as me). I think I can put my code in PCSetUp_REDISTRIBUTE,
> Adding . If I understood pcredistribute, I should do from the higher level
> something like
>
> MatCreateIS(A)
> KSPCreate(true_ksp)
> KSPSetOperators(true_ksp,A,A)
> KSPSetType(true_ksp,KSPPREONLY)
> KSPGetPC(true_ksp,red_pc)
> PCSetType(red_pc,PC_REDISTRIBUTE)
> KSPSetup(true_ksp)
>

This KSPSetUp() need not be called explicitly.


>
> KSPSolve(true_ksp,b,x)
>
> I didn't understand the "diagonal portion" stuff.
>

It's common for people to just "zero" rows that correspond to Dirichlet
boundary conditions. This eliminates those trivial equations. It is the
place that I think we should put other redistribution (we can have variants
that are more or less aggressive).


> Load balancing is assured if you come from a Mesh partitioner which does
> it for you. For communications costs, optimizing the global ordering of a
> MATIS object is not so simple. In principle you have more local dofs than
> that stored in the local part of the  global vector you own. With my code
> (I've tested it on structured grids) I've always observed more than 80% of
> the whole number of global dofs assigned to the process to which they
> belong in the local representation of MATIS (mostly INTERNAL nodes). As an
> example, a usual Natural ordering for structured grids counts to about 1%.
>

I thought a fairly natural thing is to partition elements and then
distribute vertex ownership to the owner of an element that touches, for
approximate vertex balance. Multi-objective partitioning is also possible.
I just think that for good assembly efficiency, this is something that
should be done earlier. It's fine to also support doing it later, but the
semantics have to be consistent.


> I didn't used DM so far. How can you set up a DM for a MATIS object?
>

DM manages geometric and problem-specific information. The most commonly
used implementation of DM is DMDA which does logically structured grids. To
support MATIS, you would look at DMCreateMatrix_DA().


> So, for the smoother something like the hybrid approach proposed here
> http://www.cs.nyu.edu/cs/faculty/widlund/ijnme_submit_revision_ijnme.pdf ?


It could use that, but I think/hope that less will be required since the
only thing lacking is accounting for error in the multilevel decomposition,
not the spatial decomposition.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120508/1d26ad32/attachment.html>


More information about the petsc-dev mailing list