← Back to team overview

dolfin team mailing list archive

Re: request for assistance with Debian package

 

On Sat, Jul 16, 2005 at 04:53:49PM -0400, Faheem Mitha wrote:
> 
> Hi,
> 
> Sorry about the slow response.
> 
> I've now got preliminary packages for dolfin at
> 
> deb http://aurora.dulci.biostat.duke.edu/~faheem/debian/ ./
> deb-src http://aurora.dulci.biostat.duke.edu/~faheem/debian/ ./
> 
> apt-get source dolfin
> apt-get install libdolfin libdolfin-dev
> 
> Please test them out.

Hi Faheem,

Great that you are packaging DOLFIN and PETSc, it's very useful work
and very much appreciated.

I have tested your packages, and ran into the same problem that you
had I think. When I compiled the demos ("elasticity" for example), I
got PETSc linker errors, complaining about missing PETSc
symbols. However, if I compiled locally with "./configure
--with-petsc-dir=/usr/lib/petsc-2.2.1/" (i.e. against the same PETSc
libraries) and linked against the local DOLFIN libraries, then
everything worked ok.

I discovered I had old PETSc libraries in /usr/lib. When I removed
them everything worked like it should. Please check if you have the
same situation. The linker must select those libraries first, perhaps
because "-L /usr/lib" occurs before the correct PETSc path.

I have tested the demos "make". All demos compiled ok, and they seem
to work as expected (I tested "elasticity" and "poisson"). Good job!

> 
> The static libraries are in libdolfin, probably in violation of Debian 
> policy, with headers in libdolfin-dev as normal. However, it seems 
> possible these libraries are needed at runtime. See below.
> 
> These packages still cannot be used to successfully compile the demos in 
> src/demos. The problem is that not all the header file are installed by 
> make install.
> 
> I am currently testing this, and see at the moment that (at least) 
> dolfin_navierstokes.h, dolfin/NSEMomentum.h, dolfin/NSEContinuity.h, 
> dolfin/NSESolver.h are not installed.

This module has been disabled (because it doesn't work yet). So it has
been commented out from for example src/modules/Makefile.am, which is
why it doesn't get installed. Your fix is probably ok for now, in
future releases we will make sure that the makefiles are consistent,
i.e. if the module is disabled it should not be used anywhere. Of
course the best solution would be if the module worked and could be
installed :).


> 
> Please look into this. For the moment, I'd running the demos, and adding 
> the installs in manually as the errors occur.
> 
> Replies/comments to previous message follow.
> 
> On Thu, 7 Jul 2005, Anders Logg wrote:
> 

[...]

> >>3) I can try to figure out the build-depends and depends on my own but I
> >>am lazy. So, can someone tell me what they should be?
> >>
> >>Build-Depends: Required at build time.
> >
> >The ones I can think of right now are libxml2-dev (Debian package) and
> >PETSc version 2.3.0. There are probably other stuff we depend on that
> >is more standard.
> 
> As it happens, there is other stuff, some of which your configure script 
> should probably detect, but curently doesn't.
> 
> The following list of build dependencies was generated with the help of 
> pbuilder. Build, wait for failure, add to build-depends. Repeat.
> 
> debhelper (>= 4.0.0), libxml2-dev, libpetsc, libncurses5-dev, mpich-bin, 
> libmpich1.0-dev, lapack3-dev, refblas3-dev | atlas3-base-dev
> 
> Note that the configure script does not look for anything after PETSc, as 
> far as I can tell. Adding tests for the other things should be easy.

Apart from debhelper (which I don't understand why it's included), all
libraries following libncurses5-dev are dependencies of PETSc. So if
DOLFIN finds a working PETSc, then they must exist. There are no
explicit dependencies on those libraries from DOLFIN. Shouldn't it be
enough then to only check for PETSc?

> 
> >To work with variational forms, one needs to have the FIAT 0.2.3 and
> >FFC 0.1.9 from the FEniCS web site installed. These in turn have
> >dependencies. It's not necessary to have FFC and FIAT to use DOLFIN,
> >but some parts of DOLFIN require it.
> 
> Can you specify which parts of DOLFIN require these? I'll hold off 
> packaging these till I've experimented a little bit with DOLFIN.

FFC is a compiler which can generate a C++ header file (which contains
the implementation as well) from a form (.form) file. For example, the
file src/modules/poisson/dolfin/Poisson.h has been generated from
src/modules/poisson/dolfin/Poisson.form . The same holds for the other
modules. So if one wants to create a new module (i.e. solve a new PDE)
or modify the existing forms, then FFC is needed. There are some form
files in src/kernel/fem/dolfin as well for the forms for a mass matrix
and stiffness matrix.

FIAT is used by FFC to evaluate basis functions, it's not used
explicitly by DOLFIN and is only needed by FFC.

> >Something for visualization (MATLAB, Octave, OpenDX, GiD, Tecplot or
> >Paraview/VTK). This is more post run-time.
> 
> Most of these look proprietary. Perhaps Octave in a suggests?

Yes, definitely. Open Inventor (inventor-clients) should also be a
suggests since it's used in some visualization scripts (pdeplot.m).

[...]

> One (fairly important) question with regard to this. If I link against the 
> DOLFIN static libraries, then should I still require these libraries at 
> runtime? I'd have thought not, but based on preliminary evidence, this 
> does not appear to be the case.
> 

No, this cannot be the case. When linking, the contents of a static
library is included in the executable and no reference to the library
is kept. The linking problem must have been because of the old PETSc
libraries or something similar. If it isn't, please post the errors
you get and let's try to find the problem.

Thanks again for your work. For me the packages work perfectly now,
and it's a great step to have Debian DOLFIN-packages. I have also
learned a bit about how to build packages which I was not so familiar
with before, which is a nice bonus :).

  Johan



Follow ups

References