Ubuntu: Running OpenCL code on 14.04 with an NVIDIA GPU



Question:

I would like to use OpenCL with my Ubuntu desktop, with an NVIDIA Quadro K600 GPU. It is running the latest version of ubuntu (14.04.3 LTS).

I cannot successfully run an OpenCL Hello World example using this GPU, but I have. In the past, this was possible using the CUDA toolkit 6.5, which provided an openCL library and headers in /usr/local/cuda-6.5/

What are the steps to obtain a working OpenCL installation for this system? Various attempts I have made have resulted in an OpenCL library, but none so far seem to actually work.


Solution:1

This has become simpler since the last time I attempted this. The latest Nvidia drivers can be installed with

sudo apt-get install nvidia-current  

and

sudo apt-get install cuda  

will install various Nvidia tools in (at the time of this writing) /usr/local/cuda-7.0. This includes the library and include path needed to use OpenCL. On my machine these are

/usr/local/cuda-7.0/lib64/libOpenCL.so  /usr/local/cuda-7.0/include/   

The include path contains CL/cl.h


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »