Page 1 of 1

undefine reference in lapack_LINUX.a

PostPosted: Fri Aug 26, 2005 10:53 am
by shaobohou
Hi,

I have been trying to compile BLAS and LAPACK libraries in order to compile someone else's code. The version I have downloaded version 3.0 + update.

I tried to compile the libraries by using the make.inc.LINUX from the INSTALL directory and editing the LAPACK makefile to mak the BLAS library aswell.

The libraries seemed to have compile without problem but when I try to link the other person's code with the libraries, I get undefined reference to dswap_, dger_ and a few others in lapack_LINUX.a

Any ideas.

I am running fedora core 2.0 on on Athlon XP.

PostPosted: Fri Aug 26, 2005 11:04 am
by Julie
Those two routines (dswap_, dger_ ) are in the BLAS.
LAPACK needs a BLAS library.
So if you just have provided lapack_LINUX.a, it is normal to have this error message.

For testing purpose, just type

> make blaslib

in your LAPACK directory, this creates blas_LINUX.a
then add blas_LINUX.a after lapack_LINUX.a when you link.

This should work. Isn't it?

Now, if you want performance from your application do not forget to link with an efficient BLAS, see http://www.netlib.org/lapack/faq.html#2.5

Julie Langou

PostPosted: Fri Aug 26, 2005 3:55 pm
by shaobohou
Julie wrote:in your LAPACK directory, this creates blas_LINUX.a
then add blas_LINUX.a after lapack_LINUX.a when you link.


ah, I linked to blas_LINUX.a before lapack_LINUX.a, switching it around worked. I didn't realise it makes any difference.

thanks very much