Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

using lapack and blas libraries

chimico
Beginner
1,740 Views
If I try to compile
ifort programma.f90 -llapack -lblas

I get this error message:

ld: cannot find -llapack




remembering that to run ifort I added this to my .bashrc:

PATH="/opt/intel/Compiler/11.1/069/bin/intel64:$PATH"
export PATH
LD_LIBRARY_PATH="/opt/intel/Compiler/11.1/069/lib/intel64"
export LD_LIBRARY_PATH



and that Lapack is instead in usr/lib I wrote in terminal:

ifort program.f90 -L/usr/lib llapack lblas


but get this error message

ifort: error #10236: File not found: 'llapack'
ifort: error #10236: File not found: 'lblas'


So now I don't know what to do ...
Help me please
[bash]
[/bash]
[bash]
[/bash]

0 Kudos
3 Replies
mecej4
Honored Contributor III
1,740 Views
What OS, version?

You appear to be attempting to mix 32-bit and 64-bit objects and libraries. It is also unclear as to whether you do have 64-bit Blas and Lapack libraries installed; normally, such libraries go into /usr/lib64 rather than /usr/lib.

In your second attempt, you should have used the command

ifort program.f90 -llapack -lblas

rather than

ifort program.f90 llapack lblas

With some older versions of ld on Linux/Unix, ld was not knowledgeable enough to use soft links to libraries.
0 Kudos
chimico
Beginner
1,740 Views
Thank you for the answer
Now it works:
I downloaded by synaptic (I use ubuntu 10.04 64 bit ) the package liblapack-dev (I don't know why liblapack3gf wasn't enough...)
0 Kudos
TimP
Honored Contributor III
1,740 Views
Did you install the MKL library option with your ifort installation? That provides more highly optimized BLAS and lapack, including automatic threading. The link advisor helps you figure out your link command. It should work interchangeably with the libraries from your linux distro.
0 Kudos
Reply