printf not working

I have a tesla c2050 and cuda toolkit 3.1. I confirmed that it does work in a simple test program (with recursion), but not in the program I am debugging (also with recursion, but probably not related to the issue).

Anyone know what situation a printf statment would NOT work in?

printf results don’t get flushed to the screen until certain events occur (see the documentation for full details). The easiest way to force it to occur is call cudaThreadSyncrhonize() after the kernel launch.

printf results don’t get flushed to the screen until certain events occur (see the documentation for full details). The easiest way to force it to occur is call cudaThreadSyncrhonize() after the kernel launch.