运行Cuda SDK的deviceQuery的问题

编程入门 行业动态 更新时间:2024-10-26 00:20:38
本文介绍了运行Cuda SDK的deviceQuery的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我昨天编译了sdk例子,我也跑了很少的例子。但是今天我试图通过发出./deviceQuery命令运行deviceQuery和〜/ NVIDIA_GPU_Computing_SDK / C / bin / linux / release文件夹,它显示:

./deviceQuery:加载共享库时出错:libcudart.so.4:无法打开共享对象文件:无此类文件或目录 解决方案

设置路径:p $ p>

CUDA环境

goto / etc / $ gksudo gedit环境

在这里你可以看到PATH =/ usr / local / sbin:/ usr / local / bin:/ usr / sbin:/ usr / bin:/ sbin:/ bin:/ usr / games

这样的东西,只是追加了以下内容

:/ usr / local / cuda / bin

保存并退出编辑器

重新载入路径

环境

现在设置LD_LIBRARY_PATH:(位于/ etc /目录本身)

$ gksudo gedit ld.so.conf.d / cuda.conf

(创建一个新文件)将以下文件粘贴到文件中

/ usr / local / cuda / lib64 / usr / local / cuda / lib

save并退出编辑器 reload LD_LIBRARY_PATH

$ sudo ldconfig pre>

现在运行示例。

I compiled the sdk examples yesterday and I ran few of them also. But today I am trying to run the deviceQuery and in the ~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release folder by issuing ./deviceQuery command and it is showing:

./deviceQuery: error while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directory

Can anybody help me out please?

解决方案

Set the path environment for CUDA

goto /etc/ $ gksudo gedit environment

There you can see PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

something like that,,, just append the following

:/usr/local/cuda/bin"

save and exit the editor

reload the path

source environment

now set LD_LIBRARY_PATH: (be in /etc/ directory itself)

$ gksudo gedit ld.so.conf.d/cuda.conf

(which creates a new file) paste following into the file

/usr/local/cuda/lib64 /usr/local/cuda/lib

save and quit the editor reload LD_LIBRARY_PATH

$ sudo ldconfig

Now run the samples.

更多推荐

运行Cuda SDK的deviceQuery的问题

本文发布于:2023-07-28 00:14:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1225586.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Cuda   SDK   deviceQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!