Question

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];
}
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top