Fortran Programming Guide

DOALL Directive

The compilers will parallelize the DO loop following a DOALL directive (if compiled with the -parallel or -explicitpar options).


Note -

Analysis and transformation of reduction operations within loops is not done if they are explicitly parallelized.


Example: Explicit parallelization of a loop:


demo% cat t4.f
      ...
C$PAR DOALL
      do i = 1, n        
         a(i) = b(i) * c(i)
      end do
      do k = 1, m     
         x(k) = x(k) * z(k,k)
      end do
      ...
demo% f77 -explicitpar t4.f