4

I am having a really hard time getting OpenCL working in Trusty or Mint 17. Im using ppa:xorg-edgers, tried updates and even nvidia-340.

sudo apt-get install nvidia-331 nvidia-331-uvm nvidia-cuda-toolkit nvidia-cuda-dev opencl-headers nvidia-opencl-dev clinfo

Rebooting and then

babak@ASUS-G750JH:~$ clinfo
clinfo: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1: no version information available (required by clinfo)
I: ICD loader reports no usable platforms

I have tried this on two Intel based systems with Nvidia GPU's a desktop with a GeForce 280, and a laptop with GeForce 780M with a physically disabled Optimus by the Asus, it only has the Nvidia GPU. A G750JH.

Has anyone done this successfully? Can I roll back and remove the PPA and use the default repo's, would that even make a difference?

Bob R
  • 605
  • 1
  • 13
  • 25

2 Answers2

2

For the xorg-edgers nvidia-346 packages, I get it working by installing also the nvidia-opencl-icd-346 package and its dependency ocl-icd-libopencl1.

stl
  • 61
  • 4
  • This saved my bacon on 16.04 as well after installing the cuda toolkit and trying everything to get my Titan X to show up in `clinfo`. Just change `346` for `367` or whatever the latest nvidia driver you have installed. Thanks! – Ryan Lynch Jun 26 '16 at 03:16
0

Im not 100% sure what the issue was, but seems that the ppa:xorg-edgers, may have an issue. Whatever is broken the process below fixes the issue and results in both Cuda and OpenCL working with Nvidia and Ubuntu 14.04 x64

sudo apt-get install dkms linux-headers-generic fakeroot build-essential
sudo apt-get remove --purge nvidia-*
sudo apt-get purge nvidia*
sudo ./NVIDIA-Linux-x86_64-346.47.run

Downloaded from Nvidia, 340.xx supports legacy cards Yes for all options

sudo reboot chmod +x cuda-repo-ubuntu1404_6.5-14_amd64.deb 
dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb
chmod +x cuda_6.5.14_linux_64.run  sudo ./cuda_6.5.14_linux_64.run

Choose option to leave out the GPU Driver

sudo apt-get update
sudo apt-get install cuda

add to bottom of bashrc

export CUDA_HOME=/usr/local/cuda-6.5 
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64 
export GLPATH=/usr/lib/
PATH=${CUDA_HOME}/bin:${PATH} 
export PATH

sudo reboot

./ocore_601_OpenCL_v20 --devices

Downloaded from http://stanford.edu/~yutongz/ocores/

Outputs:

OpenCL compatible devices: 
name: GeForce GTX 780M | platformId: 0 deviceId: 0

cd ~/NVIDIA_CUDA-6.5_Samples/1_Utilities/deviceQuery
make
./deviceQuery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 780M"
......
Truncated 
Bob R
  • 605
  • 1
  • 13
  • 25