Product Version: Intel® Fortran Compiler 15.0 and a later version
The Intel® Fortran Compiler will not vectorize a loop when it knows the loop has only one iteration. If the user requires vectorization by using a SIMD directive, the compiler emits a warning diagnostic.
An example below will generate the following remark in optimization report:
subroutine f15423( a, b, n ) implicit none real, dimension(*) :: a, b integer :: i, n n=1 !$omp simd do i=1,n b(i) = 1. - a(i)**2 end do end subroutine f15423
$ ifort -c -qopenmp-simd f15423.f90
f15423.f90(8): (col. 7) remark: simd loop has only one iteration
f15423.f90(8): (col. 7) warning #13379: was not vectorized with "simd"
If the loop really has only one iteration, don’t use a SIMD directive or don’t code a loop.
If the statement n=1 was inserted unintentionally, remove it and the loop will vectorize