title: openMP distribute loop iterations
body: <p>I am new in openMP. I am trying things to see how things work. I'd like to distribute loop iterations equally so that my output is 0 1 2 3 4 5 6 7 8 9 10. Not 11 22 33 or 1 3 2 1 3 2 4 5, etc. I've also tried reduction, but I do not think that's the right approach for this case.</p>
  
  <pre><code>#pragma omp parallel private(nt, id) num_threads(2)
      {
          nt = omp_get_num_threads();  
          id = omp_get_thread_num();  
  
          //#pragma omp parallel for schedule(static)
          //#pragma omp atomic
          for (int i = 0; i &lt; 10; i++) {
              std::cout &lt;&lt; i;
          }
          std::cout &lt;&lt; std::endl;
      }
  </code></pre>