Quantcast
Channel: Fortran
Viewing all articles
Browse latest Browse all 3108

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
  • Développeurs
  • Apple OS X*
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8
  • Fortran
  • Avancé
  • Débutant
  • Intermédiaire
  • Compilateurs
  • Intel® Fortran Composer XE
  • Outils de développement
  • Serveur
  • URL
  • Rubriques de compilateurs

  • Viewing all articles
    Browse latest Browse all 3108

    Latest Images

    Trending Articles



    Latest Images

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