Re: CL_DEVICE_NOT_AVAILABLE when creating CLContext with 64-bit Java on GTX 970
Posted by
tinkerthinker on
Jun 22, 2016; 8:51am
URL: https://forum.jogamp.org/CL-DEVICE-NOT-AVAILABLE-when-creating-CLContext-with-64-bit-Java-on-GTX-970-tp4036560p4036841.html
I've been trying to solve this problem myself. I've tried lots of things, and am finally making progress by following these steps:
http://streamcomputing.eu/wp-content/uploads/kalins-pdf/singles/install-opencl-on-debianubuntu-orderly.pdfSpecifically:
1) do:
echo "/usr/local/cuda/lib64" > /etc/ld.so.conf.d/opencl-vendor-nvidia.conf
echo "/usr/local/cuda/lib" >> /etc/ld.so.conf.d/opencl-vendor-nvidia.conf
then run:
ldconfig
2) then do this (your actual directories and ".so" suffixes may vary)
sudo ln -s /usr/local/cuda/lib64/libOpenCL.so /usr/lib64/libOpenCL.so.1.0
sudo ln -s /usr/local/cuda/lib/libOpenCL.so /usr/lib/libOpenCL.so.1.0
and also:
sudo ln -s /usr/lib64/libOpenCL.so.1.1 /usr/lib64/libOpenCL.so.1
sudo ln -s /usr/lib64/libOpenCL.so.1 /usr/lib64/libOpenCL.so
sudo ln -s /usr/lib64/libOpenCL.so.1.1 /usr/lib64/libOpenCL.so.1.0
3) AND MOST IMPORTANTLY:
check "/etc/OpenCL/vendors/nvidia.icd" to make sure they reference the OpenCL library!
My Ubuntu setup only had a reference to libopencl.so, even though my computer didn't have such a file installed. All my shared OpenCL libraries were named "libOpenCL.so", so I added this to the nvidia.icd file:
"libOpenCL.so"
"libcuda.so"
Now I get error -1001 (No valid ICDs found) instead of -5 (CL_OUT_OF_RESOURCES). So I'm not done yet, but I'm making progress! I'm thinking I need to install some ICD software that matches my driver, hope that's it.
Good luck! Hope this helps someone.