Diagnostic 15529: Loop Was Not Vectorized: Volatile Assignment Was Not Vectorized. Try Using Non-Volatile Assignment.

ID 732968
Updated 11/3/2015
Version Latest
Public

author-image

By

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