Associate foot problem

I am trying to compile a program using lapack.

First I installed lapack, installing all the packages using 'sudo apt-get install' at 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 

to terminal

I get a bunch of error messages, all forms

 /usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/liblapack.so: undefined reference to `ATL_strsv' 

i.e. error messages end with ATL_xxxx . Also note that when I look in my /usr/lib/ , I see a file called liblapack.so

+4
source share
1 answer

As noted in other comments, your system has a LAPACK ATLAS implementation. The correct library linking order (for a threaded version of ATLAS) is as follows:

 -llapack -lf77blas -lcblas -latlas 

Also note that your Fortran code also seems to contain a subroutine from the NAG library (x04cef), so you will also need to link the NAG library.

+1
source

Source: https://habr.com/ru/post/1413243/


All Articles