CUDA on Ubuntu 8-10, gcc 4.3.2 Cuda Installation

Hi,

I am new to CUDA and want to install it on my laptop. I have downloaded the necessary stuff, however having problems making the examples in the SDK directory. My questions are as follows

1)Do I need to install the Nvidia graphics drivers (ie step 1) on the guide, If I am interested in running “ONLY” in emulator mode? I don’t have the necessary hardware on my laptop

2)I have installed the cuda toolkit as follows

/home/cuda-2.3/cuda

This to me looks like it has built fine

I then installed the SDK in /home/cuda-2.3/cuda/

My attempt at making the deviceQuery fails with the following.

deviceQuery.cpp:19:18: error: cuda.h: No such file or directory
deviceQuery.cpp:20:30: error: cuda_runtime_api.h: No such file or directory
deviceQuery.cpp: In function ‘int main(int, char**)’:
deviceQuery.cpp:35: error: ‘cudaGetDeviceCount’ was not declared in this scope
deviceQuery.cpp:42: error: ‘cudaDeviceProp’ was not declared in this scope
deviceQuery.cpp:42: error: expected `;’ before ‘deviceProp’
deviceQuery.cpp:43: error: ‘deviceProp’ was not declared in this scope
deviceQuery.cpp:43: error: ‘cudaGetDeviceProperties’ was not declared in this scope

I confirm that my $PATH and $LD_LIBRARY_PATH are pointing to where cuda is installed. Please note that I have not carried out the first step either (installing the nvidia drivers).

To me it looks like I am making some elementary mistake, but unable to figure out what this is - can some please give some pointers?

CUDA usually installs to /usr/local/cuda on Ubuntu, but it looks like you’ve put it in a custom location.

You may need to point the environment variable CUDA_INC_PATH to the location of CUDA’s include directory on your system, i.e. /home/cuda-2.3/cuda/include

Hello

Thanks for your reply - that solution still doesn’t work… As you suggested I have done the following

echo $CUDA_INSTALL_PATH
/home/foo/cuda-2.3/cuda/include

Cheers
sv650

You neither need to set $CUDA_INSTALL_PATH nor $CUDA_INC_PATH to compile the sdk samples or some other cuda application. If your the environment variables $PATH and $LD_LIBRARY_PATH are set appropriately, just type ‘[font=“Courier New”]make cuda-install=/home/foo/cuda-2.3/cuda[/font]’ instead of ‘[font=“Courier New”]make[/font]’.

If that works, adjust the statement ‘[font=“Courier New”]CUDA_INSTALL_PATH ?= /usr/local/cuda[/font]’ in the ‘[font=“Courier New”]common.mk[/font]’ file in the sdk/common directory.