undefined reference to zheev

Post here if you have a question about linking your program with LAPACK or ScaLAPACK library

undefined reference to zheev

Postby Enumaris » Tue Oct 21, 2014 6:37 pm

Hello guys,

I'm running a piece of quite long code, written in Fortran (parts written in F77, parts written in F90). The code basically compiles alright, but at the very end, before creating the executable file, I get an error from one of my modules (which compiled fine):

Code: Select all
spincohere.o: In function `__spincohere_MOD_exphcalsp':
spincohere.F90:(.text+0xbb): undefined reference to `zheev_'
collect2: error: ld returned 1 exit status
make: *** [bulb-new] Error 1


I am not sure why I am getting this error. I have installed lapack on my machine using the command "sudo apt-get install liblapack3" in terminal. I have linked lapack to the creation of the executable file "bulb-new" via the command -L/usr/lib/lapack in my makefile at the end, after linking all my other object files so the whole command looks like this:
Code: Select all
bulb-new   :  params.o parallel.o helectron.o keep_clocks.o spincohere.o bulb-new.o rannyu.o spline.o splint.o
   $(F90PAR) $(LDFLGS) $(FOPT) -o bulb-new bulb-new.o params.o helectron.o spincohere.o keep_clocks.o parallel.o rannyu.o spline.o splint.o zheevh3-F-1.0/*.o -L/usr/lib/lapack $(FLIBS)


I found that simply typing "-llapack" returns the error "lapack not found", which is why I have the more complicated "-L/usr/lib/lapack". I don't get any "lapack not found" errors after using this. I have also tried adding "-L/usr/lib/blas3" but I get the same error. Any thoughts guys?
Enumaris
 
Posts: 1
Joined: Tue Oct 21, 2014 6:30 pm

Return to Linking Problem

Who is online

Users browsing this forum: No registered users and 3 guests