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 make.inc is:
Code: Select all
#
# GPU_TARGET specifies for which GPU you want to compile MAGMA
# 0: Tesla family
# 1: Fermi Family
#
MKLROOT=/opt/intel/compilerpro-12.0.0.084/mkl
GPU_TARGET = 1
CC = icc
NVCC = nvcc
FORT = ifort
ARCH = ar
ARCHFLAGS = cr
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 \
-L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include
LIBMAGMA = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.aCode: 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-12.0.0.084/mkl/lib/intel64 -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
Any help you could provide would be much appreciated.