Here are steps to install and configure Nvidia Cuda on Ubuntu 11.10
- Install gcc 4.4, g++ 4.4, and cpp 4.4.
- sudo apt-get install gcc-4.4 g++-4.4 cpp-4.4 build-essential
- Create symbolic links for gcc 4.4
- cd /usr/bin
- sudo mkdir gcc44
- cd gcc44
- sudo ln -s /usr/bin/gcc-4.4 gcc
- sudo ln -s /usr/bin/g++-4.4 g++
- sudo ln -s /usr/bin/cpp-4.4 cpp
- Install the nvidia drivers
- sudo apt-get install nvidia-current nvidia-current-dev nvidia-current-updates nvidia-current-updates-dev
- Download the current Cuda Toolkit and GPU Computing SDK for Ubuntu and the GPU Computing SDK, and save the .run files somewhere.
- chmod +x *.run
- sudo ./cudatoolkit_4.0.17_linux_32_ubuntu10.10.run
- Install with default options including paths
- ./gpucomputingsdk_4.0.17_linux.run
- Install where you want to play.
- For compiling the SDK examples, you also need to install
- sudo apt-get install freeglut3-dev libxi-dev
- sudo ln -s /usr/lib/libXmu.so.6 /usr/lib/libXmu.so
- sudo ln -s /usr/lib/nvidia-current/libGL.so /usr/lib/libGL.so
- Then go to the NVIDIA_GPU_COMPUTING_SDK_… folder. In the file C/common/common.mk change the line
- LINKFLAGS +=
- –>
- LINKFLAGS += -L/usr/lib/nvidia-current
- Add a following line at the end of /usr/local/cuda/bin/nvcc.profile
- compiler-bindir=/usr/bin/gcc44
- Make GPU computing SDK
- cd NVIDIA_GPU_COMPUTING_SDK_…
- make -j4 -i
- Set up $PATH and $LD_LIBRARY_PATH. Add the followings ~/.bashrc.
- export CUDA_HOME=/usr/local/cuda
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_HOME/lib
export PATH=$CUDA_HOME/bin:$PATH
- export CUDA_HOME=/usr/local/cuda
Enjoy!
Advertisement
January 11, 2012 at 2:44 pm |
can you explain why I should use ‘make -j4 -i’ instead of just ‘make’ ini direction number 8?
January 14, 2012 at 11:59 am |
“-j 4″ option creates four parallel compilation process. If you have more CPU cores, you’d better change to the higher number. “-i” means to ignore error and proceed. I added this option because there were a few link error with OpenGL library.
January 27, 2012 at 3:54 pm |
thanks for the reply
btw, the newest CUDA toolkit 4.1 has been released
can you help me by writing article how to install it in ubuntu 11.10? somehow I have no idea how to do it. thanks
alex