PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Stepping into OpenACC region with cuda-gdb

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
anirbanjana



Joined: 11 Aug 2012
Posts: 28

PostPosted: Mon Oct 07, 2013 2:06 pm    Post subject: Stepping into OpenACC region with cuda-gdb Reply with quote

Hi,
How can I step into my OpenACC code region with cuda-gdb. Setting a breakpoint at the line number does not seem to work. E.g.,
Code:

[Launch of CUDA Kernel 6 (calc_force_des_150_gpu<<<(18471,1,1),(256,1,1)>>>) on Device 0]
[Launch of CUDA Kernel 7 (calc_force_des_180_gpu_red<<<(1,1,1),(256,1,1)>>>) on Device 0]
[Termination of CUDA Kernel 6 (calc_force_des_150_gpu<<<(18471,1,1),(256,1,1)>>>) on Device 0]

Breakpoint 1, calc_force_des () at calc_force_des.f:408
408     !$acc data copy(tmp_ax(dimn))
(cuda-gdb)
(cuda-gdb) n
[Launch of CUDA Kernel 8 (calc_force_des_408_gpu<<<(18471,1,1),(1,1,1)>>>) on Device 0]
[Launch of CUDA Kernel 9 (calc_force_des_444_gpu_red<<<(4,1,1),(256,1,1)>>>) on Device 0]
[Termination of CUDA Kernel 8 (calc_force_des_408_gpu<<<(18471,1,1),(1,1,1)>>>) on Device 0]
667
(cuda-gdb) n
0x00000000007a9e40 in pgf90io_src_info03 ()
(cuda-gdb) n
Single stepping until exit from function pgf90io_src_info03,
which has no line number information.
0x00000000007a8130 in pgf90io_encode_fmt ()
(cuda-gdb) n
Single stepping until exit from function pgf90io_encode_fmt,
which has no line number information.
0x00000000007afa40 in pgf90io_fmtw_init ()
(cuda-gdb) n
Single stepping until exit from function pgf90io_fmtw_init,
which has no line number information.
0x00000000007b2c20 in pgf90io_sc_i_fmt_write ()
...
...


Seems like above I have already exited from the kernel I want to examine, which is calc_force_des_408_gpu.


I also tried setting a breakpoint at the start of cuda kernels, but then I get messages like

Code:

(cuda-gdb) break calc_force_des_408_gpu
Function "calc_force_des_408_gpu" not defined.
Make breakpoint pending on future shared library load? (y or [n])


I went throught the cuda-gdb manual from http://www.pgroup.com/userforum/posting.php?mode=newtopic&f=12, but it does not have very detailed instructions.

Thanks
Anirban
Back to top
View user's profile
anirbanjana



Joined: 11 Aug 2012
Posts: 28

PostPosted: Mon Oct 07, 2013 2:09 pm    Post subject: Reply with quote

Sorry the cuda-gdb manual I went through is at
http://developer.download.nvidia.com/compute/cuda/2_1/cudagdb/CUDA_GDB_User_Manual.pdf
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6213
Location: The Portland Group Inc.

PostPosted: Mon Oct 07, 2013 4:20 pm    Post subject: Reply with quote

Hi Anirban,

Sorry but we don't support on device debugging yet. It's in process as we shift to using an LLVM back-end where can add DWARF information. Should be available in an early 14.x compiler.

- Mat
Back to top
View user's profile
anirbanjana



Joined: 11 Aug 2012
Posts: 28

PostPosted: Wed Oct 09, 2013 6:19 am    Post subject: Reply with quote

Thanks much Mat. Will look forward to v14.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group