title: printf() in my CUDA kernel doesn't result produce any output
body: <p>I have added some <code>printf()</code> statements in my CUDA program</p>
  
  <pre><code>__device__ __global__ void Kernel(float *, float * ,int );
  void DeviceFunc(float *temp_h , int numvar , float *temp1_h)
  { .....
      //Kernel call
      printf("calling kernel\n");
      Kernel&lt;&lt;&lt;dimGrid , dimBlock&gt;&gt;&gt;(a_d , b_d , numvar);
      printf("kernel called\n");
    ....
  }
  
  int main(int argc , char **argv)
  {   ....
      printf("beforeDeviceFunc\n\n");
      DeviceFunc(a_h , numvar , b_h); //Showing the data
      printf("after DeviceFunc\n\n");
      ....
  }
  </code></pre>
  
  <p>Also in the Kernel.cu, I wrote:</p>
  
  <pre><code>#include&lt;cuda.h&gt;
  #include &lt;stdio.h&gt;
  __device__ __global__ void Kernel(float *a_d , float *b_d ,int size)
  {
      int idx = threadIdx.x ;
      int idy = threadIdx.y ;
      //Allocating memory in the share memory of the device
      __shared__ float temp[16][16];
  
      //Copying the data to the shared memory
      temp[idy][idx] = a_d[(idy * (size+1)) + idx] ;
      printf("idx=%d, idy=%d, size=%d", idx, idy, size);
      ....
  }
  </code></pre>
  
  <p>Then I compile using <code>-arch=sm_20</code> like this:</p>
  
  <pre><code>nvcc -c -arch sm_20 main.cu
  nvcc -c -arch sm_20 Kernel.cu
  nvcc -arch sm_20 main.o Kernel.o -o main
  </code></pre>
  
  <p>Now when I run the program, I see:</p>
  
  <pre><code>beforeDeviceFunc
  
  calling kernel
  kernel called
  after DeviceFunc
  </code></pre>
  
  <p>So the <code>printf()</code> inside the kernel is not printed. How can I fix that?</p>