Fortran Programming Guide

DOSERIAL Directive

The DOSERIAL directive disables parallelization of the specified loop. This directive applies to the one loop immediately following it (if you compile it with -explicitpar or -parallel).

Example: Exclude one loop from parallelization:


      do i = 1, n
C$PAR DOSERIAL
        do j = 1, n
          do k = 1, n
              ...
          end do
        end do
      end do

In the preceding example, the j loop is not parallelized, but the i or k loop can be.