zgeqp3.cpp:220: undefined reference to `cblas_dznrm2'

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

Re: zgeqp3.cpp:220: undefined reference to `cblas_dznrm2'

Postby mgates3 » Thu Apr 18, 2013 12:09 pm

These are missing LAPACK functions (e.g., zlarnv_). You need to add an LAPACK library, which is not part of ATLAS. (ATLAS supplies only the BLAS.) Notice in the provided make.inc.atlas, the lapack_LINUX64.a library. On Redhat, you probably need to install the LAPACK RPM and link with -llapack. You can also download LAPACK from netlib and compile it yourself.

I was able to compile using the options below, but what exact libraries are required depends on your installation of ATLAS and LAPACK.

Code: Select all
# Depending on your system and how LAPACK was compiled, you may need one or more of:
# -lifcore -ldl -lf2c -lgfortran
LIB       = -llapack -lcblas -lf77blas -latlas -lcublas -lm -lgfortran -lifcore

# define library directories here or in your environment
# CUDADIR   = /usr/local/cuda
# LAPACKDIR = $(HOME)/src/lapack-3.4.2
# ATLASDIR  = /mnt/scratch/sw/atlas-gcc

            -L$(ATLASDIR)/lib \
INC       = -I$(CUDADIR)/include
Posts: 726
Joined: Fri Jan 06, 2012 2:13 pm


Return to User discussion

Who is online

Users browsing this forum: Bing [Bot] and 4 guests