Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

cuda 9.0 printf display nothing

I am trying to run the cuda's printf example:

#include <stdio.h>
__global__ void helloCUDA(float f)
{
  printf("Hello thread %d, f=%f\n", threadIdx.x, f);
}
int main()
{
  helloCUDA<<<1, 5>>>(1.2345f);
  cudaDeviceReset();
  return 0;
}

It's being compiled with

nvcc test.cu -o test

I tried to run the program

  ./test

however, the program printf nothing,and display nothing. My NVidia card is M2070, and I have cuda9.0 installed.

Comments