! Error # -32 at line 70 , in file oclTranspose.cpp ! CUDA tests all pass, OpenCL all fails,

Running Ubuntu 10.10 with automatically installed nvidia-current driver, version 260.19.06.

Installed CUDA Toolkit for Ubuntu Linux 10.04 64 bit from http://developer.nvidia.com/object/cuda_3_2_downloads.html#Linux
http://www.nvidia.com/object/thankyou.html?url=/compute/cuda/3_2_prod/toolkit/cudatoolkit_3.2.16_linux_64_ubuntu10.04.run

Installed “GPU Computing SDK code samples and more” from http://developer.nvidia.com/object/opencl-download.html http://developer.download.nvidia.com/compute/cuda/2_3/opencl/sdk/gpucomputingsdk_2.3a_linux.run into default directory ~/NVIDIA_GPU_Computing_SDK

Built CUDA stuff via “cd ~/NVIDIA_GPU_Computing_SDK/C/ ; make”. Got 6 files in /NVIDIA_GPU_Computing_SDK/C/bin/linux/release, all run, and generally say things like “TEST PASSED”.

Built OpenCL examples via “~/NVIDIA_GPU_Computing_SDK/OpenCL/ ; make”. No errors. Everything in ~/NVIDIA_GPU_Computing_SDK/OpenCL/bin/linux/release says something including “!!! Errror # -32 at line…”

$ ./oclTranspose
./oclTranspose Starting…

!!! Error # -32 at line 70 , in file oclTranspose.cpp !!!

Exiting…

$ ./oclBlackScholes
./oclBlackScholes Starting…

Allocating and initializing host memory…
Initializing OpenCL…

!!! Error # -32 at line 112 , in file Source/oclBlackScholes.cpp !!!

Exiting…

$ ./oclConvolutionSeparable
./oclConvolutionSeparable Starting…

Allocating and initializing host memory…
Initializing OpenCL…

!!! Error # -32 at line 53 , in file src/main.cpp !!!

Exiting…

$ head -n 70 ./src/oclTranspose/oclTranspose.cpp | tail -n 1
shrCheckError(ciErrNum, CL_SUCCESS);

$ head -n 112 ./src/oclBlackScholes/Source/oclBlackScholes.cpp | tail -n 1
shrCheckError(ciErrNum, CL_SUCCESS);

$ head -n 53 ./src/oclConvolutionSeparable/src/main.cpp | tail -n 1
shrCheckError(ciErrNum, CL_SUCCESS);

Hey look, a pattern.

Any idea what the problem is?

Using Device 0: “GeForce 9300 GE”

$ lspci | grep -i vga
01:00.0 VGA compatible controller: nVidia Corporation G98 [GeForce 9300 GE] (rev a1)

Somebody else was able to get OpenCL working on Ubuntu 10.10: http://forums.nvidia.com/index.php?showtopic=187084

“Error code -32 means CL_INVALID_PLATFORM, so I think you can run oclDeviceQuery sample to check if you are working on a valid platform.”
“You’re passing null in for the platform. You now have to pass in a valid platform object to create a context.”

$ ./oclDeviceQuery

OpenCL Device Info:

There are no devices supporting OpenCL (return code -32)

http://www.nvidia.com/object/cuda_gpus.html#Q2
GeForce 9300 mGPU, GeForce 9300M GS, GeForce 9300M G are listed as supported. Is my 9300 GE really not supported?

The response I’ve gotten from the #opencl channel on irc.freenode.net is that it looks like all of the OpenCL demos included with Nvidia’s current OpenCL SDK are incompatible with it.

A problem with the newer version requiring a specified platform, and old versions allowing 0 or null or something.