The Dependencies analysis shows there is a real (proven) dependency in the loop. To fix: Do one of the following:
- If there is an anti-dependency, enable vectorization using the directive !$OMP SIMD SAFELEN(length), where length is smaller than the distance between dependent iterations in anti-dependency.
!$OMP SIMD SAFELEN(4) ...!$OMP SIMD SAFELEN(4) do i = 1, N-4, 4 a(i+4) = b(i) * c enddo - If there is a reduction pattern dependency in the loop, enable vectorization using the directive !$OMP SIMD REDUCTION(operator:list).
!$OMP SIMD REDUCTION(+:SUMX) ...!$OMP SIMD REDUCTION(+:SUMX) do k = 1, size2 sumx = sumx + x(k) * b(k) enddo - Rewrite the code to remove the dependency. Use programming techniques such as variable privatization.