[petsc-users] Load balancing / redistributing a 1D DM

Matthew Knepley knepley at gmail.com
Mon Mar 5 09:11:31 CST 2018


On Mon, Mar 5, 2018 at 9:55 AM, Åsmund Ervik <Asmund.Ervik at sintef.no> wrote:

> Hmm, there's many elements to consider here. Learning to use Plex might be
> a better use of my time than setting up and maintaining a custom DMDA
> repartitioning. But DMDAs are a more natural fit to what I want to do...
>
> However, I'm not in a huge rush to do this immediately. Can I ping you
> back some time next week, Matt, to ask more about details on how to use
> Plex for this case? (e.g. what is the Plex equivalent of
> DMDAVecGetArrayF90?) Enjoy Japan.
>

Yep. Jed is correct that the kind of adjacency in DA is quite unnatural in
Plex. Things could be done to make this better, but they are not being done
now.
However, this is not the case in 1D, where you can easily get neighbors and
2nd neighbors in the right order.

We can talk about it after SIAM PP.

  Thanks,

     Matt


> Regards,
> Åsmund
>
> > -----Original Message-----
> > From: Jed Brown [mailto:jed at jedbrown.org]
> > Sent: Monday, March 5, 2018 3:48 PM
> > To: Matthew Knepley <knepley at gmail.com>; Tobin Isaac
> > <tisaac at cc.gatech.edu>
> > Cc: Dave May <dave.mayhem23 at gmail.com>; Åsmund Ervik
> > <Asmund.Ervik at sintef.no>; petsc-users at mcs.anl.gov
> > Subject: Re: [petsc-users] Load balancing / redistributing a 1D DM
> >
> > Matthew Knepley <knepley at gmail.com> writes:
> >
> > > On Mon, Mar 5, 2018 at 9:01 AM, Tobin Isaac <tisaac at cc.gatech.edu>
> > wrote:
> > >
> > >> This is a somewhat incomplete description of the steps in linear
> > >> partitioning.  The rest can be accomplished with PetscSF calls, but I
> > >> should wrap it up in a PetscPartitioner because it's a mistake-prone
> > >> operation.
> > >>
> > >
> > > Jed likes to do everything by hand because it is transparent, but then
> > > you become the maintainer.
> > > I think this is easy to do in Plex, and we maintain the code. It is
> > > less transparent, which is the tradeoff.
> >
> > DMDA gives you direct indexing of neighbors, second neighbors, etc.
> > DMPlex doesn't ensure that, though you could configure a DMPlex to sort
> > vertices according to a particular convention.  I don't know whether that
> > convention would be preserved on repartitioning/redistribution.
> >
> > With your very expensive material models, indirect indexing wouldn't be a
> > performance issue, but still may impact readability.
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180305/93456632/attachment.html>


More information about the petsc-users mailing list