title: Fortran OpenMP program shows no speedup of CPU_TIME()
body: <p>The use of parallelism should lead to minimizing the time of a program but this did not happened to me. When I programmed my code in parallel using OpenMP, the run time is augmented, i.e. PARALLEL TIME > SERIAL TIME.</p>
  
  <p>My code:</p>
  
  <pre><code>    PROGRAM MAIN
      use omp_lib
      implicit none
      REAL*8 Times1,Times2
      INTEGER I,J
      real, allocatable, dimension(:) :: a
      allocate(a(1000))
      DO J = 1, 1000
      a(j)=j  
      ENDDO
  !    ***************NO PARALLEL CODE ************************************
      call CPU_TIME(Times1)
      write(*,*) 'CPU NO PARALLEL STARTED:',Times1
      DO I = 1, 1000
      DO J = 1, 500000
      a(I)=a(I)+0.0001
      end do 
      a(I)=a(I)+a(I)+a(I)
      ENDDO
      call CPU_TIME(Times2)
      write(*,*) 'CPU CPU NO PARALLEL finished:',Times2
      write(*,*) 'NO PARALLEL TIMES:',Times2-Times1
      write(*,*) '---------------------------------------------------'
  !    ***************PARALLEL CODE ************************************
      call CPU_TIME(Times1)
      write(*,*) 'CPU PARALLEL STARTED:',Times1
  !$OMP PARALLEL DEFAULT(shared), private(I,J)
  !$OMP DO
      DO I = 1, 1000
      DO J = 1, 500000
      a(I)=a(I)+0.0001
      end do 
      a(I)=a(I)+a(I)+a(I)
      ENDDO
  !$OMP END DO
  !$OMP END PARALLEL
      call CPU_TIME(Times2)
      write(*,*) 'CPU PARALLEL finished:',Times2
      write(*,*) 'PARALLEL TIMES:',Times2-Times1
      deallocate(a)
      STOP
      END
  </code></pre>
  
  <p>and the result :</p>
  
  <pre><code> CPU NO PARALLEL STARTED:  1.560010000000000E-002
   CPU CPU NO PARALLEL finished:   4.86723120000000
   NO PARALLEL TIMES:   4.85163110000000
  </code></pre>
  
  <hr>
  
  <pre><code> CPU PARALLEL STARTED:   4.86723120000000
   CPU PARALLEL finished:   9.89046340000000
   PARALLEL TIMES:   5.02323220000000
  </code></pre>
  
  <p>Why is my time measured by CPU_TIME() increased with OpenMP?</p>