title: CUDA: cudaEventElapsedTime returns device not ready error
body: <p>I tried to measure the elapsed time on Tesla (T10 processors) and cudaEventElapsedTime returns device not ready error. But when I tested it on Fermi (Tesla M2090), it gave me the result.</p>
  
  <p>Can anyone tell me what is happening... </p>
  
  <p>Here is my code</p>
  
  <pre><code>cudaError_t err;
          cudaEvent_t start, stop;
          cudaEventCreate(&amp;start);
          cudaEventCreate(&amp;stop);
          err = cudaEventRecord(start, 0);
          f(err != cudaSuccess) {
            printf ("\n\n 1. Error: %s\n\n", cudaGetErrorString(err));
            exit(1);
          }
          // actual code
         cudaThreadSynchronize();
          err = cudaEventRecord(stop, 0);
          if(err != cudaSuccess) {
            printf ("\n\n2. Error: %s\n\n", cudaGetErrorString(err));
            exit(1);
          }
          err = cudaEventElapsedTime(&amp;elapsed_time, start, stop);
          f(err != cudaSuccess) {
            printf ("\n\n 3. Error: %s\n\n", cudaGetErrorString(err));
            exit(1);
          }
  </code></pre>