<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 17, 2016 at 12:41 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Wed, Mar 16, 2016 at 9:19 PM, Adrian Croucher <span dir="ltr"><<a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">hi<br>
<br>
I'm seeing some slightly puzzling behaviour when I set up a DMLabel on a DMPlex, then distribute the DMPlex using DMPlexDistribute().<br>
<br>
Specifically, if I make the label values unique to start with (i.e. each mesh cell has a unique value), this is no longer always the case after distribution. In some cases two cells (not ghost cells) end up with the same label value, and one of the original values goes missing.<br>
<br>
I'm running the 'next' branch.<br>
<br>
The attached minimal example shows it. In this example the label values are just the cell indices before distribution, so they're unique. There are 900 mesh cells, so if running on 2 processors, each rank gets 450 of them.<br>
<br>
If I run it using<br>
<br>
mpiexec -np 2 testlabel > out<br>
<br>
and then go<br>
<br>
grep '(45)' out<br>
<br>
I get:<br>
<br>
[0]: 0 (45)<br>
[1]: 409 (45)<br>
[1]: 450 (45)<br>
<br>
So there are 3 cells ending up with the label value 45. The first one is the one I expect to get this label value.<br>
<br>
The third one has cell index > 449, so I figure it's a ghost cell on rank 1 (actually the same cell as above on rank 0). So that's probably OK too.<br>
<br>
But I don't know where the second one has come from. Its index indicates it isn't a ghost cell.<br>
<br>
Based on how the other cells are labelled, I would expect this cell 409 on rank 1 to have label value 814. But it turns out there is no cell in the distributed mesh with that label value- even though there was before distribution (I checked).<br></blockquote><div><br></div></span><div>Yep, that looks wrong. I can reproduce what you show.</div><div><br></div><div>I setup a small test with 8 cells and everything works as expected, so this is not simple. Will track it down.</div></div></div></div></blockquote><div><br></div><div>I believe I have fixed your bug:</div><div><br></div><div> <a href="https://bitbucket.org/petsc/petsc/branch/knepley/fix-plex-distribute-label">https://bitbucket.org/petsc/petsc/branch/knepley/fix-plex-distribute-label</a></div><div><br></div><div>I merged to next, and it will get to master before the release.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> Thanks,</div><div><br></div><div> Matt</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Am I misunderstanding something or is this unexpected behaviour?<br>
<br>
Cheers, Adrian<span><font color="#888888"><br>
<br>
-- <br>
Dr Adrian Croucher<br>
Senior Research Fellow<br>
Department of Engineering Science<br>
University of Auckland, New Zealand<br>
email: <a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a><br>
tel: +64 (0)9 923 84611<br>
<br>
</font></span></blockquote></span></div><span class=""><font color="#888888"><br><br clear="all"><div><br></div>-- <br><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>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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></div>