Sunday, December 20, 2009

Ubuntu, OpenCL and NVIDIA

To be able to compile OpenCL programs on Ubuntu with an nvidia card:

Find a driver with OpenCL support: 195.17 works (but later ones do not). Download it by searching nvidia's site, or try here.

This step is very important: Disable Ubuntu's hardware drivers if you have enabled them. System -> Administration -> Hardware Drivers.

sudo apt-get install build-essential

Now ctrl+alt+F1 to switch to a terminal; sudo stop gdm to kill Xorg; cd ~/Downloads; chmod 700 cudadriver*; sudo ./cudadriver*. Accept all the default options, including installing 32bit libs if you're on a 64bit system and resetting your xorg.conf. I had to copy /usr/lib32/libglut* to /usr/lib. sudo apt-get --reinstall install freeglut3 freeglut3-dev. sudo start gdm. You're all set.

No comments: