Specify the expected loop trip count

The compiler cannot detect the trip count statically. To fix: Identify the expected number of iterations using a directive: !DIR$ LOOP COUNT.

Example

Iterate through a loop a maximum of ten, minimum of three, and average of five times:
!DIR$ LOOP COUNT MAX(10), MIN(3), AVG(5)
do i =1, m
    b(i) = a(i) + 1
    d(i) = c(i) + 1
enddo

Read More