Diagnostic 15331: Using FP Model: Precise Prevents Vectorization

ID 736384
Updated 10/2/2014
Version Latest



Product Version

Intel® Fortran Compiler 15.0 and above


When using Intel® Fortran Compiler's option /fp:precise (Linux OS and OS X syntax: -fp-model precise) the vectorization report generated using Visual Fortran Compiler's optimization and vectorization report options ( /O2 /Qopt-report:2 /Qopt-report-phase:vec) includes non-vectorized loop instance.


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

subroutine foo(a, b, n)
	implicit none
    integer, intent(in) :: n
	real, intent(inout) :: a(n)
	real, intent(out) :: b
	real :: x = 0
	integer :: i
	do i=1,n
			x = x + a(i)			
	end do
	b = x
end subroutine foo

ifort -c /fp:precise /O2 /Qopt-report:2 /Qopt-report-phase:vec /Qopt-report-file:stdout f15331.f90

Begin optimization report for: FOO

Report from: Vector optimizations [vec]

LOOP BEGIN at f15331.f90(9,2)

remark #15331: loop was not vectorized: precise FP model implied by the command line or a directive prevents vectorization. Consider using fast FP model [f15331.f90(10,4)]



Using fast FP model (Windows OS: /fp:fast, Linux and OS X syntax: -fp-model fast) option which allows more aggressive optimizations on floating-point data will get this loop vectorized.

See Also

fp-model, fp

Vectorization Essentials

Vectorization and Optimization Reports

Back to the list of vectorization diagnostics for Intel Fortran