Quantcast
Channel: 中级
Viewing all articles
Browse latest Browse all 669

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
  • 开发人员
  • 合作伙伴
  • 教授
  • 学生
  • Windows*
  • Fortran
  • 高级
  • 中级
  • 英特尔® Integrated Native Developer Experience(英特尔® 集成原生开发人员体验)
  • Intel® Fortran Compiler
  • 英特尔® Fortran Composer XE
  • 英特尔® Visual Fortran Composer XE
  • 英特尔® Fortran Studio XE
  • 英特尔® Integrated Native Developer Experience Build Edition(适用 OS X*)
  • 英特尔® Parallel Studio
  • 英特尔® Parallel Studio XE
  • 英特尔® Parallel Studio XE Cluster Edition
  • 英特尔® Parallel Studio XE Composer Edition
  • 英特尔® Parallel Studio XE Professional Edition
  • 开发工具
  • 优化
  • 矢量化
  • 桌面
  • URL
  • 代码样本
  • 编译器主题
  • 提升性能
  • 主题专区: 

    IDZone
  • Windows*

  • Viewing all articles
    Browse latest Browse all 669

    Trending Articles



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