简体   繁体   中英

Can i debug openACC with cuda-gdb? Or other debugging tools?

I'm using CAPS OpenACC on CUDA . I'm trying debugging with cuda-gdb . And i can debug normally c/c++ code with cuda-gdb . In other words i couldn't debug codelet code. Is there a anybody who debugged openACC on cuda ? or i couldn't put breakpoint in the codelet . What should i do to debug?

I addition to i compiled with that hmpp -d2 -kk -g gcc -g vecadd.c -o vecadd.x

And my openACC code is very simple :

#pragma acc kernels copyin(a[0:n],b[0:n]), copyout(c[0:n])
for(i=0; i<n; i++) {
    c[i] = a[i] + b[i];
}

According to this post you need to pass -G options to capsmc so that the CUDA code is compiled with debug symbols.

Since CAPS Compilers generates just plain CUDA code, you should be able to use cuda-gdb just fine then.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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