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

Diagnostic 15527: Loop was not vectorized: function call cannot be vectorized

$
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 loop was not vectorized since loop with function call cannot be vectorized.

Example:

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

subroutine bar(a)
    implicit none
    include 'omp_lib.h'

    integer (kind=omp_lock_kind) a
    call omp_init_lock(a)
end subroutine bar

subroutine foo(a,n)
       include 'omp_lib.h'
       integer (kind=omp_lock_kind) a(n)

       do i=1,n
        call bar (a(i))
       end do
end subroutine foo

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

 LOOP BEGIN at f15527.f90(13,8)

   f15527.f90(6,10):remark #15527: loop was not vectorized: function call to _omp_init_lock cannot be vectorized

LOOP END

Resolution:

In order for the loop to be vectorized there should be no special operators and no function or subroutine calls, unless these are inlined, either manually or automatically by the compiler, or they are SIMD (vectorized) functions.

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
  • Windows*
  • Fortran
  • Avancé
  • Intermédiaire
  • 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
  • OpenMP*
  • Outils de développement
  • Optimisation
  • Vectorisation
  • Intégré
  • PC portable
  • Serveur
  • Bureau
  • URL
  • Rubriques de compilateurs
  • Recherche d’erreurs
  • 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>