Intel® Fortran Compiler 16.0 User and Reference Guide

GAP Message (Diagnostic ID 30525)

Message

Insert a "%s loop count min(%d)" statement right before the loop at line %d to parallelize the loop.

Advice

Add "!DIR$ LOOP COUNT" before the specified loop. This directive indicates the minimum trip count (number of iterations) of the loop that enables the parallelization of the loop.

Example

Consider the following:

      subroutine foo (n)
      integer, parameter :: N2 = 10000
      real (8) :: A(N2), B(N2)
      integer :: i
      do i =1, n
         A(i) = B(i) * B(i)
      end do
      end subroutine foo

In this case, if the trip count of the loop at line 5 is greater than 128, then use the LOOP COUNT directive to parallelize this loop.

If you determine it is safe to do so, you can add the directive as follows:

      subroutine foo (n)
      integer, parameter :: N2 = 10000
      real (8) :: A(N2), B(N2)
      integer :: i
      !dir$ loop count min(128)
      do i =1, n
         A(i) = B(i) * B(i)
      end do
      end subroutine foo
Make sure that the loop has a minimum of 128 iterations.

Verify

Confirm that the loop has the minimum number of iterations, as specified in the diagnostic message.

See Also