Archive for September, 2012

Blender: cycles renderer and CUDA in Ubuntu 12.10 on nvidia GPU

If you want to run blender ootb in ubuntu with CUDA support you will make a sad face at first.

Maybe at first you search for the preference for CUDA like its stated in the internet under “User-Preferences->System”, and dont find it. Then maybe you have a look at the addons for the cycles renderer and will see an error message stating “missing script files”. If you then try the version from debian (Step 1 and 2 in this guide) and install CUDA (Step 3), as render result you will only get a black screen, and maybe you will find the error message “error — unsupported GNU version! gcc 4.7 and up are not supported!” so cuda kernel compilation failed. So this is what step 4 in this guide is for.

Maybe this is going to change as 12.10 is still in beta, if not, follow this steps. I dont know if it also works for other Ubuntu versions as 12.04 Precise Pangolin.

There the two problems as of now are:

  • The blender in in current ubuntu packages does not support CUDA with cycles renderer.
  • CUDA needs gcc version <4.7, but on Quetzal version 4.7 is default, so CUDA fails to compile.

You need to have the proprietary nvidia drivers and some additional Packages installed:

sudo apt-get install nvidia-current build-essential gcc-4.6 freeglut3-dev

1. Download and install blender 2.63a-2 from the debian-experimental repository. As it depends on 2 packages that are newer in debian experimental, you have to download two additional packages, namely libglew1.7 and libpng15-15. Choose the right .deb package for your architecture (i386 or amd64 would be the most common depending if you are on 32 or 64 bit) from the following sites:

Blender: http://packages.debian.org/experimental/blender

libglew: http://packages.debian.org/sid/libglew1.7
* Edit, libpng package changed, thx to majorkillsmurfsmrblurgle in the comments*
libpng: http://snapshot.debian.org/package/libpng/1.5.11-1/#libpng15-15_1.5.11-1

2. Install the packages with dpkg. For me the command is

sudo dpkg -i blender_2.63a-2_amd64.deb libglew1.7_1.7.0-3_amd64.deb \
     libpng15-15_1.5.11-1_amd64.deb

3. Get CUDA toolkit from nvidia and install it by running the installer. Get the right package from http://developer.nvidia.com/cuda/cuda-downloads and install it to the default location (if you change the location consider this in step 3) For Quetzal you can use the CUDA toolkit for Ubuntu 11.04

Install the toolkit with:

chmod +x cudatoolkit_4.2.9_linux_64_ubuntu11.04.run
sudo ./cudatoolkit_4.2.9_linux_64_ubuntu11.04.run

4. Link gcc4.6 to the CUDA installation, so it does not use the default 4.7

sudo ln -s /usr/bin/gcc-4.6 /usr/local/cuda/bin/gcc

So thats it.

Advertisements

, ,

15 Comments

%d bloggers like this: