switch block focus in cuda-gdb i can only get to threads in block (0,0)

(cuda-gdb) thread

[Current Thread 2 (Thread 140272898447104 (LWP 28681))]

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

(cuda-gdb) thread <<<20>>>

Switching to <<<(0,0),(20,0,0)>>> 0x000000000246a5c8 in my_kernel

    <<<(16,1),(128,1,1)>>> ...

(cuda-gdb) thread

[Current Thread 2 (Thread 140272898447104 (LWP 28681))]

[Current CUDA Thread <<<(0,0),(20,0,0)>>>]

(cuda-gdb) thread <<<(9),(10)>>>

Switching to <<<(9,0),(10,0,0)>>> 0x000000000246a5c8 in my_kernel

    <<<(16,1),(128,1,1)>>> ...

(cuda-gdb) thread

[Current Thread 2 (Thread 140272898447104 (LWP 28681))]

[Current CUDA Thread <<<(0,0),(20,0,0)>>>]

(cuda-gdb) thread <<<(9,0),(10,0,0)>>>

Switching to <<<(9,0),(10,0,0)>>> 0x000000000246a5c8 in my_kernel

    <<<(16,1),(128,1,1)>>> ...

(cuda-gdb) thread

[Current Thread 2 (Thread 140272898447104 (LWP 28681))]

[Current CUDA Thread <<<(0,0),(20,0,0)>>>]

What am I doing wrong?


ubuntu 9.04

cuda 3.0

gtx 480

Please use the newer 4.0 release http://developer.nvidia.com/cuda-toolkit-40 and refer to the CUDA-GDB documentation @ http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/cuda-gdb.pdf
The new commands and output are much more explicit and clear. “info cuda threads” command shows all the CUDA threads (grouped by the current PC). The threads in focus are marked with a '*" which should reflect your last switched focus (single step your current threads in focus to another line if you want to see them as a separate entry from the coalesced output):

(cuda-gdb) thread
[Current thread is 2 (Thread 139952055318288 (LWP 19462))]
(cuda-gdb) info cuda threads
BlockIdx ThreadIdx To BlockIdx ThreadIdx Count Virtual PC Filename Line
Kernel 1

  • (0,0,0) (0,0,0) (111,0,0) (127,0,0) 14336 0x0000000001ceb7e8 acos.cu 380
    (cuda-gdb) cuda thread 20
    [Switching focus to CUDA kernel 1, grid 2, block (0,0,0), thread (20,0,0), device 0, sm 1, warp 0, lane 20]
    380 int totalThreads = gridDim.x * blockDim.x;
    (cuda-gdb) info cuda threads
    BlockIdx ThreadIdx To BlockIdx ThreadIdx Count Virtual PC Filename Line
    Kernel 1
  • (0,0,0) (0,0,0) (111,0,0) (127,0,0) 14336 0x0000000001ceb7e8 acos.cu 380
    (cuda-gdb) n
    381 int ctaStart = blockDim.x * blockIdx.x;
    (cuda-gdb) info cuda threads
    BlockIdx ThreadIdx To BlockIdx ThreadIdx Count Virtual PC Filename Line
    Kernel 1
  • (0,0,0) (0,0,0) (0,0,0) (31,0,0) 32 0x0000000001ceb808 acos.cu 381
    (0,0,0) (32,0,0) (111,0,0) (127,0,0) 14304 0x0000000001ceb7e8 acos.cu 380
    (cuda-gdb) cuda thread 100
    [Switching focus to CUDA kernel 1, grid 2, block (0,0,0), thread (100,0,0), device 0, sm 1, warp 3, lane 4]
    380 int totalThreads = gridDim.x * blockDim.x;
    (cuda-gdb) info cuda threads
    BlockIdx ThreadIdx To BlockIdx ThreadIdx Count Virtual PC Filename Line
    Kernel 1
    (0,0,0) (0,0,0) (0,0,0) (31,0,0) 32 0x0000000001ceb808 acos.cu 381
  • (0,0,0) (32,0,0) (111,0,0) (127,0,0) 14304 0x0000000001ceb7e8 acos.cu 380
    (cuda-gdb) cuda block 1 thread 120
    [Switching focus to CUDA kernel 1, grid 2, block (1,0,0), thread (120,0,0), device 0, sm 5, warp 3, lane 24]
    380 int totalThreads = gridDim.x * blockDim.x;
    (cuda-gdb) info cuda threads
    BlockIdx ThreadIdx To BlockIdx ThreadIdx Count Virtual PC Filename Line
    Kernel 1
    (0,0,0) (0,0,0) (0,0,0) (31,0,0) 32 0x0000000001ceb808 acos.cu 381
  • (0,0,0) (32,0,0) (111,0,0) (127,0,0) 14304 0x0000000001ceb7e8 acos.cu 380
    (cuda-gdb) cuda block 9 thread 10
    [Switching focus to CUDA kernel 1, grid 2, block (9,0,0), thread (10,0,0), device 0, sm 5, warp 4, lane 10]
    380 int totalThreads = gridDim.x * blockDim.x;
    (cuda-gdb) info cuda threads
    BlockIdx ThreadIdx To BlockIdx ThreadIdx Count Virtual PC Filename Line
    Kernel 1
    (0,0,0) (0,0,0) (0,0,0) (31,0,0) 32 0x0000000001ceb808 acos.cu 381
  • (0,0,0) (32,0,0) (111,0,0) (127,0,0) 14304 0x0000000001ceb7e8 acos.cu 380
    (cuda-gdb) n
    381 int ctaStart = blockDim.x * blockIdx.x;
    (cuda-gdb) info cuda threads
    BlockIdx ThreadIdx To BlockIdx ThreadIdx Count Virtual PC Filename Line
    Kernel 1
    (0,0,0) (0,0,0) (0,0,0) (31,0,0) 32 0x0000000001ceb808 acos.cu 381
    (0,0,0) (32,0,0) (8,0,0) (127,0,0) 1120 0x0000000001ceb7e8 acos.cu 380
  • (9,0,0) (0,0,0) (9,0,0) (31,0,0) 32 0x0000000001ceb808 acos.cu 381
    (9,0,0) (32,0,0) (111,0,0) (127,0,0) 13152 0x0000000001ceb7e8 acos.cu 380
    (cuda-gdb)