LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 09-02-2003, 08:59 AM   #1
marlinux
LQ Newbie
 
Registered: Jul 2003
Posts: 20

Rep: Reputation: 0
lapack library problem


Hi,
I am trying to use the lapack library linked to a fortran 90 program. During the compilation I have severals errors in the lapack library functions. The typical message is:
"
/usr/lib/liblapack.a(dgesdd.o)(.text+0x8b2): In function `dgesdd_':
: undefined reference to `dgemm_'
"

It looks like the lapack library, installed by rpm, is not linked to something.
Has anybody a solution?
Thanks in advance,

Martino
 
Old 09-02-2003, 09:12 AM   #2
AnotherSquid
LQ Newbie
 
Registered: Aug 2003
Distribution: RedHat 7.3
Posts: 2

Rep: Reputation: 0
You need to link to the BLAS (basic linear algebra subroutines). LAPACK depends on them for almost everything. DGEMM, for example, does a general matrix-matrix multiply in 64-bit precision. You didn't provide enough information for me to give you the exact fix. As a first stab, try adding "-lblas" to your compile line at the appropriate place (or possibly just "/usr/lib/libblas.a" at the end).

Andy
 
Old 09-02-2003, 09:49 AM   #3
marlinux
LQ Newbie
 
Registered: Jul 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Actually I did linked to blas.
In my makefile I had
"
#######################
### Program Libraries #
#######################

LIBS = /usr/lib/libblas.a \
/usr/lib/liblapack.a
"
But now I put the library directely in the LDFLAG:
"
-L/usr/lib/ -lblas -llapack
"
and I have a different message error:
"
[martino@weinberg mcdf2003]$ make
Linking mdfgme.exe ...
/usr/lib//libblas.so: undefined reference to `e_wsfe'
/usr/lib//liblapack.so: undefined reference to `etime_'
/usr/lib//libblas.so: undefined reference to `do_fio'
/usr/lib//libblas.so: undefined reference to `s_wsfe'
make: *** [mdfgme.exe] Error 1
"
Did I miss others links or there is a problem in the libraries?
Thanks,

Martino
 
Old 09-02-2003, 09:57 AM   #4
AnotherSquid
LQ Newbie
 
Registered: Aug 2003
Distribution: RedHat 7.3
Posts: 2

Rep: Reputation: 0
It looks like the libraries were built with a different compiler than the one you are using. You didn't say which one you are using or where these libraries came from. Unsatified externals with these sorts of names are always low-level Fortran system library problems, almost always caused by using different compilers or different versions of the same compiler. You can always build the BLAS library yourself using the same compiler and options which you are currently using on your Fortran source code. Get the libraries from NETLIB.ORG. They also have some already compiled library archives built with various compiling systems. These are to be preferred, since they are highly optimized. Same goes for LAPACK, by the way.

Andy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
some problem about LAPACK and BLAS ztdep Linux - Software 8 08-03-2005 05:32 AM
problem using "zheev" from LAPACK darknails Programming 1 03-23-2005 06:35 PM
Lapack library with Fedora 3 (and/or signbit) Carine Linux - Software 0 12-13-2004 05:09 AM
Compiling lapack hussar Linux - Software 0 10-18-2004 02:24 PM
LAPACK library for Slackware 9.1 rsamurti Slackware 1 06-11-2004 02:05 PM


All times are GMT -5. The time now is 12:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration