<div dir="ltr"><div dir="ltr">On Mon, Aug 19, 2019 at 9:43 AM Lawrence Mitchell <<a href="mailto:wence@gmx.li">wence@gmx.li</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, 19 Aug 2019 at 13:53, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
<br>
[...]<br>
<br>
>> OK, so I think I am getting there. Presently I am abusing<br>
>> DMPlexCreateFromDAG to migrate a DM on oldComm onto newComm, but this<br>
>> is very fragile. I attach what I have right now. You have to run it<br>
>> with PTSCOTCH, because parmetis refuses to partition graphs with no<br>
>> vertices on a process.: again, this would be avoided if the<br>
>> partitioning was done on a source communicator with a number of<br>
>> partitions given by a target communicator, anyway.<br>
><br>
><br>
> Sorry I am just getting to this. Its a great example. I was thinking of just pushing this stuff in the library, but<br>
> I had the following thought. What if we reused DMClone() to stick things on another Comm, since we do<br>
> not actually want a copy. The internals would then have to contend with a NULL impl, which might be a lot<br>
> of trouble. I was going to try it out in a branch. It seems more elegant to me.<br>
<br>
If you want to start from some (slightly more debugged code). Use<br>
wence/feature/dmplex-distribute-onto-comm<br>
<br>
I think if the internals of DMDistribute are going to be refactored to<br>
contend with a NULL implementation, then I think we should go the<br>
whole hog and disconnect the number of target partitions from the<br>
communicator of the to-be-distributed DM.<br></blockquote><div><br></div><div>Hmm, that is nicer. We just allow a Comm argument to Distribute, and underneath</div><div>it works like your example.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Lawrence<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>