<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 8, 2017 at 4:52 AM, Vaclav Hapla <span dir="ltr"><<a href="mailto:vaclav.hapla@erdw.ethz.ch" target="_blank">vaclav.hapla@erdw.ethz.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> 8. 11. 2017 v 9:06, Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com">dalcinl@gmail.com</a>>:<br>
<span class="">><br>
> On 8 November 2017 at 05:51, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
>><br>
>>> On Nov 7, 2017, at 1:33 AM, Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com">dalcinl@gmail.com</a>> wrote:<br>
>>><br>
>>> The only concern I have about PetscPartitioner is that the API depends<br>
>>> on DM (PetscPartitionerPartition_<<wbr>TYPE> routines). Maybe<br>
>>> PetscPartitioner should eventually move to became more agnostic, and<br>
>>> that way it can be used to partition matrices and meshes.<br>
>><br>
>> This is certainly a serious flaw if PetscPartitioner is intended as THE API to use for partitioning. If it is not intended as THE API for partitioning then that is also a problem, because why have multiple APIs for what is essentially one set of abstractions.<br>
>><br>
><br>
> Note however that things looks easy to refactor. I'll try to team up<br>
> with Matt to improve things.<br>
<br>
</span>Wait, now we are at the beginning again. I actually wanted to do some refactoring of PetscPartitioner, starting with few cosmetic changes to make it better settable from options. But Barry kept me back of any edits since he think it's anti-systematic to keep two independent classes doing essentially the same. And I agree with that to be honest. It's strange to have two ParMetis, two Scotch and two whatever interfaces. The only thing I don't like on MatPartitioning is its name as it's not just for Mat Partitioning :-)<br>
<br>
There are from my point of view multiple issues with PetscPartitioner. Let's look e.g. at PetscPartitionerPartition. It takes as arguments both PetscPartitioner and DM. This DM must be in fact DMPlex which is not checked so it will probably crash somewhere deep in the stack once the first DMPlex specific line is reached. Then there are two output arguments PetscSection partSection and IS *partition. The first must be created beforehand while the second is created inside. And I guess they must keep the same basic information just in two different forms.<br>
<br>
Actually the original problem I wanted to solve is that src/dm/impls/plex/examples/<wbr>tutorials/ex5.c fails with partitioner set to PETSCPARTITIONERPARMETIS for certain numbers of processes, see below. Let me start with pull request altering ex5.c so that partitioner type can be set from options properly and this bug can be reproduced easily.<br>
[ 0] ***ASSERTION failed on line 176 of file /scratch/petsc-dev/arch-linux-<wbr>gcc-salvus/externalpackages/<wbr>git.parmetis/libparmetis/comm.<wbr>c: j == nnbrs<br>
[ 2] ***ASSERTION failed on line 176 of file /scratch/petsc-dev/arch-linux-<wbr>gcc-salvus/externalpackages/<wbr>git.parmetis/libparmetis/comm.<wbr>c: j == nnbrs<br>
ex5: /scratch/petsc-dev/arch-linux-<wbr>gcc-salvus/externalpackages/<wbr>git.parmetis/libparmetis/comm.<wbr>c:176: libparmetis__CommSetup: Assertion `j == nnbrs' failed.<br>
ex5: /scratch/petsc-dev/arch-linux-<wbr>gcc-salvus/externalpackages/<wbr>git.parmetis/libparmetis/comm.<wbr>c:176: libparmetis__CommSetup: Assertion `j == nnbrs' failed.<br></blockquote><div><br></div><div>Okay, it would be great to get a test base and knock this one out.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm wondering whether the MatPartitioning interface has the same problem. But anyhow I mean it's maybe time to decide about the two interfaces before chasing all these PetscPartitioner issues.<br>
<br>
I propose<br>
- to rename Mat Partitioning to just Partitioning/-er or take over the name PetscPartitioner,<br>
- what is now PetscPartitioner would be MeshPartitioning/-er and it would become sort of adapter from DMPlex meshes to general graphs so that the more general class above can be employed.<br>
<br>
Note that I created an issue request as Barry suggested (#192) but there's no feedback yet.<br>
<br>
Note my top level intention is to chip in some more distributed mesh loaders - currently there's only one for Salome/MED format which is rather non-standard and not much documented.<br>
<br>
Thanks<br>
<span class="HOEnZb"><font color="#888888"><br>
Vaclav<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
><br>
> --<br>
> Lisandro Dalcin<br>
> ============<br>
> Research Scientist<br>
> Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)<br>
> Extreme Computing Research Center (ECRC)<br>
> King Abdullah University of Science and Technology (KAUST)<br>
> <a href="http://ecrc.kaust.edu.sa/" rel="noreferrer" target="_blank">http://ecrc.kaust.edu.sa/</a><br>
><br>
> 4700 King Abdullah University of Science and Technology<br>
> al-Khawarizmi Bldg (Bldg 1), Office # 0109<br>
> Thuwal 23955-6900, Kingdom of Saudi Arabia<br>
> <a href="http://www.kaust.edu.sa" rel="noreferrer" target="_blank">http://www.kaust.edu.sa</a><br>
><br>
> Office Phone: <a href="tel:%2B966%2012%20808-0459" value="+966128080459">+966 12 808-0459</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><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.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>