cuda-gdb error

I have installed CUDA 4.1 on a RHEL 5.5 Linux workstation.

nvcc works fine, but cuda-gdb fails.

I see the following error:

$ cuda-gdb hello

'import site' failed; use -v for traceback

Traceback (most recent call last):

  File "<string>", line 32, in ?

ImportError: No module named os.path

NVIDIA (R) CUDA Debugger

4.1 release

I have used

nvcc -g -G -pg -D_DEBUG hello_gpu.cu -o hello

to generate the executable.

Any suggestions?

Thanks in advance.

PS: cuda-gdb was working fine with the previous version (CUDA 4.0)

Any suggestions ??

There is not enough information posted to make a diagnosis. I checked with the debugger team and they would need at least the following additonal information / data:

(1) Host GCC version (gcc –v)
(2) System/kernel info (uname –a)
(3) The binary for the test program (files can be attached to forum posts)
(4) Does starting cuda-gdb without any arguments result in the same behavior?

The debugger team further notes:

The messages:

o ‘import site’ failed; use -v for traceback

o Traceback (most recent call last):
File “”, line 32, in ?
ImportError: No module named os.path

are messages associated with Python.

In CUDA 4.1, cuda-gdb is based on gdb version 7.2, which now uses Python.

Could you check to see if python is installed on your system, and if so, which version is installed?

I see the same error with CUDA 4.2

Here’s what you asked for:

$ gcc -v

Using built-in specs.

Target: x86_64-unknown-linux-gnu

Configured with: ../gcc-4.4.0/configure --prefix=/gcc/4.4.0/x86_64 --with-gmp=/gmp/4.3.1/x86_64 --with-mpfr=/mpfr/2.4.1/x86_64

Thread model: posix

gcc version 4.4.0 (GCC) 

$ uname -a

Linux 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

$ gdb

GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)

Copyright (C) 2009 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-redhat-linux-gnu".

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

$ python

Python 2.7.2 (default, Aug  8 2011, 10:58:53) 

[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>>

Any suggestions on how to fix this??

attaching the binary as per njuffa’s post

$ nvcc hello_gpu.cu -o hello

$ nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver

Copyright (c) 2005-2012 NVIDIA Corporation

Built on Thu_Apr__5_00:24:31_PDT_2012

Cuda compilation tools, release 4.2, V0.2.1221

hello.tar.gz (4.78 KB)

Hi,

i execute your hello sample on the CUDA SDK 5.0 cuda-gdb with following result

linux-cuda:~ # mc

linux-cuda:/cuda_supercomputing/hello # ls -l

total 16

-rwxrwx— 1 28331 28331 13743 May 29 20:47 hello

linux-cuda:/cuda_supercomputing/hello # cuda-gdb ./hello

NVIDIA (R) CUDA Debugger

5.0 release

Portions Copyright (C) 2007-2012 NVIDIA Corporation

GNU gdb (GDB) 7.2

Copyright (C) 2010 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 /cuda_supercomputing/hello/hello…(no debugging symbols found)…done.

(cuda-gdb) q

linux-cuda:/cuda_supercomputing/hello # cuda-gdb hello

NVIDIA (R) CUDA Debugger

5.0 release

Portions Copyright (C) 2007-2012 NVIDIA Corporation

GNU gdb (GDB) 7.2

Copyright (C) 2010 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 /cuda_supercomputing/hello/hello…(no debugging symbols found)…done.

(cuda-gdb)

upps have you the sample compile with the right compile options ?,

or maybe send me your sample source to bernasek@lycos.com i test it under my environment

and inform you, ok ?