Diagnostic 15319: Loop Was Not Vectorized: Novector Directive Used

ID 736383
Updated 10/3/2014
Version Latest
Public

author-image

By

Product Version:  Intel® Fortran Compiler 15.0 and above

Cause:

When using NOVECTOR directive in code, the vectorization report generated using Intel® Fortran Compiler's optimization and vectorization report options includes non-vectorized loop instance:

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

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

Example:

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(in)    :: b(n)
	
    integer :: i

!DEC$ NOVECTOR
    
       do i=1,n 
		     a(i)= b(i)+1
       end do
       
end subroutine foo 

ifort -c /O2 /Qopt-report:2 /Qopt-report-phase:vec /Qopt-report-file:stdout f15319.f90

Begin optimization report for: FOO

    Report from: Vector optimizations [vec]

LOOP BEGIN at f15319.f90(11,8)

   remark #15319: loop was not vectorized: novector directive used

LOOP END

Resolution:

There may be cases where you want to explicitly avoid vectorization of a loop; for example, if vectorization would result in a performance regression rather than an improvement. In these cases, you can use the NOVECTOR directive to disable vectorization of the loop. 

See also:   

VECTOR and NOVECTOR

Requirements for Vectorizable Loops

Vectorization Essentials

Vectorization and Optimization Reports

Back to the list of vectorization diagnostics for Intel® Fortran