title: Open mp parallel for does not work
body: <p>I'm studying OpenMP now, and I have a question. The work time of the following code and the same code without a parallel section is statistically equal, though all threads are accessing the function. I tried to look at some guides in the internet, but it did not help. So the question is, what is wrong with this parallel section? </p>
  
  <pre><code>int sumArrayParallel( )
  {
  
      int i = 0;
      int sum = 0;
      #pragma omp parallel for
      for (i = 0; i &lt; arraySize; ++i)
      {
          cout &lt;&lt; omp_get_thread_num() &lt;&lt; " ";
          sum += testArray[i];
      }
      return sum;
  }
  </code></pre>