如何在Ubuntu 16.04中使用lapack [编译Fortran]

时间:2016-10-02 18:33:29

标签: ubuntu fortran lapack

尝试在ubuntu 16.04中使用Lapack。 我已经下载了lapack 3.6.1,将它和cp liblapack.a以及librefblas.a下载到/ usr / local / lib /和/ usr / lib /

然而,当我尝试编译我的* .f时,它看起来无法找到lib。这是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`

错误是:

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似乎根本不起作用。

ubuntu的新手,希望能得到解决方案或解释。 谢谢大家。

0 个答案:

没有答案