[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: petsc interface to other packages



On Tue, 2017-11-07 at 12:07 +0100, Matteo Semplice wrote:
> 
> On 07/11/17 04:12, Drew Parsons wrote:
> > > 
> > You've got 4 options:
> > 
> > 1) scotch support is activated. scotch provides the same
> > functionality
> > as parmetis. Can you use it instead?
> 
> In principle, yes, anything better than the "simple" partitioner
> would 
> be ok for me at present. In practice, however, it does not seem to
> work.
> 
...
> Here I guess that the issue is that petsc 3.7 does not include
> scotch 
> support 
> (http://www.mcs.anl.gov/petsc/petsc-3.7/docs/manualpages/DM/PetscPart
> itionerType.html), 
> whereas 3.8 does include it.
> 
> Unless I am doing something wrong here, for this option I would need
> 3.8 
> and since this is not in debian yet, I would need to compile it
> locally 
> from source.

Annoying if it doesn't work easily.  3.7 should have scotch support
already, we'd need to debug more deeply to understand what's wrong.
Perhaps you mean specifically the PETSCPARTITIONERPTSCOTCH interface. 
3.8 is on it's way in. In the meantime you could build the debian
packages from the repo at 
https://anonscm.debian.org/cgit/debian-science/packages/petsc.git/
(experimental branch)

> > 
> > 2) scotch provides a compatibility interface that parmetis clients
> > are
> > supposed to be able to link against, see libscotchparmetis-dev.
> 
> This would be probably the best solution for stable (and testing, if
> 3.8 
> will not get into it).
> 
> I installed libscotchparmetis-dev which replaced libparmetis-dev, but
> it 
> must not be sufficient, 

Yeah, it will be the same problem actually: PETSc will need to be built
with parmetis support (even if provided by scotch).

Sadly I tested it.  petsc doesn't (yet) build cleanly against
libscotchparmetis-dev.  Looks like the scotchparmetis interface only
provides partial compatibility, but PETSc demands full compatibility.
Might need some dedicated hacking time to sort out.


> 
> > 3) Rebuild petsc locally, with parmetis support activated.
> >     - this actually should not be difficult to do. We can write
> >       the instructions into our petsc build scripts if needed.
> 
> Depending on the petsc config on the cluster I'll be making the real 
> runs on, I might end up having to build petsc in my home directory
> for 
> the final code, but I'd prefer a debian solution for the code 
> development since both myself and my collaborators are running
> debian 
> stable.

It will be a debian solution: what I mean by rebuilding is to build a
local copy of the deb packages.  Then you can install them for the
system in place of the official package.

The basic procedure is

$ apt-get source petsc

... hack debian/rules to add 
          --with-metis --with-metis-include=/usr/include --with-metis-lib="-lmetis" \
          --with-parmetis --with-parmetis-include=/usr/include --with-parmetis-lib="-lparmetis" \
to CONFIGURATION_OPTIONS.

$ dch --nmu
  (add a comment to the changelog)

$ dpkg-buildpackage


That's pretty much it (obviously, install the packages for apt-get,
dch, dpkg-buildpackage and build-depends).

(same idea for building 3.8, but start with git clone in place of 
apt-get source)


I recommend trying to build the 3.8 deb package with parmetis support
activated.  Then you can test PETSCPARTITIONERPTSCOTCH again using 3.8,
but will have parmetis support in any case.

Drew


Reply to: