系统:64位Ubuntu14.04、windows7 双系统
cuda源:cuda-repo-ubuntu1404_6.5-14_amd64.deb
命令输入:
①
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-14_amd64.deb (下载源)
sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb (安装仓库)
sudo apt-get update (更新)
sudo apt-get install cuda (安装cuda)
②
sudo gedit /etc/profile
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64 (设置环境变量)
cuda-install-samples-8.0.sh ~ (安装例子)
③
cat /proc/driver/nvidia/version (驱动版本)
nvcc -V i (编译器版本)
④
cd /home/usrname/NVIDIA_CUDA-8.0_Samples
make (编译它们)
cd ./bin/x86_64/linux/release
./deviceQuery (查看设备)
⑤
nvcc -o filename filename.cu (自定义编译)
./filename (运行程序)
参考链接:http://blog.csdn.net/xizero00/article/details/43227019
http://www.th7.cn/system/lin/201504/103380.shtml
http://blog.csdn.net/masa_fish/article/details/51882183