繁体   English   中英

如何将cuda-gdb与使用nvcc编译的静态库的g ++链接程序一起使用?

[英]How do I use cuda-gdb with a g++ linked program that uses an nvcc compiled static library?

我正在为一个g ++链接的项目开发一个nvcc编译的静态库。 如何在最终的可执行文件中使用cuda-gdb? 所有我得到的是“程序正常退出”,没有任何printf输出或任何东西。

编译静态库时,nvcc肯定会被赋予-g -G参数。

这是我的命令行缓冲区:

cuda-gdb /home/sean/cuda-workspace/cudasplat/Debug/cudasplat 
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 /home/sean/cuda-workspace/cudasplat/Debug/cudasplat...done.
(cuda-gdb) set args -t a1-31 a2-31 a3-31 a4-31 -L 30 -o tx_coverage -d /var/www/userman/plot-temp/ -db -85 -ngs -dbm -R 20
(cuda-gdb) run
Starting program: /home/sean/cuda-workspace/cudasplat/Debug/cudasplat -t a1-31 a2-31 a3-31 a4-31 -L 30 -o tx_coverage -d /var/www/userman/plot-temp/ -db -85 -ngs -dbm -R 20
[Thread debugging using libthread_db enabled]
Exiting...

Program exited normally.
(cuda-gdb)

这是没有调试通常会发生的事情:

/home/sean/cuda-workspace/cudasplat/Debug/cudasplat -t  a1-31 a2-31 a3-31 a4-31 -L 30 -o tx_coverage -d /var/www/userman/plot-temp/ -db -85 -ngs -dbm -R 20
            --==[ Welcome To CUDASPLAT! HD v1.4.0a ]==--

Loading "51:52:113:114-hd.sdf" into page 1... Done!
Loading "50:51:113:114-hd.sdf" into page 2... Done!
Loading "50:51:114:115-hd.sdf" into page 3... Done!
Loading "51:52:114:115-hd.sdf" into page 4... Done!
copying 444 mb into device memory (3878 mb free)
finished copy
min_north 50, max_north 52, min_west 113, max_west 115
allocated antenna memory
invalid argument in ../cudapath.cu at line 551
  1. 您应该在发出运行命令之前设置断点。
  2. 您的应用程序是否执行了正确的错 请注意,cuda-gdb可以“隐藏”用于渲染OS图形界面的GPU。 例如,如果您有一个GPU系统并在窗口环境(例如GTK或KDE)中从cuda-gdb运行CUDA应用程序,则应用程序可能会失败,因为不会检测到GPU。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM