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

Diagnostic 15532: 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 ) states that compile time constraints prevent optimization.

Example:

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

subroutine foo(a, n)

       implicit none
       integer, intent(in) :: n
       double precision, intent(inout) :: a(n)
       integer :: bar
       integer :: i

       i=0
 100   CONTINUE
       a(i)=0
       i=i+1
       if (i .lt. bar()) goto 100

  end subroutine foo

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

  LOOP BEGIN  
      remark #15532: loop was not vectorized: compile time constraints prevent loop optimization. Consider using -O3.
 
  LOOP END

Resolution:

Use -O3 optimization option and refer to Diagnostic 15523

GOTO statements prevent vectorization since loop iteration count cannot be computed.

See also:

Requirements for Vectorizable Loops

Vectorization Essentials

Vectorization and Optimization Reports

Back to the list of vectorization diagnostics for Intel Fortran

  • vectorization
  • Intel Compilers Vectorization Reports Optimization Reports
  • Optimization Reports
  • vec-report vectorization reports
  • diagnostic messages
  • Développeurs
  • Partenaires
  • Professeurs
  • Étudiants
  • Apple OS X*
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8
  • Yocto Project
  • Internet des objets
  • Serveur
  • Windows*
  • Fortran
  • Avancé
  • Débutant
  • Intel® Composer XE
  • Intel® Fortran Composer XE
  • Intel® Visual Fortran Composer XE
  • Intel® Cluster Studio XE
  • Intel® Fortran Studio XE
  • Intel® Parallel Studio XE
  • Intel® Parallel Studio XE Cluster Edition
  • Intel® Parallel Studio XE Composer Edition
  • Intel® Parallel Studio XE Professional Edition
  • Intel® Advanced Vector Extensions
  • Outils de développement
  • Vectorisation
  • Intégré
  • PC portable
  • Serveur
  • Bureau
  • URL
  • Rubriques de compilateurs
  • Amélioration des performances
  • Zone des thèmes: 

    IDZone
  • Windows*

  • Viewing all articles
    Browse latest Browse all 3108

    Trending Articles



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