This is the details.  

I have got the following linking error, when compiling Poisson's equation demo 
(cpp):
[EMAIL PROTECTED] cpp]$ make
`pkg-config --variable=compiler dolfin` -o demo main.o `pkg-config --cflags 
dolfin` `pkg-config --libs dolfin` "-L/home/rfarahi/math/AMD/Lib -lamd"
/home/rfarahi/math/UMFPACK/Lib/libumfpack.a(umf_l_free.o)(.text+0x12): In 
function `umf_l_free':
: undefined reference to `amd_free'
/home/rfarahi/math/UMFPACK/Lib/libumfpack.a(umf_l_malloc.o)(.text+0x28): In 
function `umf_l_malloc':
: undefined reference to `amd_malloc' ...

The configuration I have used to install dolfin:
./configure --enable-petsc --with-petsc-dir=/home/rfarahi/math/petsc-2.3.3-p11 
--disable-pydolfin --with-umfpack-include=/home/rfarahi/math/UMFPACK/Include --
with-umfpack-lib=/home/rfarahi/math/UMFPACK/Lib 
--with-amd-lib=/home/rfarahi/math/AMD/Lib 
--prefix=/home/rfarahi/math/dolfin-0.7.2/linux-opt --disable-shared 
--with-boost=/usr/local

This is the dolfin.pc on my system:
pkg-config --libs dolfin:
-Wl,-rpath,/home/rfarahi/math/petsc-2.3.3-p11/lib/linux-gnu-c-debug -pthread 
-Wl,--export-dynamic -L/home/rfarahi/math/dolfin-0.7.2/linux-opt/lib 
-L/home/rfarahi/math/petsc-2.3.3-p11/lib/linux-gnu-c-debug -L/usr/local/lib 
-L/home/rfarahi/math/AMD/Lib -L/home/rfarahi/math/UMFPACK/Lib -ldolfin 
-lpetscts -lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc -lxml2 
-lz -lm -lamd -lumfpack -lblas -lgts -lgthread-2.0 -lgmodule-2.0 -ldl 
-lglib-2.0  

You see that -lamd appears before -lumfpack.
I changed the dolfin.pc manually, and it works well. But, maybe a check point 
can be added to do it automaticlly, if the order is not correct.

Bests,
Reza


----- Original Message ----
From: Johannes Ring <[EMAIL PROTECTED]>
To: dolfin mailing list <[email protected]>
Sent: Monday, April 14, 2008 9:30:23 AM
Subject: Re: [DOLFIN-dev] amd and umfpack

On Mon, April 14, 2008 Reza Farrahi Moghaddam:
> It seems that the linking process (cpp demos) is very sensitive to the
> order of lamd and lumfpack. Is it possible that the dolfin installer
> automatically set the correct order (-lumfpack -lamd) in the dolfin.pc?

The order of -lumfpack and -lamd is defined in umfpack.pc. What is the
contents of this file on your system? The Libs section in mine looks like
this:

  Libs: -L/usr/lib/atlas -lblas -L/usr/lib -lumfpack -L/usr/lib -lamd

Seems to be the order you refer to as the "correct order". I tried
changing the order and it still compiles without any problems on my
system.

Can you perhaps provide some more information on your problem? What is the
error message you get?

Maybe you have multiple AMD libraries on your system?

Johannes

_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/
_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev

Reply via email to