运行Cuda SDK的deviceQuery的问题 [英] Issues in running deviceQuery of Cuda SDK

查看:2712
本文介绍了运行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的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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