<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 28 Aug 2019 at 06:45, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Aug 27, 2019, at 3:27 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
> <br>
> On Tue, Aug 27, 2019 at 4:11 AM Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com" target="_blank">dalcinl@gmail.com</a>> wrote:<br>
> On Mon, 26 Aug 2019 at 21:26, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>> wrote:<br>
> <br>
> <br>
> > On Aug 26, 2019, at 10:11 AM, Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com" target="_blank">dalcinl@gmail.com</a>> wrote:<br>
> > <br>
> > <br>
> > <br>
> > On Sun, 25 Aug 2019 at 18:37, Smith, Barry F. via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>> wrote:<br>
> > <br>
> >    Metis is installed. <br>
> > <br>
> > config/PETSc/Configure.py:        self.addDefine('HAVE_'+i.PACKAGE.replace('-','_'), 1)  # ONLY list package if it is used directly by PETSc (and not only by another package)<br>
> > <br>
> >     Since metis is not used by PETSc we don't set the PETSC_HAVE_METIS flag because PETSc doesn't need it.<br>
> > <br>
> > <br>
> > This is not true, in DMPlex we have an explicit call to METIS_PartGraphKway(). Of course, this code is protected with just HAVE_PARMETIS, because if you have parmetis, then you have metis.<br>
> <br>
>    Hmm, I think is should be protected with HAVE_METIS. There is nothing that says PETSc can only be built with metis plus parmetis; it could be built with just metis.<br>
> <br>
> <br>
> Sorry, maybe I was not clear enough. <br>
> <br>
> The DMPlex code I'm talkinga about uses both ParMETIS and METIS, depending on the input graph being sequential or parallel. <br>
> <a href="https://gitlab.com/petsc/petsc/blob/master/src/dm/impls/plex/plexpartition.c#L1799" rel="noreferrer" target="_blank">https://gitlab.com/petsc/petsc/blob/master/src/dm/impls/plex/plexpartition.c#L1799</a><br>
> So this code requires ParMETIS, and if you have it, then you have METIS, the a HAVE_METIS check seems a bit redundant to me.<br>
> Do you still think we should change it?<br>
> <br>
> Or maybe we should use `#if defined(PETSC_HAVE_METIS) && defined(PETSC_HAVE_PARMETIS)`?<br>
> <br>
> Anything to add, Matthew?<br>
> <br>
> 1) I think we turn on PETSC_HAVE_METIS<br>
> <br>
> 2) I think we leave the guard as PARMETIS since we need it for the parallel case and it implies Metis<br>
<br>
   If this line was protected with  #if defined(PETSC_HAVE_METIS) and PETSc was not installed with ParMetis, but only Metis would the code run correctly? Or is it somehow that even though you are only using metis here you still need parmetis? For what reason?<br>
<br></blockquote><div><br></div><div>With some code changes, it would be possible to support PETSc with METIS and no ParMETIS, but that would only cover a special (though frequent) case (partitioning an initially sequential mesh), and the PetscPartitioner type name is "parmetis", so that would be confusing. I think it is not really worth it to make these changes.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div>