Trying to use Lapack in ubuntu 16.04. I have downloaded the lapack 3.6.1, make it and cp liblapack.a and librefblas.a to both /usr/local/lib/ and /usr/lib/
However, when I try to compile my *.f, it looks the lib can not be found. Here is the makefile and error.
Makefile:
`# COMPHY directory path:
COMPHY = $(HOME)/Documents/E-books/Computational_Physics/code
LDFLAGS = -O
FCOPTS = -O -c
FC = gfortran
LIBS = $(COMPHY)/4570_lib/lib/geneig.a -llapack
%.o:%.f
$(FC) $(FCOPTS) $<
deepwell: deepwell.o globvarc
$(FC) $(LDFLAGS) -o deepwell deepwell.o $(LIBS)
deepeven: deepeven.o globvarc
$(FC) $(LDFLAGS) -o deepeven deepeven.o $(LIBS)
deepodd: deepodd.o globvarc
$(FC) $(LDFLAGS) -o deepodd deepodd.o $(LIBS)
clean:
rm -f *.o deepwell deepodd deepeven`
The error is:
gfortran -O -o deepwell deepwell.o /home/daniel/Documents/E-books
/Computational_Physics/code/4570_lib/lib/geneig.a -llapack
/usr/bin/ld: /home/daniel/Documents/E-books/Computational_Physics/code/4570_lib/lib/geneig.a(geneig.o): undefined reference to symbol 'dgemm_'
//usr/lib/libblas.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
makefile:12: recipe for target 'deepwell' failed
make: *** [deepwell] Error 1
-llapck
seems doesn't work at all.
New to ubuntu, hopefully could get a solution or explanation. Thank you all.