Quantcast
Channel: Intermédiaire
Viewing all articles
Browse latest Browse all 677

Diagnostic 15335: Vectorization possible but seems inefficient

$
0
0

Product Version: Intel(R) Visual Fortran Compiler XE 15.0.0.070 

Cause: 

The vectorization report generated using Visual Fortran Compiler's optimization and vectorization report options  -O2 -Qvec-report2 -Qopt-report:2 states that loop was not vectorized: vectorization possible but seems inefficient.

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(out)   :: b
    real :: x = 0
    integer :: i

    do i=1,n
            x = x + a(2*i)
    end do

    b = x

end subroutine foo

 

 Report from: Vector optimizations [vec]

LOOP BEGIN at f15335.f90(9,5)

   remark #15335: loop was not vectorized: vectorization possible but seems inefficient. Use vector always directive or /Qvec-threshold0 to override
LOOP END

Resolution:

Using !DEC$ VECTOR ALWAYS directive in the code will vectorize the loop by overriding efficiency heuristics of the vectorizer.

See also:   
VECTOR and NOVECTOR

Vectorization and Optimization Reports

Back to the list of vectorization diagnostics for Intel Fortran

 

  • Intel Compilers Vectorization Reports Optimization Reports
  • Développeurs
  • Développeurs Intel AppUp®
  • Professeurs
  • Étudiants
  • Apple OS X*
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8
  • Windows*
  • Fortran
  • Avancé
  • Intermédiaire
  • Intel® Integrated Native Developer Experience (INDE)
  • Compilateur Intel® Fortran
  • Intel® Fortran Composer XE
  • Intel® Parallel Composer
  • Intel® Visual Fortran Composer XE
  • Intel® Fortran Studio XE
  • Intel® Integrated Native Developer Experience (INDE) Build Edition pour OS X*
  • Intel® Parallel Studio
  • Intel® Parallel Studio XE
  • Intel® Parallel Studio XE Cluster Edition
  • Intel® Parallel Studio XE Composer Edition
  • Intel® Parallel Studio XE Professional Edition
  • Optimisation
  • Vectorisation
  • URL
  • Rubriques de compilateurs
  • Amélioration des performances
  • Zone des thèmes: 

    IDZone
  • Windows*

  • Viewing all articles
    Browse latest Browse all 677

    Trending Articles



    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>