cudaSafeCall() Runtime API error in file <xxx>, line xx: unknown error. cuda sdk openGL apps s

I don’t know what happened, it could either be due to some updates on my system (but note that I didn’t update the kernel or anything like that) or the “make debug=1” in the sdk.

The problem is that cuda openGL stopped working.

$ ../../bin/linux/release/particles

grid: 64 x 64 x 64 = 262144 cells

cudaSafeCall() Runtime API error in file <particleSystem.cu>, line 94 : unknown error.

@ line 94: cutilSafeCall(cudaGLRegisterBufferObject(vbo));

$ ../../bin/linux/release/smokeParticles

Loaded '../../bin/linux/release/../../../projects/smokeParticles/data/floortile.ppm', 256 x 256 pixels

cudaSafeCall() Runtime API error in file <GpuArray.h>, line 168 : unknown error.

@ line 168: cutilSafeCall(cudaGLRegisterBufferObject(vbo));

$ ../../bin/linux/release/volumeRender

Read '../../bin/linux/release/../../../projects/volumeRender/data/Bucky.raw', 32768 bytes

Press '=' and '-' to change density

	  ']' and '[' to change brightness

	  ';' and ''' to modify transfer function offset

	  '.' and ',' to modify transfer function scale

cudaSafeCall() Runtime API error in file <volumeRender.cu>, line 317 : unknown error.

@ line 317: cutilSafeCall(cudaGLRegisterBufferObject(pbo)); 

$ ../../bin/linux/release/matrixMul

Processing time: 0.221000 (ms)

Test PASSED

$ ../../bin/linux/release/deviceQuery

There is 1 device supporting CUDA

Device 0: "GeForce 9600M GT"

  Major revision number:						 1

  Minor revision number:						 1

  Total amount of global memory:				 536150016 bytes

  Number of multiprocessors:					 4

  Number of cores:							   32

  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:									 32

  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.25 GHz

  Concurrent copy and execution:				 Yes

Test PASSED

$ ../../bin/linux/release/bandwidthTest

Running on......

	  device 0:GeForce 9600M GT

Quick Mode

Host to Device Bandwidth for Pageable memory

.

Transfer Size (Bytes)   Bandwidth(MB/s)

 33554432			   1927.4

Quick Mode

Device to Host Bandwidth for Pageable memory

.

Transfer Size (Bytes)   Bandwidth(MB/s)

 33554432			   1273.8

Quick Mode

Device to Device Bandwidth

.

Transfer Size (Bytes)   Bandwidth(MB/s)

 33554432			   16120.5

&&&& Test PASSED

Any ideas on how to fix my problem?

Thanks

This problems is because you haven’t linked the libGL.so properly.

I recommend you to link it, using this :

sudo ln -s /usr/lib/libGL.so.260.19.44 /usr/lib/libGL.so

Notice that this command may change due the Linux flavor that u use and

the libGL versión that had been installed.

If you have more questions about it you can consult this little guide: