Intel® Advisor Help
The compiler assumed there is an anti-dependency (Write after read - WAR) or a true dependency (Read after write - RAW) in the loop. Improve performance by investigating the assumption and handling accordingly.
There is no confirmation that a real (proven) dependency is present in the loop. To confirm: Run a Dependencies analysis.
The Dependencies analysis shows there is a real (proven) dependency in the loop. To fix: Do one of the following:
!$OMP SIMD SAFELEN(4)
do i = 1, N-4, 4
a(i+4) = b(i) * c
enddo
!$OMP SIMD REDUCTION(+:SUMX)
do k = 1, size2
sumx = sumx + x(k) * b(k)
enddo
Read More:
The Dependencies analysis shows there is no real dependency in the loop for the given workload. Tell the compiler it is safe to vectorize using the restrict keyword or a directive:
| Directive | Outcome |
|---|---|
| !DIR$ SIMD or !$OMP SIMD | Ignores all dependencies in the loop |
| !DIR$ IVDEP | Ignores only vector dependencies (which is safest) |
Example:
!DIR$ OMP SIMD IVDEP
do i = 1, N-4, 4
a(i+4) = b(i) * c
enddo
Read More: