Hi,

I am trying to get breakpoints to trigger at my kernel, but so far they have not been working in PyCUDA scripts. Breakpoints do work in the example code provided in nVidia's SDK, however.

I have tried both specifying the kernel name explicitly as well as using "set cuda break_on_launch {application,all}" but the script runs to completion without stopping.

Here is the (truncated) output:

% cuda-gdb --args python -m pycuda.debug foo.py
NVIDIA (R) CUDA Debugger
4.0 release
Portions Copyright (C) 2007-2011 NVIDIA Corporation
GNU gdb 6.3.50.20050815-cvs (Fri May 13 10:38:44 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-apple-darwin10.0.0 --target="...unable to read unknown load command 0x24
unable to read unknown load command 0x26
unable to read unknown load command 0x24
unable to read unknown load command 0x26
unable to read unknown load command 0x24
unable to read unknown load command 0x26
Reading symbols for shared libraries ... done

(cuda-gdb) set cuda break_on_launch all
(cuda-gdb) b test_kernel
Function "test_kernel" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (test_kernel) pending.
(cuda-gdb) r
Starting program: /Users/geordan/venv/tps/bin/python -m pycuda.debug foo.py
Reading symbols for shared libraries + done
unable to read unknown load command 0x24

[... this repeats a lot ...]

*** compiler output in /var/folders/v0/mn_pj7sd6jj3pwz2l55khg380000gn/T/tmpmp2mKd
Reading symbols for shared libraries . done
Breakpoint 2 at 0x105575b20: file kernel.cu, line 5.
Pending breakpoint 1 - "test_kernel" resolved
[  0.   1.   2.   3.   4.   5.   6.   7.   8.   9.  10.  11.  12.  13.  14.
  15.]
unable to read unknown load command 0x24
unable to read unknown load command 0x26
Reading symbols for shared libraries . done
[Launch of CUDA Kernel 0 (test_kernel<<<(1,1,1),(16,1,1)>>>) on Device 0]
[Termination of CUDA Kernel 0 (test_kernel<<<(1,1,1),(16,1,1)>>>) on Device 0]
[  0.   2.   4.   6.   8.  10.  12.  14.  16.  18.  20.  22.  24.  26.  28.
  30.]
[Context Pop of context 0x100a98a00 on Device 0]
[Context Push of context 0x100a98a00 on Device 0]
[Context Pop of context 0x100a98a00 on Device 0]
[Context Push of context 0x100a98a00 on Device 0]
[Context Destroy of context 0x100a98a00 on Device 0]

Program exited normally.
(cuda-gdb)

As you can see, the "test_kernel" breakpoint resolves and the kernel runs (it simply doubles values in a passed in array), but the program exits without stopping. What is happening?

This is on OS X Lion Preview, PyCUDA 2011.1.2, CUDA 4.0.19.

Thanks,
-geordan

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to