Login  Register

Re: CL_DEVICE_NOT_AVAILABLE when creating CLContext with 64-bit Java on GTX 970

Posted by Wade Walker on Apr 01, 2016; 12:43am
URL: https://forum.jogamp.org/CL-DEVICE-NOT-AVAILABLE-when-creating-CLContext-with-64-bit-Java-on-GTX-970-tp4036560p4036573.html

SuspiciousDroid wrote
I must be either missing some other device drivers or have something else installed that messes with stuff.

I'm more leaning towards "something is messing with stuff" because first running some OpenGL initialization was able to make OpenCL work. If I were missing drivers, loading OpenGL stuff really shouldn't matter.
The GLProfile.initSingleton() call that you inserted just changes exactly when the nvidia library gets loaded. Putting that call in a static block makes the init happen at class load time, instead of the first time you use the API.

One thing to check would be to make sure you don't have any outdated nvidia or OpenGL libraries lying around your hard drive anywhere. The loadLibrary() call searches a bunch of different paths to find stuff, so it might be finding an old one in the wrong place unless you force it. That might be why the non-nvidia OpenCL demos work -- they might have hard-coded their library path, or they may be searching manually in a different order.

Another thing to try is Process Explorer (https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx). It will show you the path to every DLL loaded by a process, so you can compare where your working vs. non-working programs are getting their DLLs, or see what else might be getting loaded.