2017-04-25 55 views
0

我已经安装可用的最新版本的CUDA驱动程序从NVIDIA用C CUDA-GDB的视图变量/ C++

[email protected]:~/NVIDIA_CUDA-7.5_Samples$ nvcc --version 
nvcc: NVIDIA (R) Cuda compiler driver 
Copyright (c) 2005-2015 NVIDIA Corporation 
Built on Tue_Aug_11_14:27:32_CDT_2015 
Cuda compilation tools, release 7.5, V7.5.17 

但是当我调试程序我得到蟒蛇的错误消息。

[email protected]:~$ cuda-gdb hello.out 
NVIDIA (R) CUDA Debugger 
7.5 release 
Portions Copyright (C) 2007-2015 NVIDIA Corporation 
GNU gdb (GDB) 7.6.2 
Copyright (C) 2013 Free Software Foundation, Inc. 
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This is free software: you are free to change and redistribute it. 
There is NO WARRANTY, to the extent permitted by law. Type "show copying" 
and "show warranty" for details. 
This GDB was configured as "x86_64-unknown-linux-gnu". 
For bug reporting instructions, please see: 
<http://www.gnu.org/software/gdb/bugs/>... 
Reading symbols from /home/mmiller/hello.out...done. 
(cuda-gdb) b main 
Breakpoint 1 at 0x402546: file hello.cu, line 3. 
(cuda-gdb) r 
Starting program: /home/mmiller/hello.out 
[Thread debugging using libthread_db enabled] 
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 

Breakpoint 1, main() at hello.cu:3 
3  foo: int x = 1; 
(cuda-gdb) s 
4    int y = x+1; 
(cuda-gdb) p x 
Python Exception <type 'exceptions.AttributeError'> 'gdb.Type' object has no attribute 'name': 
Python Exception <type 'exceptions.AttributeError'> 'gdb.Type' object has no attribute 'name': 
$1 = 1 
(cuda-gdb) 

我的计划是一个非常简单的程序,我读它可能是对付蟒蛇和gdb的错误,但我不确定如何利用Ubuntu和Nvidia公司最新的软件来修正错误。有关如何解决这个问题的任何建议?

+1

1.升级到cuda 8.问题一直得到解决。 2.提供完整的测试用例,以便其他人可以尝试重现您的观察结果。我经常使用cuda-gdb,并没有遇到这个问题。 –

+0

您可能正在观察类似于[在此处]报告的内容(https://devtalk.nvidia.com/default/topic/994231/cuda-gdb/python-exception-lt-type-exceptions-attributeerror-gt-gdb型对象-具有-NO-属性名称 - /)。这个问题已经被报告为NVIDIA的一个缺陷。目前尚不清楚这是否是NVIDIA的错误,但如果是这样,修复可能不会马上发布 - 它可能会等到下一个CUDA发布。与此同时,有几条评论:1.尝试OS和CUDA的vanilla加载(例如,如果您使用的是Ubuntu 16.04的干净加载)。不要更新python。 –

+0

2.这个问题阻止了前进的进展并不完全清楚。虽然你得到了这些Python异常消息,但看起来cuda-gdb没有崩溃,并且事实上打印了你所要求的('$ 1 = 1')。所以这可能是一个麻烦,但不是一个showstopper问题。我无法确定,因为目前我无法自己复制它。 –

回答

0

看来Ubuntu不会更新包含最新版本的nvcc和cuda-gdb的路径。您必须手动更新路径(或更改符号链接)以供您参考这些库的正确版本。