How to set up OpenCL

From KratosWiki
Revision as of 18:25, 20 September 2010 by Roigcarlo (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to set up OpenCL

Before you can use OpenCL, your system need 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:

note: all commands below must be executed with superuser privileges In order to run the package falg it with execution permission

 # chmod -777

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

 # ./

for instance:

 # chmod -777
 # ./

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:

When you have the .run file (make sure you download the correct distro/version package)

 # chmod 777 ./
 # ./
Personal tools