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

Diagnostic 15023: loop was not vectorized: unsupported loop structure

$
0
0

Cause:

This vectorization message is emitted when there are multiple exit points from a given loop.  Below is an example for this scenario. Here the DO loop has a conditional in which it's possible to exit the loop early if the condition is met.  Because of this exit this loop is not a vectorization candidate.

Example:

program f15023
implicit none
real(8) :: a(16)=5.0
integer :: i

myloop: do i=1,16
         if ( a(i) /= 5.0 ) then
             print*, "error"
             exit myloop
         end if
         a(i) = a(i) * i
        end do myloop
end program f15023

$ ifort -vec-report2 f15023.f90
f15023.f90(6): (col. 1) remark: loop was not vectorized: unsupported loop structure

To get this loop to vectorize, consider if it is at all possible to recode the algorithm such that the EXIT is not needed.

Back to the list of vectorization diagnostics for Intel Fortran

  • vectorization diagnostic messages
  • 开发人员
  • Apple OS X*
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8
  • Fortran
  • 高级
  • 入门级
  • 中级
  • 编译器
  • 英特尔® Fortran Composer XE
  • 开发工具
  • 服务器
  • URL
  • 编译器主题

  • Viewing all articles
    Browse latest Browse all 669

    Trending Articles



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