title: Wrong parallel with gfortran compiled by -fopenmp wth specified threads
body: <p>I wrote a simple code to test the correctness of parallelism.
  The subroutine to be called is</p>
  
  <pre><code>SUBROUTINE two_pt_fn()
  IMPLICIT NONE
  INTEGER :: i,j
  !$OMP PARALLEL DO
  DO i=1,10
  j=i*2
  WRITE(*,*)i,j
  END DO
  !$OMP END PARALLEL DO
  END SUBROUTINE
  </code></pre>
  
  <p>The main program simply calls the above subroutine, and
  the source codes are compiled by</p>
  
  <pre><code>gfortran -fopenmp -o m.x sb_two_pt_fn.f90  main.f90
  export OMP_NUM_THREADS=10
  </code></pre>
  
  <p>The result of running</p>
  
  <pre><code>./m.x 
  </code></pre>
  
  <p>gives</p>
  
  <blockquote>
  <pre><code>       7          20
         8          16
         9          18
         1          18
         2           4
        10           6
         4           6
         5          10
         6          12
         3          12
  </code></pre>
  </blockquote>
  
  <p>It's simply multiply the loop index i by 2 but 
  the result is not correct for every i. Only a few of them are correct.</p>
  
  <p>Why?? I am new to parallel computing with fortran. Besides the answer, nice tutorial document for parallel that includes more complete concept teaching would be very helpful.
  Many thanks.</p>