Jump to content

problem linking with lapack


Recommended Posts

Hi, this problem has now been solved by also installing lapack3-devel

 

Thanks,

R Haynes

 

Hi, I am trying to link lapack with some fortran code. I have done urpmi liblapack3 and the docs, everything installed fine. When I run my make file I get the following message:

 

[rhaynes@rhaynes gaussian]$ make

f77 -O -I/usr/lib -pg -lliblapack -o drive driver.o odesolve.o \

mynewton_nor.o xfdjac.o xfdjac1.o

/usr/bin/ld: cannot find -lliblapack

collect2: ld returned 1 exit status

make: *** [drive] Error 1

 

 

I am assuming it can't find liblapack. Here is my makefile

drive: driver.o odesolve.o mynewton_nor.o xfdjac.o xfdjac1.o

f77 -O -I/usr/lib -pg -lliblapack -o drive driver.o odesolve.o \

mynewton_nor.o xfdjac.o xfdjac1.o

driver.o: driver.f

f77 -c -O -pg driver.f

 

odesolve.o: odesolve.f

f77 -c -O -pg odesolve.f

 

mynewton_nor.o: mynewton_nor.f

f77 -c -O -pg mynewton_nor.f

 

xfdjac.o: xfdjac.f

f77 -c -O -pg xfdjac.f

 

xfdjac1.o: xfdjac1.f

f77 -c -O -pg xfdjac1.f

 

This worked on a old redhat system. Any suggestions?

 

Thanks,

R Haynes

Edited by rhaynes
Link to comment
Share on other sites

when using -l you don't need to include the lib in the libname:

 

f77 -O -I/usr/lib -pg -lliblapack -o drive driver.o odesolve.o \

 

should become:

 

f77 -O -I/usr/lib -pg -llapack -o drive driver.o odesolve.o \

 

Hi, thanks for your reply... unfortunately that doesn't work either.... is there anything I have to do to make the system "aware" that lapack exists??

 

R Haynes

Link to comment
Share on other sites

You should probably check where the lapack library(or libraries) are located and what their names are, you could use rpm

 

rpm -ql nameoflapackrpm

 

if you can't remember the name of the rpm you could try:

 

rpm -qa | grep -i lapack

 

to obtain it.

 

HTH,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...