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: #pragma omp simd simdlen.
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: #pragma vector vectorlength(vl1, vl2, ..., vln) where vl is an integer power of 2....
// Specify vector length using
#pragma omp simd simdlen(4)
for (int i = 1; i < 100; i++)
...void f(int a[], int b[], int c[], int d[])
{
// Specify vector length using
#pragma omp simd simdlen(4)
for (int i = 1; i < 100; i++)
{
b[i] = a[i] + 1;
d[i] = c[i] + 1;
}
}void f(int a[], int b[], int c[], int d[])
{
// Specify list of vector lengths
#pragma vector vectorlength(2, 4, 16)
for (int i = 1; i < 100; i++)
{
b[i] = a[i] + 1;
d[i] = c[i] + 1;
}
}