ubuntu12.04配置NVIDIA cuda7.0经验帖
来源:互联网 发布:Mac可以装精简版w10 编辑:程序博客网 时间:2024/06/05 04:56
今天安装了最新版本的cuda7.0,第一次安装,并测试成功。先将安装步骤,整理如下。
————————————————————————————————————————————————————————————
配置手册:http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html
这个针对linux系统的,讲的很复杂,看了一遍没看懂,最后参考Rachel-Zhang的安装文档(http://blog.csdn.net/abcjennifer/article/details/23016583),安装成功。
——————————————————————————————
一、 判断安装环境:
The setup of CUDA development tools on a system running the appropriate version of Linux consists of a few simple steps:
- Verify the system has a CUDA-capable GPU.
- Verify the system has a supported version of Linux.
- Verify the system has gcc installed
下.run好了,有点大1.1G,可到我的云盘里下载。
三、Ctrl+Alt+F1, 登陆
1 删除已有nvidia,拉黑名单
- sudo apt-get remove --purge nvidia*
- sudo nano /etc/modprobe.d/blacklist.conf
- lacklist amd76x_edac
- blacklist vga16fb
- blacklist nouveau
- blacklist rivafb
- blacklist nvidiafb
- blacklist rivatv
- sudo service lightdm stop
- chmod +x cuda_7.0.79_linux_64.run
- sudo ./cuda_7.0.79_linux_64.run
得到以下安装结果
Driver: Installed
Toolkit: Installed In /Usr/Local/Cuda-7.0
Samples: Installation Failed. Missing Required Libraries.
也就是SDK安装失败,这个官方手册上也提到了解决方案。
3 此时可以单独安装sdk
解压sdk:
- sh cuda_7.0.79_linux_64.run -extract=/path/to/extract/dir/
到根目录下的/path/to/extract/dir/去找cuda-samples_7.0.79_*******.run, 安装
- sh cuda-samples_7.0.79_*******.run
$sudo gedit etc/profile或~/.bashrc
- export PATH=$PATH:/usr/local/cuda-5.5/bin
- export LD_LIBRARY_PATH=/usr/local/cuda-5.5/lib64:/lib
使之生效:
source /etc/profile(对应profile)或sudo ldconfig(对应bashrc)
Hello World
In the spirit of all good programming assignments, we’ll start off with a simple “Hello World†app that will give a good starting place for making your own programs.
Create a new folder in your CUDA work directory and open a new file:
- $ mkdir ~/Documents/CUDA/CUDA_Hello_World
- $ cd ~/Documents/CUDA/CUDA_Hello_World
- $ nano CUDA_Hello_World.cu
In that file, write out the basic Hello World program:
- #include <stdio.h>
- __global__ void kernel(void) {
- }
- int main(void) {
- kernel<<<1,1>>>();
- printf("Hello, World!\n");
- return 0;
- }
Save and exit the editor. Then, compile the program:
- $ nvcc CUDA_Hello_World.cu -o CUDA_Hello_World
There shouldn’t be any errors. Therefore, you can just run it!
- $ ./CUDA_Hello_World
- ubuntu12.04配置NVIDIA cuda7.0经验帖
- Ubuntu12.04配置NVIDIA cuda5.5经验帖
- Ubuntu12.04配置NVIDIA cuda5.5经验帖
- Ubuntu12.04配置NVIDIA cuda5.5经验帖
- Ubuntu12.04配置NVIDIA cuda5.5经验帖
- Ubuntu12.04配置NVIDIA cuda5.5经验帖
- UBUNTU12.04 + CUDA7安装与配置
- Ubuntu14.04(Nvidia和Intel双显卡)配置NVIDIA cuda7.5+cuDNN+MXnet
- Ubuntu14.04 NVIDIA显卡驱动安装 + Cuda7.5 + cudnn6.0
- 【经验帖】Ubuntu12.04安装cuda6.0以及配置Nsight开发环境教程
- ubuntu14.04+cuda7.0环境变量配置
- Ubuntu15.04 Fast-RCNN配置 cuda7.0
- Set up Caffe on Ubuntu14.04 64bit+NVIDIA GTX970M+CUDA7.0
- ubuntu14.04安装cuda7.0 (Nvidia独显计算,Intel集显显示)
- ubuntu16.04+nvidia gt740m+cuda7.5+caffe安装、测试经历
- ubuntu16.04+nvidia gt740m+cuda7.5+caffe安装、测试经历
- ubuntu12.04,经验
- ubuntu12.04 配置android 编译环境,个人经验小结
- C++学习笔记之:其他考证
- 【第二章】 IoC 之 2.3 IoC的配置使用——跟我学Spring3
- 8个最佳PHP库
- 趁着我们还年轻
- 追查dll在server2003中,无法加载的问题
- ubuntu12.04配置NVIDIA cuda7.0经验帖
- 怎么转换pdf格式为Excel文件
- 【RTSP/RTP流媒体】7、RTP数据包的传输方式
- 正常的javaWEB项目在win7机器启动报错警告: RMI TCP Accept-59825: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,p
- 今天好像没下雨了
- PHP程序员突破成长瓶颈 - 附学习建议
- 再谈如何将android studio项目转换成eclipse
- UML时序图的画法
- 剑指Offer之 - 第一个只出现一次的字符