dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06365
Re: Linking of ATLAS when using Debian package
On Thu, Feb 28, 2008 at 01:19:54PM +0100, Ilmar Wilbers wrote:
> Adding PETSC_TS_LIB did help, but not for the reasons one would think.
> The result is the same whether reblas3-dev or atlas3-base-dev is
> installed (hence the file dolfin.pc remains the same when running
> configure with the two different blas libraries), but the library
> '-lblas-3' is now added to the list of libraries. It is located in
> /usr/lib, and set to point to the correct libblas.so (either in
> /usr/lib/ or /usr/lib/atlas). I don't know why this is so, but it might
> very well be set at the compiling of the debian petsc-dev package, so I
> am not 100% sure that this is the way to proceed.
>
> A third alternative, beside adding '-L/usr/lib/atlas' to dolfin.pc, is
> to omit '-lblas' to be added when dolfin is compiled with petsc. As far
> as I understand, libpetsc.so will always be linked with libblas.so anyway?
>
> ilmar
I'm not sure what the best option is, but I have added PETSC_TS_LIB
for now (until someone suggests a better solution).
--
Anders
> Anders Logg wrote:
> > On Thu, Feb 28, 2008 at 12:19:00AM +0100, Anders Logg wrote:
> >
> >> On Wed, Feb 27, 2008 at 11:49:46AM +0100, Ilmar Wilbers 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
> >>>
> >
> > (I'm resending this because of problems with the mail-server, hope it
> > doesn't appear twice.)
> >
> > The cflags/libs needed for PETSc are extracted by the DOLFIN configure
> > script using the file petsc.conf (which is located at the top of the
> > DOLFIN source tree). This is a makefile that includes the file
> > ${PETSC_DIR}/bmake/common/variables which gives us all we need for
> > PETSc.
> >
> > Does it help if you just add the variable
> >
> > ${PETSC_TS_LIB}
> >
> > suggested by Matt at the end of the last line in petsc.conf?
> >
> > (And then rerun the configure script to create a new dolfin.pc.)
> >
> >
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
References