title: I only see the "world hello" from host and not the device
body: <p>I have copied a hello world program in cuda using this site <a href="http://code.google.com/p/stanford-cs193g-sp2010/wiki/TutorialHelloWorld" rel="nofollow">http://code.google.com/p/stanford-cs193g-sp2010/wiki/TutorialHelloWorld</a></p>
  
  <p>The code is </p>
  
  <pre><code>#include "util/cuPrintf.cu"
  #include &lt;stdio.h&gt;
  
  __global__ void device_greetings(void)
  {
    cuPrintf("Hello, world from the device!\n");
  }
  
  int main(void)
  {
    // greet from the host
    printf("Hello, world from the host!\n");
  
    // initialize cuPrintf
    cudaPrintfInit();
  
    // launch a kernel with a single thread to greet from the device
    device_greetings&lt;&lt;&lt;1,1&gt;&gt;&gt;();
  
    // display the device's greeting
    cudaPrintfDisplay();
  
    // clean up after cuPrintf
    cudaPrintfEnd();
  
    return 0;
  }
  </code></pre>
  
  <p>Then compiled using <code>nvcc hello_world.cu -o hello_world</code> however I only see the hello fom host and not the device.</p>
  
  <p>I even tried </p>
  
  <pre><code>printf("{CudaPrintfInt =&gt; %s}\n",cudaGetErrorString(cudaPrintfInit()));
  printf("{cudaPrintfDisplay =&gt; %s}\n",cudaGetErrorString(cudaPrintfDisplay(stdout, true)));
  </code></pre>
  
  <p>and compiled with <code>nvcc -arch=sm_11 hello_world.cu -o hello_world</code>, However I get:</p>
  
  <pre><code>$ ./hello_world
  Hello, world from the host!
  {CudaPrintfInt =&gt; initialization error}
  {cudaPrintfDisplay =&gt; __global__ function call is not configured}
  $
  </code></pre>
  
  <p>The graphic model is :</p>
  
  <pre><code>$/sbin/lspci -v | grep VGA
  07:01.0 VGA compatible controller: Matrox Graphics, Inc. MGA G200eW WPCM450 (rev 0a) (prog-if 00 [VGA controller])
  </code></pre>
  
  <p>and the cuda version is 4:</p>
  
  <pre><code>$ ls /usr/local/cuda/lib/
  libcublas.so         libcudart.so.4.0.17  libcurand.so.4         libnpp.so
  libcublas.so.4       libcufft.so          libcurand.so.4.0.17    libnpp.so.4
  libcublas.so.4.0.17  libcufft.so.4        libcusparse.so         libnpp.so.4.0.17
  libcudart.so         libcufft.so.4.0.17   libcusparse.so.4
  libcudart.so.4       libcurand.so         libcusparse.so.4.0.17
  </code></pre>