Cannot build files in testing

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
Posts: 2
Joined: Mon Aug 29, 2011 3:15 pm

Cannot build files in testing

Post by stu314159 » Mon Aug 29, 2011 3:28 pm

Almost certainly a dumb question. I am able to build the magma libraries fine (thanks!! :D ), but encounter errors when trying to compile the programs in the testing directory.

I have the CUDA 4.0 toolkit and Intel compiler toolchain on a 64-bit Linux system (Ubuntu 11.04) with a GTS-450 card.

My is:

Code: Select all

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

CC        = icc
NVCC      = nvcc
FORT      = ifort

ARCH      = ar
RANLIB    = ranlib

OPTS      = -O3 -DADD_
FOPTS     = -O3 -DADD_ -cpp
NVOPTS    = --compiler-options -fno-strict-aliasing -DUNIX -O3 -DADD_
LDOPTS    = -fPIC -Xlinker -zmuldefs

LIB       = -lmkl_intel_lp64 -lmkl_intel_thread -openmp -lmkl_core -lpthread -lcudart -lcublas -lm

CUDADIR   = /usr/local/cuda

LIBDIR    = -L$(MKLROOT)/lib/intel64 \
INC       = -I$(CUDADIR)/include

LIBMAGMA     = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.a
and - as I said - after successfully building libmagma.a and libmagmablas.a I get the following error:

Code: Select all

icc -O3 -DADD_ -DGPUSHMEM=200 -I/usr/local/cuda/include -I../include -I../quark/include -c testing_zgemm.cpp -o testing_zgemm.o
icc -O3 -DADD_ -DGPUSHMEM=200 -fPIC -Xlinker -zmuldefs -DGPUSHMEM=200  testing_zgemm.o  -o testing_zgemm lin/liblapacktest.a -L../lib \
          -lmagma -lmagmablas -lmagma -L/opt/intel/compilerpro- -L/usr/local/cuda/lib64  -lmkl_intel_lp64 -lmkl_intel_thread -openmp -lmkl_core -lpthread -lcudart -lcublas -lm 
testing_zgemm.o: In function `main':
testing_zgemm.cpp:(.text+0x48): undefined reference to `cuInit'
testing_zgemm.cpp:(.text+0x5f): undefined reference to `cuDeviceGet'
testing_zgemm.cpp:(.text+0x7d): undefined reference to `cuCtxCreate_v2'
testing_zgemm.cpp:(.text+0xef2): undefined reference to `cuCtxDetach'
../lib/libmagma.a(auxiliary.o): In function `printout_devices':
auxiliary.cpp:(.text+0xd0): undefined reference to `cuDeviceGetCount'
auxiliary.cpp:(.text+0xfb): undefined reference to `cuDeviceGet'
auxiliary.cpp:(.text+0x110): undefined reference to `cuDeviceGetName'
auxiliary.cpp:(.text+0x124): undefined reference to `cuDeviceTotalMem_v2'
auxiliary.cpp:(.text+0x13d): undefined reference to `cuDeviceGetAttribute'
make: *** [testing_zgemm] Error 1
rm testing_zgemm.o
Obviously it looks like I'm not seeing the right cuda run-time libraries. I actively use the NVIDIA libraries cublas, cusparse etc... and 3rd party library libJacket for my research application - I really think I have all the right CUDA tools - but something here seems to be missing.

Any help you could provide would be much appreciated.

Posts: 2
Joined: Mon Aug 29, 2011 3:15 pm

Re: Cannot build files in testing

Post by stu314159 » Wed Aug 31, 2011 1:05 pm

Sorry. I was right, it was a dumb question. I was using the wrong version of the NVIDIA cuda developer drivers. I am only amazed that *most* other things seemed to work correctly before I fixed it.

But in case anyone reads this: am I the only guy who has trouble with CUDA 4.0 with Ubuntu 11.04?

I know that's not technically a supported OS - but whenever I try to use the 270.41.19 drivers my system totally fails upon the first re-boot after installation.

I finally resorted to shifting back to Ubuntu 10.10 and now everything works fine.

Post Reply