Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install OpenCL on Ubuntu 14.04 and Nvidia

I have a nvidia gpu and I need to install opencl as dependency for a library I use. I have been searching for a solution for hours. Here are the steps I made :

1- Download Intel SDK for OpenCL™ Applications

2- Unpacked the tarball

3- changed the rpm files to deb

for f in *.rpm; do
   fakeroot alien --to-deb $f
 done
 for f in *.deb; do
   sudo dpkg -i $f
 done

Then, I downloaded OpenCL device query file provided by Nvidia by this line

g++ -o oclDeviceQuery.cpp -I/opt/intel/opencl-1.2-sdk-6.0.0.1049/include oclDeviceQuery.cpp -lOpenCL

It gave me an error in #include <oclUtils.h>

fatal error: oclUtils.h: No such file or directory

I tried to check if the library I need would see OpenCL but it didn't. I am doing something wrong but I can't figure it out.

like image 475
youssef93 Avatar asked Dec 24 '22 09:12

youssef93


1 Answers

Since you want to use your nVidia GPU, you will need to install the nVida OpenCL runtime, which is part of the GPU driver. You should not need the Intel OpenCL SDK. A simple

sudo apt-get install nvidia-opencl-dev

should install everything you need. Alternatively, download nVidia CUDA 7.5 from https://developer.nvidia.com/cuda-downloads. This also includes OpenCL.

like image 89
Jan-Gerd Avatar answered Jan 29 '23 11:01

Jan-Gerd