← Back to team overview

dolfin team mailing list archive

Re: Linking of ATLAS when using Debian package

 

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.)
 
-- 
Anders


Follow ups

References