在Ubuntu 12.10 GeForce GT 630上安装CUDA

4个

您对在Ubuntu 12.10上安装CUDA API的印象如何?我已经读到了与gcc的某些不兼容(此处即为),您必须重新安装v.4.4,但即使那样,您也可能会破坏系统。因为我不想再次重新安装sys(我最近做了几次:p),所以我想问一下这个脚本在amd proc上的x64 Ubuntu 12.10上是否安全。

我接受的答案允许使用4.6安装CUDA 3组件,但驱动程序不合适,也许只有gcc-4.4和g ++-4.4确实合适-现在我尝试4.4

因此,请阅读Soroosh129的答案,然后按照他的描述应用我的其他建议。

补充笔记:

您必须将CUDA添加到PATH和LD_LIBRARY_PATH,我已在我的主目录和根主目录文件夹中将以下内容添加到.bashrc中:

export PATH=$PATH:/usr/local/cuda-5.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-5.0/lib64:/lib

终于我安装了没有驱动程序。只是CUDA Toolkit和不带驱动程序的示例,并使用我的默认“ NVIDIA nvidia-current的NVIDIA二进制Xorg驱动程序,内核模块和VDPAU库”。结果

> Toolkit:Installed, Samples:Instaled

 but also 

> "Incomplete installation. this didn't install CUDA driver. driver
> version at least 304.54 required for CUDA 5.0 to work"

可能这是正确安装的,我在时钟示例中完成了make,结果如下:

me@comp:/usr/local/cuda-5.0/samples/0_Simple/clock$ ls
clock.cu  Makefile  NsightEclipse.xml  readme.txt
me@comp:/usr/local/cuda-5.0/samples/0_Simple/clock$ sudo make
[sudo] password for me: 
/usr/local/cuda-5.0/bin/nvcc -m64  -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/usr/local/cuda-5.0/include -I. -I.. -I../../common/inc -o clock.o -c clock.cu
g++ -m64 -o clock clock.o -L/usr/local/cuda-5.0/lib64 -lcudart 
mkdir -p ../../bin/linux/release
cp clock ../../bin/linux/release
me@comp:/usr/local/cuda-5.0/samples/0_Simple/clock$ ./clock
CUDA Clock sample
GPU Device 0: "GeForce GT 630" with compute capability 2.1

Total clocks = 54830
me@comp:/usr/local/cuda-5.0/samples/0_Simple/clock$ 

再举一个例子:

me@comp:/usr/local/cuda-5.0/samples/0_Simple$ cd asyncAPI
me@comp:/usr/local/cuda-5.0/samples/0_Simple/asyncAPI$ ls
asyncAPI.cu  Makefile  NsightEclipse.xml  readme.txt
me@comp:/usr/local/cuda-5.0/samples/0_Simple/asyncAPI$ sudo make
/usr/local/cuda-5.0/bin/nvcc -m64  -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/usr/local/cuda-5.0/include -I. -I.. -I../../common/inc -o asyncAPI.o -c asyncAPI.cu
g++ -m64 -o asyncAPI asyncAPI.o -L/usr/local/cuda-5.0/lib64 -lcudart 
mkdir -p ../../bin/linux/release
cp asyncAPI ../../bin/linux/release
me@comp:/usr/local/cuda-5.0/samples/0_Simple/asyncAPI$ ls
asyncAPI  asyncAPI.cu  asyncAPI.o  Makefile  NsightEclipse.xml  readme.txt
me@comp:/usr/local/cuda-5.0/samples/0_Simple/asyncAPI$ ./asyncAPI
[./asyncAPI] - Starting...
GPU Device 0: "GeForce GT 630" with compute capability 2.1

CUDA device [GeForce GT 630]
time spent executing by the GPU: 32.30
time spent by CPU in CUDA calls: 0.04
CPU executed 114066 iterations while waiting for GPU to finish
me@comp:/usr/local/cuda-5.0/samples/0_Simple/asyncAPI$ 

是关于StackOverflow的相关问题。

谢谢Soroosh129!

在此处输入图片说明

Soroosh129

安装CUDA工具包

下载CUDA工具包

首先从此处下载适用于Ubuntu 11.10的CUDA工具包还可以从repos中获得CUDA工具包,因此也许可以使用,但我尚未对其进行测试:

sudo apt-get install nvidia-cuda-toolkit

After you have downloaded the *.run file place it where you can find it easily, for example on the desktop.

Prerequisites:

Before installing the CUDA toolkit, first install freeglut3 as it is needed by CUDA Samples:

sudo apt-get install freeglut3 freeglut3-dev

Then it is recommended that you make a sim link to this version of freeglut just in case, but you might be OK if you don't have any other versions of freeglut:

First remove the existing sim link:

sudo rm /usr/lib/libglut.so

Then add your own sim link:

sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so

Now it is necessary to remove existing gcc and g++ sim links because they already exist by default:

Remove the existing sim links:

sudo rm /usr/bin/cpp
sudo rm /usr/bin/gcc
sudo rm /usr/bin/g++

Then install gcc-4.6 and g++-4.6 (you have the option to install gcc 4.4 as well but in my opinion 4.6 is better):

sudo apt-get install gcc-4.6 g++-4.6

Then make a sim link to these compilers so that CUDA use this compiler as it's primary compiler:

sudo ln -s /usr/bin/cpp-4.6 /usr/bin/cpp
sudo ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.6 /usr/bin/g++

Installing the CUDA toolkit:

Press Ctrl + Alt + F1, this will take you to the first virtual terminal. Enter your user and password, and navigate to the folder which you've located the file, for example in case you have placed it on Desktop use:

cd ~/Desktop/

Then add execution permissions to the *.run file:

sudo chmod +x cudatoolkit*.run

Replace cudatoolkit*.run with the actual name of the downloaded file, in your case cuda_5.0.35_linux_64_ubuntu11.10-1.run .

Then stop the lightdm service:

sudo service lightdm stop

and finally run the CUDA toolkit:

sudo ./cudatoolkit*.run

again replace cudatoolkit*.run with the actual name. Then follow the onscreen instructions.

Note:

In case something goes wrong, even with gcc-4.4 you can remove it using:

sudo apt-get remove gcc-4.x g++-4.x

Replace x with your version.

最后,您可以通过将sim链接还原为原始链接,将其还原为原来的样子:

sudo rm /usr/bin/cpp
sudo rm /usr/bin/gcc
sudo rm /usr/bin/g++
sudo ln -s /usr/bin/cpp-4.7 /usr/bin/cpp
sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.7 /usr/bin/g++

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

图形卡GeForce GT 630安装在64位Ubuntu 15.04上

使用CUDA GeForce9600GT在Ubuntu服务器上执行tensorflow

如何为GeForce GT 630安装Nvidia驱动程序

NVIDIA GeForce GT750M推荐驱动iMac上Ubuntu 13.10

在Ubuntu 16.04 LTS上使用Optimus的NVIDIA GeForce GT525M

无法在Ubuntu上安装图形卡(NVIDIA GT630)

使用Nvidia GeForce 845m在Ubuntu 16.04上安装CUDA-8.0

技嘉GeForce GT 1030 GPU上的这些端口是什么?

20.04 上的 NVIDIA GeForce 7300 GT 旧版驱动程序

在Ubuntu 14.10和14.04上安装Nvidia Geforce

该设备正在使用其他驱动程序[GeForce GT 630M]

在 Ubuntu 18.04 上安装 NVidia 410 和 CUDA 10

Ubuntu 16.04-Nvidia GeForce GT 710的3个显示器支持

Ubuntu 13.04 64位-GeForce GT 620卡无法正常工作,始终进入最低图形模式

Nvidia驱动程序,Ubuntu 12.10,GeForce GT 540m

显卡问题(Geforce GT 240)

有没有办法让Cuda支持较旧的GeForce GT?

可以在Ubuntu上使用Nvidia GeForce Experience吗?(13.10)

如何在Lucid Lynx上运行NVidia GeForce GT 210驱动程序?

尝试进行驱动器更新后,GeForce GT 730M停止在Ubuntu 16.04上工作

在Nvidia GeForce GFX 850上安装Ubuntu时遇到问题

Ubuntu登录屏幕在Ubuntu 16.04,Cuda 8.0和Geforce GTX Titan X GPU上变黑

Geforce 740M安装Cuda

Dell XPS L502X Nvidia GeForce GT 540M上的Nvidia linux驱动程序

在VAIO笔记本电脑上为GeForce GT 330M提供良好的NVidia驱动程序?

GeForce GTX1050Ti驱动程序安装Windows 10

2560x1080p在Win10 Geforce 9500 GT HDMI中的21:9显示器上不起作用

我在Ubuntu 14.04上安装了Nvidia Geforce,但不知道如何使用它或在Ubuntu上安装它。请帮忙?

安装适用于Nvidia Geforce 820M的Ubuntu 16.04驱动程序