Linker Error

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
Posts: 2
Joined: Thu Sep 29, 2011 3:12 am

Linker Error

Post by floxtrott » Thu Sep 29, 2011 4:01 am

Hello there,

I have got a strange error during magma installation and I have no idea how to solve it. Any suggestion would be appreciated.

Code: Select all

#   -- MAGMA (version 1.0) --
#      Univ. of Tennessee, Knoxville
#      Univ. of California, Berkeley
#      Univ. of Colorado, Denver
#      November 2010
#      Contributed by: Allan Menezes (Ontario, Canada)

# GPU_TARGET specifies for which GPU you want to compile MAGMA
#      0: Tesla family
#      1: Fermi Family

CC        = gcc
NVCC      = nvcc
FORT      = gfortran

ARCH      = ar
RANLIB    = ranlib

OPTS      = -O3 -DADD_
FOPTS     = -O3 -DADD_ -x f95-cpp-input
NVOPTS    = --compiler-bindir /opt/gcc-4.4 --compiler-options \
            -fno-strict-aliasing -DUNIX -O3 -DADD
LDOPTS    = -fPIC -Xlinker -zmuldefs

LIB       = ../../lapack-lite-3.1.1/lapack_LINUX.a \
            -lf77blas -llapack -latlas -lcblas -lf2c\
            -lcublas -lm

#CUDADIR   = /usr

LIBDIR    = -L/usr/lib \
            -L../../ATLAS/lib/Linux_UNKNOWNSSE2_4 \

INC       = -I/usr/include/cuda/

LIBMAGMA     = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.a

Code: Select all

make[1]: Entering directory `........................................./testing'
gcc -O3 -DADD_ -DGPUSHMEM=130 -I/usr/include/cuda/ -I../include -I../quark/include -c testing_zhemv.cpp -o testing_zhemv.o
gcc -O3 -DADD_ -DGPUSHMEM=130 -fPIC -Xlinker -zmuldefs -DGPUSHMEM=130  testing_zhemv.o  -o testing_zhemv lin/liblapacktest.a -L../lib \
          -lcuda -lmagma -lmagmablas -lmagma -L/usr/lib -L../../ATLAS/lib/Linux_UNKNOWNSSE2_4 -L../../CLAPACK-3.2.1/F2CLIBS  ../../lapack-lite-3.1.1/lapack_LINUX.a -lf77blas -llapack -latlas -lcblas -lf2c -lcublas -lm 
../lib/libmagmablas.a(zhemv_tesla.cu_o): In function `magmablas_zhemv':
tmpxft_00005cd6_00000000-4_zhemv_tesla.compute_13.cudafe1.cpp:(.text+0x46f): undefined reference to `lapackf77_lsame'
tmpxft_00005cd6_00000000-4_zhemv_tesla.compute_13.cudafe1.cpp:(.text+0x4d3): undefined reference to `lapackf77_lsame'
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [testing_zhemv] Fehler 1
rm testing_zhemv.o
make[1]: Leaving directory `/daten/projekte/studium/Diplomarbeit/cpp/magma_1.0.0/testing'
make: *** [test] Fehler 2
Best regards,


Stan Tomov
Posts: 264
Joined: Fri Aug 21, 2009 10:39 pm

Re: Linker Error

Post by Stan Tomov » Mon Oct 03, 2011 12:44 am

Yes, this is indeed strange. The zhemv routine that triggers the error is in the magmablas directory (file; I see you are not compiling for Frmi GPU). There is a #include "common_magma.h" statement that includes magma_lapack.h. In file magma_lapack.h the routine lapackf77_lsame is defined to be 'lsame_', so you should not see `lapackf77_lsame' is not defined (at most that 'lsame_' is not defined), unless something goes wrong. You didn't comment out any of the include statements, right?

Posts: 2
Joined: Thu Sep 29, 2011 3:12 am

Re: Linker Error

Post by floxtrott » Mon Oct 03, 2011 4:31 am

That's right. I did not comment anything out. Any ideas? If I can help you search the error, just tell me what I can do?


Post Reply