Diagnostic 15423: loop has only one iteration

By Devorah Hayman,

Published: 04/16/2015   Last Updated: 07/20/2017

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.


The vectorization report generated using Intel® Fortran Compiler's optimization and vectorization report options:

Windows* OS:  /O2  /Qopt-report:2  /Qopt-report-phase:vec    

Linux OS or OS X:  -O2 -qopt-report2  -qopt-report-phase=vec


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
!$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.

See also:

Requirements for Vectorizable Loops

Vectorization Essentials

Vectorization and Optimization Reports

Back to the list of vectorization diagnostics for Intel® Fortran

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.