Linux CUDA 是否正确安装在我的 Ubuntu 10.04 上?某些示例无法运行。

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5133901/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 03:02:57  来源:igfitidea点击:

Is CUDA in installed correctly on my Ubuntu 10.04? Some samples don't run.

linuxubuntucudagpu

提问by Alfred Zhong

I am trying to install CUDA on a server running Ubuntu 10.04.

我正在尝试在运行 Ubuntu 10.04 的服务器上安装 CUDA。

I followed the NVDIA instructions and installed the "CUDA toolkit for Ubuntu Linux 10.04", "GPU Conputing SDK code samples",and "Developer Drivers for Linux (260.19.26) (64 bit)", my system is 64 bit. This installation seems successful. everything downloaded from http://developer.nvidia.com/object/cuda_3_2_downloads.html#Linux

我按照 NVDIA 说明安装了“适用于 Ubuntu Linux 10.04 的 CUDA 工具包”、“GPU 计算 SDK 代码示例”和“适用于 Linux(260.19.26)(64 位)的开发人员驱动程序”,我的系统是 64 位。此安装似乎成功。从http://developer.nvidia.com/object/cuda_3_2_downloads.html#Linux下载的所有内容

According to the messages of the installation packages, I added /usr/local/cuda/bin to PATH, /usr/local/cuda/lib64:/usr/local/cuda/lib to LD_LIBRARY_PATH

根据安装包提示,我在PATH中添加了/usr/local/cuda/bin,在LD_LIBRARY_PATH中添加了/usr/local/cuda/lib64:/usr/local/cuda/lib

Then, I tried to run the sample programs. The strange things is, some of them can be run, and some of them don't even through they can be made with no problem.

然后,我尝试运行示例程序。奇怪的是,其中一些可以运行,而有些甚至不通过它们可以毫无问题地制作。

For example,
- convolutionSeparablewill just stop there without any message, I can kill it by ctrl + c.

例如,
-convolutionSeparable会在没有任何消息的情况下停在那里,我可以通过 ctrl + c 杀死它。

  • matrixMuloutputs a line

    Device 0: "Quadro 5000" with Compute 2.0 capability

    and stop there, again can be killed by Ctrl+C

  • clockworks, outputs

    PASSED
    time = 12574
    Press ENTER to exit...

  • simpleMultiCopyoutputs PASSED

  • MonteCarlooutputs PASSED

  • simpleZeroCopyoutputs PASSED

  • bandwidthTeststops there with blinking cursor for ever.

  • matrixMul输出一行

    Device 0: "Quadro 5000" with Compute 2.0 capability

    并停在那里,再次可以被 Ctrl+C 杀死

  • clock作品,输出

    PASSED
    time = 12574
    Press ENTER to exit...

  • simpleMultiCopy产出 PASSED

  • MonteCarlo产出 PASSED

  • simpleZeroCopy产出 PASSED

  • bandwidthTest永远停留在闪烁的光标处。

What is wrong with this?! How can I check if my CUDA installation is successful ? What is wrong with those programs don't run? They don't even have a error message.

这有什么问题?!如何检查我的 CUDA 安装是否成功?那些程序不运行有什么问题?他们甚至没有错误信息。

回答by ajpyles

What does deviceQuery say? Also check the output of dmesg right after you run that program to see if you can figure out whats up.

deviceQuery 说什么?还要在运行该程序后立即检查 dmesg 的输出,看看您是否能弄清楚发生了什么。

Another tip, if you still are having issues, is try running:

另一个提示,如果您仍然遇到问题,请尝试运行:

strace ./deviceQuery 2> out.txt

Then check out.txt to see if you can find any clues why this error is occuring.

然后检查 out.txt 以查看是否可以找到发生此错误的任何线索。

回答by M. Tibbits

I would start by upgrading the driver to 260.19.36, which can be found here. Then I would suggest running nvidia-smi -ato see if the driver is happy. Then I second the suggestion to run deviceQueryto see if the CUDA Toolkit 3.2 is working.

我首先将驱动程序升级到260.19.36可以在此处找到。然后我会建议跑步nvidia-smi -a,看看司机是否开心。然后我建议运行deviceQuery以查看 CUDA Toolkit 3.2 是否正常工作。

If deviceQuery output appears nominal, then I would start adding printf's to see where things go awry in matrixMul.

如果 deviceQuery 输出出现标称值,那么我将开始添加 printf 以查看 matrixMul 中哪里出错了。

回答by rnd_nr_gen

I have similar problem but solved by updating kernel and drivers.

我有类似的问题,但通过更新内核和驱动程序解决了。

install newer kernel on 10.04

在 10.04 上安装较新的内核

linux-image-generic-pae-lts-backport-natty
linux-headers-generic-pae-lts-backport-natty

download the latest nvidia driver from http://www.nvidia.com/Download/index.aspx?lang=en-us

http://www.nvidia.com/Download/index.aspx?lang=en-us下载最新的 nvidia 驱动程序

install the latest CUDA (at moment 4.0) from http://developer.nvidia.com/cuda-toolkit-40

http://developer.nvidia.com/cuda-toolkit-40安装最新的 CUDA(在 4.0 时)

CUDA Toolkit for Ubuntu Linux 10.10     32-bit
CUDA Tools SDK  32-bit
GPU Computing SDK code samples 

then I passed all SDK example tests.

然后我通过了所有 SDK 示例测试。

ThinkPad w520 Quadro 1000 on Ubuntu 10.04

Ubuntu 10.04 上的 ThinkPad w520 Quadro 1000