Use a smaller vector length

The compiler chose a vector length of %vl% , but the trip count might be smaller than the vector length. To fix: Specify a smaller vector length using a directive: !$OMP SIMD SIMDLEN.

Example

...
!$OMP SIMD SIMDLEN(4)
do i = 1, m
...
!$OMP SIMD SIMDLEN(4)
do i = 1, m
    b(i) = a(i) + 1
    d(i) = c(i) + 1
enddo
In version 19.0 and higher of the Intel compiler, there is a new vector length clause that allows the compiler to choose the best vector length based on cost: !DIR$ VECTOR VECTORLENGTH (vl1, vl2, ..., vln) where vl is an integer power of 2.

Example

!DIR$ VECTOR VECTORLENGTH(2, 4, 16)
do i = 1, m
    b(i) = a(i) + 1
    d(i) = c(i) + 1
enddo

Read More