domenica 3 maggio 2009

How to install CUDA 2.1 on ubuntu 9.04
  • download and install kernel 2.6.29 from http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.29/
  • install the NVIDIA driver 180, and check it going to the nvidia console on System menu
  • download and install CUDA toolkit: CUDA Toolkit version 2.1 from http://www.nvidia.com/object/cuda_get.html into /usr/local/cuda
  • create variables
    export PATH=/usr/local/cuda/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/cuda/lib: $LD_LIBRARY_PATH
    and save it inside .bashrc on your home directory
  • download and install CUDA SDK: CUDA SDK 2.1 for Linux from http://www.nvidia.com/object/cuda_get.html into $(HOME)/NVIDIA_CUDA_SDK/
  • Now you have to install same other required libraries
    Open a terminal and using the sudo apt-get install command install the libraries:
    sudo apt-get install build-essential
    sudo apt-get install libxi6 libxi-dev
    sudo apt-get install libxmu6 libxmu-dev
    sudo apt-get install libc6-dev-i386
    sudo apt-get install libglut3-dev
  • open terminal, go to NVIDIA_CUDA_SDK directory, and type make to compile the source files.
  • If 'error: identifier "__builtin_va_arg_pack" is undefined' appear on terminal, add a forward declaration (int __builtin_va_arg_pack();) to stdio2.h
  • Execute make again and everything should work. If not try to install the required missing libraries.
  • If the make command reach the end, now you can go to the NVIDIA_CUDA_SDK/bin/linux/release directory and test the samples, ad example execute ./deviceQuery to see your video device properties