I am trying to compile a program that uses lapack.
First, I installed lapack by installing all the packages using 'sudo apt-get install' on this link: https://launchpad.net/ubuntu/precise/+source/lapack
I am trying to compile the code on this page: http://www.nag.com/lapack-ex/examples/source/dgbsv-ex.f
I got this program from: http://www.nag.com/lapack-ex/lapack-ex.html
I tried to compile the program by typing
$gfortran dbgsv-ex.f -llapack -lblas
into a terminal
I get a bunch of error messages, all of the form
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/liblapack.so: undefined reference to
`ATL_strsv'
i.e. the error messages end with ATL_xxxx
. Note also that when I look in my /usr/lib/
I see a file called liblapack.so
-latlas
or link directly with-llapack_atlas
. – Hristo Ilievsudo apt-get install libatlas-dev libatlas-doc libatlas-test libatlas-base-dev libatlas3gf-base libatlas-cpp-0.6-dev libatlas-cpp-0.6-1 libatlas-cpp-0.6-1-dbg
Then tried to compile as before and got the same error messages, then I tried to compile by typinggfortran dbgsv-ex.f -L/usr/local/lib -llapack -lblas -latlas
and I got an error saying/usr/bin/ld: cannot find -latlas
In case the order mattered, I even tried to put -latlas before -lblas or before -llapack. I got the same error with -llapack_atlas – db1234sudo update-alternatives --config libblas.so.3gf
and similarly for lapack, but it still wasn't working. Is there some way I can get lapack working? – db1234