printf() not working in Emu mode?

Hi all,

I am using windows xp and vs 2005 for the CUDA programming. I use exactly the same command line taken from Sample Projects for my own code. Yet I cannot get printf working under EmuDebug mode.

Any possible misconfiguration that may result in this? Or any tips on using Emulation mode?



Sorry for this random thread; I should have checked with previous posts more carefully. The problem is that I used more than 512 threads in one block, which results in failure of thread launching.

Plz lock it up admin

For a further note:
I almost spent one hour on this problem, spending meaningless time trial-and-error to see what’s wrong with my program. I used “CUT_CHECK_ERROR(“Kernel execution failed”);” after the kernel execution code, which didn’t report any anomaly; I also tried the profiler, whose log says
“method=[ memcopy ] gputime=[ 367.840 ]
method=[ memcopy ] gputime=[ 822.080 ]”.

These are not quite indicative on what’s actually wrong with my program. Is there any other error-checking mechanism that can make the debugging process more complete? Especially for a newbie like me :blink:


CUT_CHECK_ERROR only checks for errors in debug mode. Are you compiling in release mode?

Also, double check that the CUT_CHECK_ERROR macro calls cudaThreadSynchronize(). Otherwise, you will never notice an error right after a kernel launch because the launch is asynchronous.

Thx for the advice!