Page 1 of 1

lapacke undefined references

PostPosted: Thu May 09, 2013 1:59 pm
by lrkeefe
I have been converting an F95 program to C++. The original F95 program used LAPACK, and has run either using AMD's ACML or the Gfortran version of LAPACK supplied by my distribution (OpenSuSE 12.3). It also employed an F77 routine, zgpadm.f from Expokit to calculate the matrix exponential, which also uses routines (zgemm for instance) from BLAS, and perhaps LAPACK. I converted explicit matmul() F95 calls to cblas_zgemm calls in the C++ program, and employed the high-level interface calls in LAPACKE to do the eigenvalue and matrix inversion work previously handled by zgeev, zgetri, zgetrf. When I compile and link with:

Code: Select all
g++   -O0 -o exp_int_es_pml_prop_7_cpp \
      exp_int_es_pml_prop_7.cpp zgpadm.f \
     /usr/lib64/  /usr/lib64/\
 /usr/lib64/ /usr/lib64/ /usr/lib64/

I get many "undefined reference" messages, for example:

Code: Select all
/usr/lib64/ undefined reference to `slagsy_'
/usr/lib64/ undefined reference to `claghe_'
/usr/lib64/ undefined reference to `dlagsy_'
/usr/lib64/ undefined reference to `zlagge_'

Am I missing libraries? Is my library order wrong? These seem to be test programs. What is their relevance here? Thank you for your help.