title: OpenMP and #pragma omp atomic
body: <p>I have an issue with OpenMP. MSVS compilator throws me <em>"pragma omp atomic has improper form"</em>.
  I don't have any idea why. 
  Code: (program appoints PI number using integrals method)</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;time.h&gt;
  #include &lt;omp.h&gt;
  
  long long num_steps = 1000000000;
  double step;
  
  int main(int argc, char* argv[])
  {
      clock_t start, stop;
      double x, pi, sum=0.0;
      int i;
      step = 1./(double)num_steps;
      start = clock();
  
      #pragma omp parallel for
      for (i=0; i&lt;num_steps; i++)
      { 
          x = (i + .5)*step;
          #pragma omp atomic //this part contains error
          sum = sum + 4.0/(1.+ x*x);  
      }
  
      pi = sum*step;
      stop = clock();
  
      // some printf to show results
  return 0;
  }
  </code></pre>