c++cudaubuntu-16.04cuda-gdb

CUDA-GDB view variables in C/C++


I have installed the latest version of the CUDA drivers available from NVIDIA

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

But when I debug a program I get an error message about 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)

I the program is a very simple program and I read that it may be an error dealing with python and gdb, but I am unsure of how to fix the error using the latest software from Ubuntu and Nvidia. Any suggestions as to how to fix this?


Solution

  • It appears that Ubuntu will not update the path to include the latest version of nvcc and cuda-gdb. You have to update the path (or change the symlinks) manually for your to reference the correct versions of these libraries.