<div dir="ltr">Thanks, Vaclav and Barry,<div><br></div><div>I will be keeping using MatPartitioning interface.</div><div><br></div><div>Fande,</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 20, 2018 at 2:29 PM Hapla Vaclav <<a href="mailto:vaclav.hapla@erdw.ethz.ch">vaclav.hapla@erdw.ethz.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, MatPartitioning is a much more general thing and should stay in PETSc in long term. PetscPartitioner works just with DMPlex. My PETSCPARTITIONERMATPARTITIONING is a wrapper of MatPartitioner into PetscPartitioner so any MatPartitioning can already be used also for DMPlex. Hence, it also shows that this class is really redundant.<br>
<br>
It was my first contribution in this direction and then I had to switch to other topics for several months. However, I'm still interested in it although it's not a thing I could do full time. I will look at it and think about a next achievable step.<br>
<br>
Fande, if you build on MatPartitioning, you do it right and keep going this way.<br>
<br>
Vaclav<br>
<br>
> 20. 11. 2018 v 18:26, Smith, Barry F. via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>>:<br>
> <br>
> <br>
> MatPartitioning is the future. It is just a question of stripping out the PetscPartitioner and replacing it with the MatPartitioner. Yes, once this was determined we lost interest in actually doing the work of stripping it out.<br>
> <br>
> <br>
> Barry<br>
> <br>
> <br>
>> On Nov 20, 2018, at 11:12 AM, Fande Kong via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>> wrote:<br>
>> <br>
>> I was wondering what is the conclusion on this?<br>
>> <br>
>> PetscPartitioner and MatPartitioning, which one will be kept? There is the code duplication. I am asking because I an working on a hierarchical partitioning based MatPartitioning Interface and we also use MatPartitioning Interface in MOOSE to access all external partitioners.<br>
>> <br>
>> Just want to make sure I am using the right partitioning interface.<br>
>> <br>
>> Thanks,<br>
>> <br>
>> Fande,<br>
>> <br>
>> <br>
>> <br>
>> On Thu, Dec 7, 2017 at 8:33 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
>> On Thu, Dec 7, 2017 at 10:26 AM, Vaclav Hapla <<a href="mailto:vaclav.hapla@erdw.ethz.ch" target="_blank">vaclav.hapla@erdw.ethz.ch</a>> wrote:<br>
>> <br>
>> <br>
>>> 9. 11. 2017 v 12:53, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>:<br>
>>> <br>
>>> I think I need to create a proof-of-concept. I would start by employing MatPartitioning in PetscPartitionerPartition with anything outside of this function untouched for now (as already suggested in #192), if you agree.<br>
>>> <br>
>>> Or what about implementing a special temporary PetscPartitioner implementation wrapping MatPartitioning?<br>
>>> PETSCPARTITIONERMATPARTITIONING sounds crazy, though :) But could be a good starting point.<br>
>>> <br>
>>> This is probably easier, and allows nice regression testing, namely run all tests using EXTRA_OPTIONS="-petscparitioner_type matpartitioning". I think<br>
>>> that should be alright for correctness. There are some parallel redistribution tests in Plex.<br>
>>> <br>
>>> We will need at least one performance regression. Look at how I do it here:<br>
>>> <br>
>>> <a href="https://bitbucket.org/petsc/petsc/src/312beb00c9b3e1e8ec8fac64a948a1af779da02f/src/dm/impls/plex/examples/tests/ex9.c?at=master&fileviewer=file-view-default" rel="noreferrer" target="_blank">https://bitbucket.org/petsc/petsc/src/312beb00c9b3e1e8ec8fac64a948a1af779da02f/src/dm/impls/plex/examples/tests/ex9.c?at=master&fileviewer=file-view-default</a><br>
>>> <br>
>>> You can make custom events, directly access the times, and compare. You could run the two versions<br>
>>> and check for degradation for a sequence of meshes in parallel.<br>
>>> <br>
>>> Thanks,<br>
>>> <br>
>>> Matt<br>
>> <br>
>> I have made some progress in this, see <a href="https://bitbucket.org/haplav/petsc/branch/haplav/feature-petscpartitionermatpartitioning" rel="noreferrer" target="_blank">https://bitbucket.org/haplav/petsc/branch/haplav/feature-petscpartitionermatpartitioning</a><br>
>> There's a new test ex23 which shows basically that<br>
>> -petscparitioner_type parmetis<br>
>> and<br>
>> -petscparitioner_type matpartitioning -mat_partitioning_type parmetis<br>
>> give exactly the same results.<br>
>> <br>
>> I have not created a PR yet since the regression testing you propose fails in some cases. When running<br>
>> make -f gmakefile.test test EXTRA_OPTIONS="-petscpartitioner_type matpartitioning -options_left 0" search='dm_impls_plex_tests%'<br>
>> it seems majority of tests pass but e.g. dm_impls_plex_tests-ex7_7 fails since its reference output has been saved for -petscpartitioner_type simple. How to deal with that, please?<br>
>> <br>
>> Ignore the ones with simple. I think all the SNES tests are now simple, so for ex12, ex62, and ex77 can you just do a few runs<br>
>> and confirm that both ways give the same results?<br>
>> <br>
>> Thanks,<br>
>> <br>
>> Matt<br>
>> <br>
>> As can be seen in my PetscPartitionerPartition_MatPartitioning, the needed manipulations with IS are slightly more complicated than what I inferred from the Jed's comments. But still just the existing IS methods suffice. See <a href="http://bitbucket.org/haplav/petsc/src/ab7d5f43fd87d1d57b51b6e7ff8de0ef3e904673/src/dm/impls/plex/petscpartmatpart.c?at=haplav%2Ffeature-petscpartitionermatpartitioning#petscpartmatpart.c-92" rel="noreferrer" target="_blank">bitbucket.org/haplav/petsc/src/ab7d5f43fd87d1d57b51b6e7ff8de0ef3e904673/src/dm/impls/plex/petscpartmatpart.c?at=haplav%2Ffeature-petscpartitionermatpartitioning#petscpartmatpart.c-92</a><br>
>> <br>
>> Vaclav<br>
>> <br>
>> <br>
>> <br>
>> -- <br>
>> 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<br>
>> <br>
>> <a href="https://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
> <br>
<br>
</blockquote></div>