I'm trying to get CUDA working on Ubuntu. I can install any flavor and version, but have begun with Ubuntu 12.04 because I can't get the network set up with 11.04.
This question is similar: No Cuda in Ubuntu 12.04? and links to https://sn0v.wordpress.com/2012/05/11/installing-cuda-on-ubuntu-12-04/ but that blog post appears... incomplete. The author mentions in the comments below that his instructions above don't work.
Here is what I have done:
0) Installed Ubuntu 12.04 64-bit on ASUS N56V with Nvidia GT 650M
1) According to the official Ubuntu docs here https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia I should have "Additional Drivers" available, but I do not have any.
2) According to http://www.nvidia.com/content/cuda/cuda-downloads.html this OS version is not yet support.
3) How can I get nVidia CUDA or OpenCL working on a laptop with nVidia discrete card/Intel Integrated Graphics? says CUDA will work. Bumblebee is needed to display with OpenGL. Follow the instructions in step 4) to install Bumblebee
4) Try to follow the instructions here, which suggest using Bumblebee: How well do laptops with Nvidia Optimus work?
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates sudo add-apt-repository ppa:bumblebee/stable sudo apt-get update sudo apt-get install bumblebee bumblebee-nvidia optirun firefox & # HARD REBOOT :(
It doesn't reboot if glxspheres has been run once...
Get the 11.04 CUDA code (Toolkit and SDK, NOT driver) from http://www.nvidia.com/content/cuda/cuda-downloads.html
wget "http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/cudatoolkit_4.2.9_linux_64_ubuntu11.04.run" wget "http://developer.download.nvidia.com/compute/cuda/4_2/rel/sdk/gpucomputingsdk_4.2.9_linux.run"
sudo sh ./cudatoolkit_4.2.9_linux_64_ubuntu11.04.run
Then add the following two lines to .bashrc
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib:$LD_LIBRARY_PATH export PATH=/usr/local/cuda/bin:$PATH
sh gpucomputingsdk_4.2.9_linux.run # don't run under sudo cd ~/NVIDIA_GPU_Computing_SDK/C LINKFLAGS=-L/usr/lib/nvidia-current make -j
Lots of link errors...
6) Lets try PCL, the reason for all of this...
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl sudo apt-get update sudo apt-get install libpcl-all sudo apt-get install libboost-dev libboost-mpi-dev libeigen3-dev libflann-dev libvtk5-dev libqhull-dev openni-dev sphinxbase-utils libsphinxbase-dev libsphinxbase1 cmake cmake-curses-gui libvtk5-qt4-dev libegl1-mesa libegl1-mesa-dev libegl1-mesa-drivers libgl1-mesa-glx libglew1.6-dev libglu1-mesa libglu1-mesa-dev svn co http://svn.pointclouds.org/pcl/trunk pcl-trunk cd pcl-trunk; mkdir build; cd build cmake -DCUDA_ARCH_BIN=30 -DCMAKE_BUILD_TYPE=Release .. make kinfu_app -j8
Error: CUDA driver version is insufficient for CUDA runtime version /home/user/pcl-trunk/gpu/containers/src/initialization.cpp:76