How to set up OpenCL
How to set up OpenCL
Before you can use OpenCL, your system needs a set of libraries and compilers depending of your hardware.
Nvidia users:
In order to set up a correct OpenCL environment you need to install both dev-drivers and cuda tool set.
There are 2 choices to install dev-drivers
Download the latest version of GPU drivers that can be found here:
http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Linux
note: all commands below must be executed with superuser privileges In order to run the package falg it with execution permission
# chmod -777 devdriver_X.Y_linux_Z_VERSION.run
This installer can't be executed while running X-server, so, first it must shut down
Its recommended shift to another shell, ctrl+alt+F1 for instance.
# /etc/init.d/gdm stop
Note: use kdm instead of gdm in KDE environments
Run the downloaded package
# ./devdriver_X.Y_linux_Z_VERSION.run
for instance:
# chmod -777 devdriver_3.2_linux_64_260.24.run # ./devdriver_3.2_linux_64_260.24.run
reconfigure xserver
# dpkg-reconfigure xserver-xorg
and enable X-server again:
# /etc/init.d/gdm start
Note: ubuntu 10.04 use "Nouveau" as default nvidia driver. Before you can correct install the drivers, remove the current ones
# apt-get remove nvidia-* # apt-get remove xserver-xorg-video-nouveau
Now you should be able to check if drivers are correctly installed: System -> Administration -> Hardware Drivers
If driver is disabled, enable it and reboot the machine.
You can also use aptitude to install them
# apt-get install nvidia-current
and don't forget to install dev packages
# apt-get install nvidia-current-dev
Once you have correctly installed dev-drivers, its time to get CUDA tool set, you can download from:
http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Linux
When you have the .run file (make sure you download the correct distro/version package)
# chmod 777 ./cudatoolkit_3.2.9_linux_64_ubuntu10.04.run # ./cudatoolkit_3.2.9_linux_64_ubuntu10.04.run