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

Re: petsc interface to other packages



On Mon, 2017-11-06 at 19:46 +0100, Matteo Semplice wrote:
> Dear debian-science,
> 
>      I am writing some code based on the pestc libraries using a
> stable 
> distribution but, if I create a PetscPartitioner of type 
> PETSCPARTITIONERPARMETIS (I have libparmetis-dev and libparmetis4.0 
> installed) I get an error message at run-time asking me to "Please 
> reconfigure with --download-parmetis." Similarly, when calling 
> DMPlexCreateBoxMesh it asks to reconfigure with --download-triangle, 
> despite the dev and binary package for libtriangle being installed on
> my 
> machine.
> 
> It is expected, or do I have missing link options in my makefile?
> 
> If it is not expected to link correctly to parmetis/triangle out of
> the 
> box, I guess that those options are not activated in the standard
> debian 
> build and I am wondering what is the best way to proceed. For
> example, 
> if I downloaded the source package and compiled it locally as
> described 
> in /usr/share/doc/petsc3.7.5-doc/README.Debian.gz, would it find 
> automatically the parmetis/triangle from the installed debian
> package?
> 

Hi Matteo, you're caught by the inconvenient side effect of Debian's
free software policy. Parmetis is non-free, "can be freely used ... by
non-profit institutions...only", so it earns a second-class status in
Debian (it's hosted, but not considered part of the official release).

Since we prefer libraries to be included in the main archive where
possible, petsc has been built with parmetis support deactivated. 
Otherwise it would have to be placed in the "contrib" archive, which is
a limbo where free software goes when it consorts with non-free
software.  This would have a flow-on affect, forcing all client
packages to also end up in contrib, even if they are all free.

You've got 4 options:

1) scotch support is activated. scotch provides the same functionality
as parmetis. Can you use it instead?

2) scotch provides a compatibility interface that parmetis clients are
supposed to be able to link against, see libscotchparmetis-dev.  I
haven't tested it specifically with PETSc, but let us know if it does
work.
   - if this is a usage that our PETSc should be able to support, but
     currently does not, then we can consider that a bug which should 
     be fixed

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.

4) Convince us to push the entire body of libraries and client programs
out of main and into contrib.


The status of non-free software is a sensitive issue.  It's
particularly starting to become acute in numerical software with the
growth in GPU exploitation.  OpenCL is free, but nVidia's CUDA is non-
free and introduces similar problems to parmetis. And many of the
libraries have been developing their GPU support using cuda rather than
opencl....


Drew


Reply to: