Error with clGetPlatformIDs

Hi guys,

I recently started using OpenCL on Ubuntu 10.04 (NVIDIA 8400M GS with CUDA 3.2 and dev_driver 260.19.26).

Initially my programs were running okay with a few hiccups (the kernel file was not reading math functions such as sqrt() and atan() and gives a clbuilderror (-11) ). But now i seem to have run into a much bigger problem. My driver failed to load at startup so i reinstalled it and put its name in the /etc/modules file and now it seems to be working ok. But the problem is that now when i run my programs i get an error saying that the function clGetPlatformIDs returned -1001. Do any of you know what is the problem and how can it be solved. Also, i wanted to check whether the NVIDIA GPU can actually run commands like sqrt() or not, which must run as i read that it does exist in the Khronos OpenCL specification and on NVIDIA’s speciafication manual too.

I also installed the gpu_computing_sdk and ran oclDeviceQuery on it. It gives me no result whatsoever and just keeps on running. Any clue to what is happening?

Hoping for a prompt reply. Thanks in advance.

Sounds like the system is not even finding an OpenCL device. Are you remoting in by any chance?

No I am running the code on my system. What suggestions do you have?

Check your access restrictions on /dev/nvidia*, your account must be allowed to write to those devices. That can cause such program hangs.

I think I also had a problem once where it was necessary to reinstall driver or toolkit again – but that might have been a problem of a certain release, where it was important to do this in the right order according to the release notes.