Max
Max

Reputation: 499

How to compile CUDA SDK Sample?

I failed to compile conjugate gradient solver. I downloaded the whole archieve that contains libraries, makefile and other stuff but the compiler lacks some header files. How to include all files I downloaded? Maybe I need to add some path or copy folder "common" to /usr/local/cuda/include/

Upvotes: 2

Views: 5573

Answers (1)

Robert Crovella
Robert Crovella

Reputation: 151849

To download and build a cuda sample directly, the following steps worked for me:

wget http://developer.download.nvidia.com/compute/DevZone/CUDALibraries/Projects/x64/conjugateGradient.tar.gz
tar -xzvf conjugateGradient.tar.gz
cd 7_CUDALibraries/conjugateGradient
make
# to execute the program:
./conjugateGradient

This assumes a standard cuda 5 install is available at /usr/local/cuda. It does not assume that any samples are previously installed. I tested this on a machine with CUDA 5 and RHEL 5.5

If this does not work, please post details of the error output you received.

If you want to use some other sample than the example given here, the download links can be obtained here.

Upvotes: 4

Related Questions