lapacke undefined references

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

lapacke undefined references

Postby lrkeefe » Thu May 09, 2013 1:59 pm

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.
Posts: 4
Joined: Mon Sep 26, 2005 4:52 pm
Location: 6655 Palomino Circle, West Linn, OR 97068-2505

Return to Linking Problem

Who is online

Users browsing this forum: No registered users and 4 guests