Diagnostic 15537: Loop was not vectorized: implied FP exception model prevents usage of SVML library.

By Devorah Hayman,

Published: 10/29/2014   Last Updated: 09/24/2015

Product Version: Intel® Visual Fortran Compiler XE 15.0 or a later version


The vectorization report generated when using Visual Fortran Compiler's  flags and optimization options (/O2 /fpe:0 /Qopt-report:2states that loop was not vectorized due to Floating-Point exception handling .


An example below will generate the following remark in optimization report:

subroutine foo (a, l, n)
       implicit none
       integer, intent(in) :: n
       double precision, intent(inout) :: a(n)
       integer :: l(n)
       integer :: i
       do i=1,n
           l(i) = mod(a(i), 1.0)
       end do
end subroutine foo

ifort -c /O2 /fpe:0 /Qopt-report:2 /Qopt-report-phase:vec /Qopt-report-file:stdout f15537.f90

(ifort -c -O2 -fpe=0 -qopt-report2  f15537.f90 for Linux)

Begin optimization report for: FOO

    Report from: Vector optimizations [vec]

LOOP BEGIN at f15537.f90(8,8)
   remark #15537: loop was not vectorized: implied FP exception model prevents usage of SVML library needed for truncation or integer divide/remainder. Consider changing compiler flags and/or directives in the source to enable fast FP model and to mask FP exceptions   [ f15537.f90(9,19) ]


Masking FP exceptions /fpe:1 and setting a threshold for the vectorization of loops to 0  /Qvec-threshold:0 will get the loop vectorized:

ifort -c /O2 /fpe:1 /Qvec-threshold:0 /Qopt-report:2 /Qopt-report-phase:vec /Qopt-report-file:stdout f15537.f90

(ifort -c -O2 -fpe=1 -vec-threshold=0  -qopt-report2  f15537.f90 for Linux)

LOOP BEGIN  f15537.f90(8,8)

    remark #15300: LOOP WAS VECTORIZED

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.