← Back to team overview

dolfin team mailing list archive

Re: Linking of ATLAS when using Debian package

 

The right solution (I think) is to use the libraries PETSc knows it was
compiled with, available from

  1) make getlinklibs

or

  2) bmake/common/variables in PETSC_TS_LIB (or many other vars)

or

  3) bmake/${PETSC_ARCH}/petscconf in BLASLAPACK_LIB

or

  4) bmake/${PETSC_ARCH}/RDict.db in the pickled configure framework object

Note that in the new release, these locations change slightly to
come into conformance with the Linux install model.

   Matt

On Wed, Feb 27, 2008 at 4:49 AM, Ilmar Wilbers <ilmarw@xxxxxxxxx> wrote:
> Hello to all!
>
>  With Ubuntu Hardy, updates of openmpi and petsc (2.3.3) are available.
>  petsc will also be built against openmpi, not mpich. We are currently
>  looking at building dolfin using these packages as dependencies. There
>  is, however, a problem with ATLAS.
>
>  When installing petsc-dev, there is a dependency on either atlas3-base,
>  OR both lapack3 and refblas3. This means that if no BLAS is installed,
>  atlas3-base is set to be installed as the dependency. atlas3-base is the
>  faster, optimized one, and the one we really would like to use. The
>  problem is that libblas.so and liblapack.so are put in the directory
>  /usr/lib/atlas when using atlas3-base. If the package refblas3 is used,
>  the library files are put in /usr/lib. When doing a 'make demo' in
>  dolfin, when compiled with the petsc library provided by the debian
>  package, this works fine when only refblas3 and lapack3 are installed,
>  as /usr/lib is a default directory when the compiler (mpicxx) is looking
>  for libraries. When atlas3-base also is available, libpetsc.so tries to
>  use the libblas.so located in /usr/lib/atlas, and so, when running 'make
>  demo', we get an error about undefined references to atlas symbols,
>  unless we explicitly add '-L/usr/lib/atlas' to the linking stage of
>  dolfin.pc in lib/pkgconfig.
>
>  When compiling dolfin without petsc, we do not get this error, as
>  /usr/lib/libblas.so is used. However, we really would like to use the
>  atlas one when available, as it runs at least twice as fast (although
>  building them yourself will be ten times faster, it seems).
>
>  My suggestion is to make sure that the line '-L/usr/lib/atlas' is
>  included in the dolfin.pc file.
>
>  ilmar
>
>  _______________________________________________
>  DOLFIN-dev mailing list
>  DOLFIN-dev@xxxxxxxxxx
>  http://www.fenics.org/mailman/listinfo/dolfin-dev
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener


References