[petsc-dev] petsc-dev post from tabrezali at gmail.com requires approval

Lisandro Dalcin dalcinl at gmail.com
Wed Aug 28 03:35:57 CDT 2019


On Wed, 28 Aug 2019 at 06:45, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:

>
>
> > On Aug 27, 2019, at 3:27 AM, Matthew Knepley <knepley at gmail.com> wrote:
> >
> > On Tue, Aug 27, 2019 at 4:11 AM Lisandro Dalcin <dalcinl at gmail.com>
> wrote:
> > On Mon, 26 Aug 2019 at 21:26, Smith, Barry F. <bsmith at mcs.anl.gov>
> wrote:
> >
> >
> > > On Aug 26, 2019, at 10:11 AM, Lisandro Dalcin <dalcinl at gmail.com>
> wrote:
> > >
> > >
> > >
> > > On Sun, 25 Aug 2019 at 18:37, Smith, Barry F. via petsc-dev <
> petsc-dev at mcs.anl.gov> wrote:
> > >
> > >    Metis is installed.
> > >
> > > 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)
> > >
> > >     Since metis is not used by PETSc we don't set the PETSC_HAVE_METIS
> flag because PETSc doesn't need it.
> > >
> > >
> > > 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.
> >
> >    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.
> >
> >
> > Sorry, maybe I was not clear enough.
> >
> > The DMPlex code I'm talkinga about uses both ParMETIS and METIS,
> depending on the input graph being sequential or parallel.
> >
> https://gitlab.com/petsc/petsc/blob/master/src/dm/impls/plex/plexpartition.c#L1799
> > 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.
> > Do you still think we should change it?
> >
> > Or maybe we should use `#if defined(PETSC_HAVE_METIS) &&
> defined(PETSC_HAVE_PARMETIS)`?
> >
> > Anything to add, Matthew?
> >
> > 1) I think we turn on PETSC_HAVE_METIS
> >
> > 2) I think we leave the guard as PARMETIS since we need it for the
> parallel case and it implies Metis
>
>    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?
>
>
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.

-- 
Lisandro Dalcin
============
Research Scientist
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190828/503d1674/attachment.html>


More information about the petsc-dev mailing list