undefine reference in lapack_LINUX.a

Open discussion regarding features, bugs, issues, vendors, etc.

undefine reference in lapack_LINUX.a

Postby shaobohou » Fri Aug 26, 2005 10:53 am

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.
shaobohou
 
Posts: 4
Joined: Fri Aug 26, 2005 10:44 am

Postby Julie » Fri Aug 26, 2005 11:04 am

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
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Postby shaobohou » Fri Aug 26, 2005 3:55 pm

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
shaobohou
 
Posts: 4
Joined: Fri Aug 26, 2005 10:44 am


Return to User Discussion

Who is online

Users browsing this forum: Bing [Bot] and 4 guests