When calling clGetPlatformIDs in my application I get a very strange error code. I get (-64) which is not even a valid return code as defined in cl.h (it stops at -63!).
To be sure it wasn’t an error in my code, I tried a OpenCL sample from Nvidia’s website (oclSimpleD3D10Texture) and I get the exact same error:
[i]D:\NVIDIA GPU Computing SDK\OpenCL\bin\win64\Debug\oclSimpleD3D10Texture.exe Starting…
Error -64 in clGetPlatformIDs Call !!!
!!! Error # -1000 (Unspecified Error) at line 423 , in file .\oclSimpleD3D10Texture.cpp !!![/i]
Anybody knows what could be the meaning of that error code? I tried googling for it but it seems no one has ever had this error ever…
BTW, I have an NVidia GTX 460.
Probably you have an old CL.h file. Error -64 is defined in cl.h from OpenCL 1.2 headers as:
#define CL_INVALID_PROPERTY -64
You can go to Khronos website and download the latest headers from there.
Ah! Thanks for the heads up on the newer file.
I’m still not sure why the call to clGetPlatformIDs fails though… Since I get the same error in an official code sample, I’m guessing that the problem isn’t my code… It is possible that a hardware problem can cause this?
My guess is that it could be a driver problem. You can try running GPUCapsViewer and see if OpenCL is detected as it should use the same APIs to query CL device information. If not, try reinstalling the latest driver. If GPUCapsViewer detectes it and runs its demos fine, then driver is fine and something else is happening, but hard to know with limited information.