Compiling SDK on opensuse

Hello,

I am completely new to CUDA as I am still in the process of installation. I have searched this forum for the issue I get, but found only some old posts which doesn’t seem to be applicable to my case.

Generally my problem is that I can’t compile SDK projects:

make

make[1]: Entering directory `/home/c111269/NVIDIA_CUDA_SDK/sdk/common'

src/cutil.cpp:47:27: error: builtin_types.h: No such file or directory

In file included from ./../common/inc/stopwatch.h:36,

				 from src/cutil.cpp:52:

./../common/inc/stopwatch_base.h:74: warning: type qualifiers ignored on function return type

./../common/inc/stopwatch_base.h:78: warning: type qualifiers ignored on function return type

In file included from ./../common/inc/stopwatch_base.h:90,

				 from ./../common/inc/stopwatch.h:36,

				 from src/cutil.cpp:52:

./../common/inc/stopwatch_base.inl:85: warning: type qualifiers ignored on function return type

./../common/inc/stopwatch_base.inl:96: warning: type qualifiers ignored on function return type

In file included from ./../common/inc/stopwatch.h:43,

				 from src/cutil.cpp:52:

./../common/inc/stopwatch_linux.h:64: warning: type qualifiers ignored on function return type

./../common/inc/stopwatch_linux.h:68: warning: type qualifiers ignored on function return type

./../common/inc/stopwatch_linux.h:144: warning: type qualifiers ignored on function return type

./../common/inc/stopwatch_linux.h:161: warning: type qualifiers ignored on function return type

In file included from src/cutil.cpp:52:

./../common/inc/stopwatch.h:53: warning: type qualifiers ignored on function return type

In file included from src/cutil.cpp:53:

./../common/inc/bank_checker.h:52: warning: type qualifiers ignored on function return type

./../common/inc/bank_checker.h:238: warning: type qualifiers ignored on function return type

make[1]: *** [obj/release/cutil.cpp.o] Error 1

make[1]: Leaving directory `/home/c111269/NVIDIA_CUDA_SDK/sdk/common'

make: *** [lib/libcutil.so] Error 2
nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver

Copyright (c) 2005-2009 NVIDIA Corporation

Built on Thu_Apr__9_05:05:52_PDT_2009

Cuda compilation tools, release 2.2, V0.2.1221
gcc --version

gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]

Copyright (C) 2008 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I am running 64 bit openSUSE 11.1 with

lspci | grep -i nVidia

01:00.0 VGA compatible controller: nVidia Corporation GeForce 9500 GT (rev a1)

If you could give me some feedback on that I would be much obliged.

Did you include “/usr/local/cuda/include” in your search path?
Or maybe you installed the cuda toolkit in a directory other than /usr/local/cuda?

N.

Thank you for your comment. Indeed I have not installed CUDA in the default directory. Due to some computer settings I decided to install in my home directory and eventually the path is \home\c111269\cfd\cuda\cuda

I have added \cuda\bin to my PATH and \cuda\lib to LD_LIBRARY_PATH. The installer did not mention about INCLUDE directory. I have tried it as well but to no avail.

There’s a file called “common.mk” in the NVIDIA_SUDA_SDK/common directory.

Adjust this line:

CUDA_INSTALL_PATH ?= /usr/local/cuda

to point to the directory where you installed cuda and you should be good to go.

N.

Many thanks. Compilation worked like a charm! I have compiled bandwithTest and several other projects. However the former one has given me a sad ouput:

./bandwidthTest 

Running on......

	  device 0:Device Emulation (CPU)

Quick Mode

Host to Device Bandwidth for Pageable memory

cudaSafeCall() Runtime API error in file <bandwidthTest.cu>, line 667 : no CUDA-capable device is available.

I have found my card

/sbin/lspci | grep -i nVidia

01:00.0 VGA compatible controller: nVidia Corporation GeForce 9500 GT (rev a1)

on the supported products list. Have I installed the driver incorrectly? (I did through opensuse install software).

Moreover the device test gives

./deviceQuery 

CUDA Device Query (Runtime API) version (CUDART static linking)

There is no device supporting CUDA.

Device 0: "Device Emulation (CPU)"

  CUDA Capability Major revision number:		 9999

  CUDA Capability Minor revision number:		 9999

  Total amount of global memory:				 4294967295 bytes

  Number of multiprocessors:					 16

  Number of cores:							   128

  Total amount of constant memory:			   65536 bytes

  Total amount of shared memory per block:	   16384 bytes

  Total number of registers available per block: 8192

  Warp size:									 1

  Maximum number of threads per block:		   512

  Maximum sizes of each dimension of a block:	512 x 512 x 64

  Maximum sizes of each dimension of a grid:	 65535 x 65535 x 1

  Maximum memory pitch:						  262144 bytes

  Texture alignment:							 256 bytes

  Clock rate:									1.35 GHz

  Concurrent copy and execution:				 No

  Run time limit on kernels:					 No

  Integrated:									Yes

  Support host page-locked memory mapping:	   Yes

  Compute mode:								  Default (multiple host threads can use this device simultaneously)

Test PASSED

Press ENTER to exit...

Which driver and SDK version are you using?

Also make sure that libcuda.so is in your library path.

N.

Thanks again for your help. As for the versions:

NVIDIA Driver for Linux (SUSE 11.1) 185.18.14

Cuda compilation tools, release 2.2, V0.2.1221

SDK is also 2.2

Did you mean libcudart, by licuda? This is the only thing I can find and yes I have it in my LD_LIBRARY_PATH:

find ./cuda/ -name libcuda*

./cuda/cuda/lib/libcudart.so

./cuda/cuda/lib/libcudart.so.2

./cuda/cuda/lib/libcudart.so.2.2

No, libcuda.so should be located in your /usr/lib directory
or /usr/lib32 or /usr/lib64

N.

You’re absolutely right:

find /usr/ -name libcud*

/usr/lib64/libcuda.so.185.18.14

/usr/lib64/libcuda.so.1

Alas, adding it to PATH or LD_LIBRARY_PATH did not resolve the problem.

Have you noticed that the Device 0 is actually CPU not the graphic card? It look odd. This why I am concerned about my driver installation went smoothly.

I’ve encountered this problem before. Try creating a symbolic link /usr/lib64/libcuda.so which points to /usr/lib64/libcuda.so.1

N.

Very many thanks - problem resolved! Now both tests display GeForce9500 as device 0 and other programs are working as well. Your help was greatly appreciated. :-)

Hi, Nico and all:

I am having the same problem as AlmostSurelyRob has, except I am seeing it on a MacBook Pro. I had a fresh installation of cudatookit 2.2 and cudasdk 2-2.21 on a MacBook Pro with Mac OS X 10.5.8.

I have /usr/local/cuda/bin added into path, and /usr/local/cuda/lib added into DYLD_LIBRARY_PATH .

I post below the output of deviceQuery and bandwidthTest :

=============================
[dh11:bin/darwin/release] % ./deviceQuery
CUDA Device Query (Runtime API) version (CUDART static linking)
There is no device supporting CUDA.

Device 0: “Device Emulation (CPU)”
CUDA Capability Major revision number: 9999
CUDA Capability Minor revision number: 9999
Total amount of global memory: 4294967295 bytes
Number of multiprocessors: 16
Number of cores: 128
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 16384 bytes
Total number of registers available per block: 8192
Warp size: 1
Maximum number of threads per block: 512
Maximum sizes of each dimension of a block: 512 x 512 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
Maximum memory pitch: 262144 bytes
Texture alignment: 256 bytes
Clock rate: 1.35 GHz
Concurrent copy and execution: No
Run time limit on kernels: No
Integrated: Yes
Support host page-locked memory mapping: Yes
Compute mode: Default (multiple host threads can use this device simultaneously)

Test PASSED

Press ENTER to exit…

=============================

[dh11:bin/darwin/release] % ./bandwidthTest
Running on…
device 0:Device Emulation (CPU)
Quick Mode
Host to Device Bandwidth for Pageable memory
cudaSafeCall() Runtime API error in file <bandwidthTest.cu>, line 667 : no CUDA-capable device is available.

========================

Could anybody give an advice please?

Thanks

Change the LD_LIBRARY_PATH /usr/local/cuda/lib

to

/usr/local/cuda/lib64

and try again…for example by doing a:

export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

…where /usr/local/cuda is the cuda install directory…