User and Reference Guide for the Intel® Fortran Compiler 14.0
Controls the diagnostic information reported by the vectorizer.
Linux OS and OS X: | -vec-report[=n] |
Windows OS: | /Qvec-report[:n] |
n |
Is a value denoting which diagnostic messages to report. Possible values are:
|
-vec-report=0 |
If you do not specify the option on the command line, the default is to display no messages. However, if vectorization diagnostics reporting has been enabled and you do not specify n, the compiler reports diagnostics on vectorized loops. |
This option controls the diagnostic information reported by the vectorizer. The vectorizer report is sent to stdout.
If you do not specify n, it is the same as specifying value 1 for option [Q]vec-report.
If this option is specified from within the IDE, the report is included in the build log if the Generate Build Logs option is selected.
Windows: Diagnostics > Vectorizer Diagnostic Level
Linux: None
OS X: Diagnostics > Vectorizer Diagnostic Report
None
The following example illustrates the effect of some of the settings when -vec-report is specified on Linux* systems. Note that the remarks you see may differ depending on your coprocessor.
subroutine foo0(n, a)
integer*4, intent(inout) :: a(*)
integer*4, intent(in) :: n
integer*4 i
do i = 1, n
if (mod(n, 2) .eq. 1) a(i) = a(i+1)
enddo
end subroutine
subroutine foo1(n, a)
integer*4, intent(inout) :: a(*)
integer*4, intent(in) :: n
integer*4 i
do i = 1, n
if (mod(n, 2) .eq. 1) a(i) = a(i-1)
enddo
end subroutine
zsh/4 89 % ifort -c -simd -vec_report1 example.f90
example.f90(7): (col. 5) remark: LOOP WAS VECTORIZED
zsh/4 90 % ifort -c -simd -vec_report2 example.f90
example.f90(7): (col. 5) remark: LOOP WAS VECTORIZED
example.f90(7): (col. 5) remark: loop was not vectorized: cannot vectorize empty loop
example.f90(18): (col. 5) remark: loop was not vectorized: existence of vector dependence
example.f90(18): (col. 5) remark: loop was not vectorized: cannot vectorize empty loop
zsh/4 91 % ifort -c -simd -vec_report3 example.f90
example.f90(7): (col. 5) remark: LOOP WAS VECTORIZED
example.f90(7): (col. 5) remark: REMAINDER LOOP WAS VECTORIZED
example.f90(7): (col. 5) remark: loop was not vectorized: cannot vectorize empty loop
example.f90(18): (col. 5) remark: loop was not vectorized: existence of vector dependence
example.f90(19): (col. 31) remark: vector dependence: assumed FLOW dependence between a line 19 and a line 19
example.f90(18): (col. 5) remark: loop was not vectorized: cannot vectorize empty loop
Consider the following program satsub.f:
subroutine saturation8(a, b, n)
integer*2, allocatable, intent(inout) :: a(:)
integer*2, allocatable, intent(in) :: b(:)
integer*4, intent(in) :: n
integer*4 i, aa, bb
do i = 1, n
aa = iand(a(i), 255)
bb = iand(b(i), 255)
if (aa - bb .gt. 0) then
a(i) = aa - bb
else
a(i) = 0
endif
enddo
end subroutine saturation8If satsub.f is compiled using the following command on Linux OS:
ifort -c -vec-report7 satsub.f 2>&1 | vecanalysis.py --list
It causes the compiler to generate message IDs as output. Then the vecanalysis.py script takes these message IDs as input and produces a .txt file that includes the original source code with line numbers and embedded vec-report=7 messages. This information helps you understand the generated vector code quality without going through ASM code.
The .txt file created has a name similar to the program name. For example, if your program is named satSub.f90, the text file is named satSub_f90_vr.txt. After the script runs, you will see a message showing the name of the .txt file. For example, "Writing satSub_f90_vr.txt ... done".
For the location of the vecanalysis.py script, see the article titled: VecAnalysis Python* Script for Annotating Intel C++ & Fortran Compilers Vectorization Reports, which is located in http://intel.ly/XeSkW6