Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Diagnostic 15529: loop was not vectorized: volatile assignment was not vectorized. Try using non-volatile assignment.

$
0
0

Product Version: Intel® Fortran Compiler 15.0 and a later version 

Cause:

When a code contains a variable which is declared as VOLATILE, the vectorization report generated using Intel® Fortran Compiler's optimization and vectorization report options includes non-vectorized loop instance:

Windows* OS:  /O2  /Qopt-report:2  /Qopt-report-phase:vec    

Linux OS or OS X:  -O2 -qopt-report2  -qopt-report-phase=vec 

Example:

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

PROGRAM LOOP
  IMPLICIT NONE
  INTEGER, PARAMETER :: N=100000
  INTEGER            :: I
  REAL,DIMENSION(N)  :: E, B = (/(I, I=1,N)/)
  REAL, VOLATILE     :: D = 2.

  DO I=1,N
     E(I) = D*SIN(B(I))
  ENDDO

  PRINT *, E(N)
END PROGRAM LOOP

ifort -c  -O2 -qopt-report2 -qopenmp-simd -qopt-report-file=stderr -qopt-report-phase=vec f15529.f90
 

Begin optimization report for: LOOP

    Report from: Vector optimizations [vec]

Non-optimizable loops:

LOOP BEGIN at f15529.f90(10,3)
   remark #15529: loop was not vectorized: volatile assignment was not vectorized. Try using non-volatile assignment.[f15529.f90(9,6)]
LOOP END

See also:

Requirements for Vectorizable Loops

Vectorization Essentials

Vectorization and Optimization Reports

Back to the list of vectorization diagnostics for Intel® Fortran


Viewing all articles
Browse latest Browse all 3384

Trending Articles



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