I am trying to debug my code with cuPrintf and am having problems getting it to work.

I don’t know how to apply the instructions from the dev portal to my application…

in the file “” i have

#include “”

void main()
kernel <<< grid, block >>> (…)
cudaPrintfDisplay(stdout, true);

then in the file “” i have

global void kernel(…)

int y = 10;
cuPrintf("%d\n", y);


but i get the build error “identifier “cuPrintf” is undefined”

but i can’t include it in because then i’m including the file twice… any suggestions? have i missed another forum link about this topic?


how about including it in and removing it from the