Quantcast
Channel: Intermedio
Viewing all articles
Browse latest Browse all 672

Diagnostic 15521: Loop was not vectorized: compile time constraints prevent loop optimization.

$
0
0

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

Cause:

The vectorization report generated when using Visual Fortran Compiler's optimization options (-O2  -Qopt-report:2 -traceback -check:bounds -check:nostack) states that loop was not vectorized due to compile time constraints.

Example:

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

subroutine foo (a,n)

 implicit none

interface
   function bar(n)
     integer :: bar
     integer, intent(in) :: n
   end function bar
end interface

    integer, intent(in) :: n
    real,intent(inout) :: a(n)
    integer :: i

  do i=1, bar(i)
     a(i) = 0
  end do

end  subroutine foo 

Report from: Vector & Auto-parallelization optimizations [vec, par]

LOOP BEGIN f15521.f90(16,3)
   remark #15532: loop was not vectorized: compile time constraints prevent loop optimization. Consider using -O3.
LOOP END

Resolution:

Setting check:nobounds will vectorize the loop. Resulting optimization report will include the following remarks:

   remark #25084: Preprocess Loopnests: Moving Out Store   
   remark #15399: vectorization support: unroll factor set to 2
   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

 

  • compilers
  • Optimization Reports
  • Intel Compilers Vectorization Reports Optimization Reports
  • vectorization
  • Desarrolladores
  • Socios
  • Profesores
  • Estudiantes
  • Windows*
  • Fortran
  • Avanzado
  • Intermedio
  • Intel® Integrated Native Developer Experience (INDE)
  • Intel® Fortran Compiler
  • Intel® Fortran Composer XE
  • Intel® Visual Fortran Composer XE
  • Intel® Fortran Studio XE
  • Intel® Integrated Native Developer Experience Build Edition para 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
  • Herramientas de desarrollo
  • Optimización
  • Vectorización
  • Escritorio
  • Dirección URL
  • Ejemplo de código
  • Temas de compilador
  • Mejora del rendimiento
  • Zona de temas: 

    IDZone
  • Windows*

  • Viewing all articles
    Browse latest Browse all 672

    Latest Images

    Trending Articles



    Latest Images

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