Q:

cuPrintf does not print anything even if the compilation is ok

Here is my includes:
#include "cuPrintf.cu"
#include "cuPrintf.cuh"

My kernel:
__global__ void testKernel()
{
  cuPrintf("Test");
}

and my main:
int main( int argc, char** argv) 
{   
    dim3 threads(1,1);
    dim3 blocks(1, 1);
    testKernel<<<blocks, threads>>>();
}

Can someone explain to me why the cuPrintf does not print anything, the compilation is ok and I am using Cuda 5.5

A:

If you have a cc 2.0 or higher device, it's easier just to use printf directly from the kernel.  You can do this as long as your compile command specifies -arch=sm_20 or similar, for whatever is your actual device.
If you really want to use cuPrintf then study the relevant sample code.  You are missing a couple function calls in your main routine that are needed for cuPrintf to work correctly. 
Finally, whenever you are printing from a kernel, you should make sure to have some synchronization function before your program exits.  If you don't have anything else after your kernel, then the following will do:
cudaDeviceSynchronize();

in your main routine, after the last kernel call.
If you modify your main routine like this:
int main( int argc, char** argv) 
{   
    dim3 threads(1,1);
    dim3 blocks(1, 1);
    cudaPrintfInit();
    testKernel<<<blocks, threads>>>();
    cudaDeviceSynchronize();
    cudaPrintfDisplay(stdout,true);
    cudaPrintfEnd();
}

I believe it will work.

