The huge diversity of systems and the marked differences between OpenCL vendors and driver versions makes it impossible to give an comprehensive overview of how to setup OpenCL. We only can give you an example, in this case for NVIDIA driver version 331.89 on Ubuntu 14.04. We hope that this will serve you as a first impression and will help to solve possible problems of your specific setup.
The principle OpenCL function flow is like this:
darktable -> libOpenCL.so -> libnvidia-opencl.so.1 -> kernel driver module(s) -> GPU
darktable dynamically loads
libOpenCL.so, a system library which
must be accessible to the system's dynamic loader (
libOpenCL.so will read the vendor specific information file
/etc/OpenCL/vendors/nvidia.icd) to find the library which
contains the vendor specific OpenCL implementation.
The vendor specific OpenCL implementation comes as a library
libnvidia-opencl.so.1 (which in our case is a symbolic link to
libnvidia-opencl.so.1 needs to talk to the vendor specific kernel
nvidia_uvm via device
At system startup the required device special files (/dev/nvidia*) need to be created. If
this does not happen on your system by default, the easiest way to set them up and make
sure all modules are loaded is installing the
(which, at the time of this writing, is only available for “utopic”, but
works well with “trusty” and “Mint 17”). You can grab it at
A user account which wants to make use of OpenCL from within darktable needs to have read-write access to NVIDIA's device special files. On some systems these files allow world read-write access by default, which avoids permission issues but might be debatable in terms of system security. Other systems restrict the access to a user group, e.g. “video”. In that case your user account has to be member of that group.
To summarise, the packages which needed to be installed in this specific case were:
The list of NVIDIA related kernel modules as reported by
The list of NVIDIA related device special files (
ls -l /dev/nvidia*)
should read like:
crw-rw-rw- 1 root root 195, 0 Jul 28 21:13 /dev/nvidia0 crw-rw-rw- 1 root root 195, 255 Jul 28 21:13 /dev/nvidiactl crw-rw-rw- 1 root root 250, 0 Jul 28 21:13 /dev/nvidia-uvm
Beware that the major/minor numbers (e.g. 250/0 for
in this example) may vary depending on your system.