I am trying to compile a matrix multiplication example I found on the net[1].
The readme.txt advises me, to open common.mk with comes with the zip and ‘modify the CUDA_SDK_INSTALL_PATH field to your own cuda-sdk-install path.’
CUDA_INSTALL_PATH ?= /usr/local/cuda
CUDA_SDK_INSTALL_PATH ?= /home/dave/NVIDIA_GPU_Computing_SDK/
Nevertheless the make fails with following error message
g++ -fPIC -o matmult cuda_matmult_cpu.cpp.o cuda_matmult_opt.cu.o
-L/usr/local/cuda/lib64 -L/home/dave/NVIDIA_GPU_Computing_SDK/../lib
-L/home/dave/NVIDIA_GPU_Computing_SDK/../common/lib/linux -lcudart
-L/usr/local/cuda/lib64 -L/home/dave/NVIDIA_GPU_Computing_SDK/../lib
-L/home/dave/NVIDIA_GPU_Computing_SDK/../common/lib/linux -lcutil
/usr/bin/ld: cannot find -lcutil
collect2: ld returned 1 exit status
make: *** [matmult] Error 1
My first thought was, that this common.mk could be outdated as the Copyright notice states “1993-2006 NVIDIA Corporation”. So I changed the path to the common.mk in the make file from
include ./common.mk
to
include /home/dave/NVIDIA_GPU_Computing_SDK/CUDALibraries/common/common.mk
The resulting error when executing make is:
cuda_matmult_opt.cu:30: fatal error: cutil_inline.h: No such file or directory
compilation terminated.
make: *** [obj/x86_64/release/cuda_matmult_opt.cu.o] Error 1
What do you recommend? What should I do? What can I read to help me understand?
[1] cuda_matmult_opt.zip by Taesik Yoon, EECS, 2009