CUDA“无兼容设备”在Ubuntu 11.10 / 12.04上的错误 [英] CUDA "No compatible Device" error on Ubuntu 11.10/12.04

查看:222
本文介绍了CUDA“无兼容设备”在Ubuntu 11.10 / 12.04上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图在我的笔记本电脑上建立一个Ubuntu环境一段时间,现在CUDA编程。我目前双启动Windows 8和Ubuntu 12.04,并希望在Ubuntu上安装CUDA 5。

I have been trying to set up an Ubuntu environment on my laptop for some time now for CUDA programming. I am currently dual booting Windows 8 and Ubuntu 12.04 and want to install CUDA 5 on Ubuntu.

笔记本电脑配有GeForce GT 640M显卡(完整规格请参见下文)。这是一个Optimus卡。

The laptop has a GeForce GT 640M graphics card (See below for full specs). It is an Optimus card.

最初我是双引导Ubuntu 11.10,并尝试过11.10和12.04的教程。

Originally I was dual booting Ubuntu 11.10 and have tried tutorials on both 11.10 and 12.04.

我尝试了许多形状和尺寸的教程,包括本教程。安装过程显示设备驱动程序安装和Toolkit安装,并且示例失败,但是当我在NSight中测试一个简单的Vector Add CUDA程序时,会抛出不兼容的CUDA设备错误。

I have tried many tutorials of all shapes and sizes, including this tutorial. The installation process shows the device driver installing and the Toolkit installing, and the Samples failing, but when I go to test a simple Vector Add CUDA program in NSight, "No compatible CUDA Device" error is thrown.

Ubuntu的详细信息仍然会显示未知的图形

Ubuntu Details also still shows "Unknown" for Graphics

建议?

笔记本电脑规格:
Acer V3-771G
英特尔酷睿i7 2670QM
nVidia GeForce GT 640M 2GB - Optimus
16GB DDR3-1600内存
120GB SSD + 500GB硬盘+ 32GB缓存SSD

Laptop Specs: Acer V3-771G Intel Core i7 2670QM nVidia GeForce GT 640M 2GB - Optimus 16GB DDR3-1600 RAM 120GB SSD + 500GB HDD + 32GB Cache SSD

推荐答案

由于它是一个optimus设备,还有一些额外的步骤能够使用nvidia GPU。虽然没有必要,我建议你使用大黄蜂包装程序,因为它是最简单的解决方案。

Since it is an optimus device, there are some extra steps to be able to use the nvidia GPU. While it is not necessary, I suggest that you use the bumblebee wrapper program because it is the easiest solution.

安装大黄蜂包装后,您可以使用 optirun programname 运行程序,或者使用nvidia启动shell卡激活: optirun bash --login

After you have installed the bumblebee wrapper you can run your programs using optirun programname or start a shell with the nvidia card activated: optirun bash --login

另一个好处是,大黄蜂后台程序将禁用GPU

An added bonus is that the bumblebee daemon will disable the GPU when it is not running and will save you some battery.

如果你不在乎电池寿命,只是想让CUDA始终启用而不打包命令,你可以加载nvidia内核模块,然后手动创建必要的设备节点:

If you don't care about battery life and just want CUDA to be always enabled without wrapping commands you can load the nvidia kernel module and then create the necessary device nodes manually:

mknod /dev/nvidia0 c 195 0
mknod /dev/nvidiactl c 195 255

(此高级方法允许您从控制台运行cuda程序,例如,当SSH连接到没有运行X服务器的计算机时)。

(This advanced method lets you run cuda programs from the console without starting Xorg, for example when SSH-ing to a machine without a running X server.)

另请参见 http://askubuntu.com/questions/131506/how-can-i -get-nvidia-cuda-or-opencl-working-on-a-laptop-with-nvidia-discrete-car 进行更详细的讨论。

See also http://askubuntu.com/questions/131506/how-can-i-get-nvidia-cuda-or-opencl-working-on-a-laptop-with-nvidia-discrete-car for a more detailed discussion.

这篇关于CUDA“无兼容设备”在Ubuntu 11.10 / 12.04上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆