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

Diagnostic 15331: Using FP model: precise prevents vectorization

$
0
0

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

Cause:

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 - Qvec-report2 - Qopt-report:2includes non-vectorized loop instance. 

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(i)
	end do

	b = x

end subroutine foo

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

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 

LOOP END

Resolution:

Using fast FP model (Win: -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

  • remark
  • vectorization
  • Intel Compilers Vectorization Reports Optimization Reports
  • 开发人员
  • 英特尔 AppUp® 开发人员
  • 合作伙伴
  • 教授
  • 学生
  • Apple OS X*
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8
  • Fortran
  • 高级
  • 中级
  • 英特尔® Composer XE
  • Intel® Fortran Compiler
  • 英特尔® Fortran Composer XE
  • 英特尔® Parallel Composer
  • 英特尔® Visual Fortran Composer XE
  • Intel® Cluster Studio XE
  • 英特尔® Fortran Studio XE
  • 英特尔® Media Server Studio Professional Edition
  • 英特尔® Parallel Studio
  • 英特尔® Parallel Studio XE
  • 英特尔® Parallel Studio XE Cluster Edition
  • 英特尔® Parallel Studio XE Composer Edition
  • 英特尔® Parallel Studio XE Professional Edition
  • 开发工具
  • 优化
  • 矢量化
  • URL
  • 代码样本
  • 编译器主题
  • 提升性能
  • 主题专区: 

    IDZone

    Viewing all articles
    Browse latest Browse all 669

    Trending Articles



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