1

我已安装 NVIDIA 提供的最新版本的 CUDA 驱动程序

mmiller@host:~/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

但是当我调试一个程序时,我收到一条关于 python 的错误消息。

mmiller@csit-crackin:~$ 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)

我的程序是一个非常简单的程序,我读到它可能是处理 python 和 gdb 的错误,但我不确定如何使用 Ubuntu 和 Nvidia 的最新软件修复错误。关于如何解决这个问题的任何建议?

4

1 回答 1

0

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

于 2017-05-24T20:15:53.657 回答