User and Reference Guide for the Intel® Fortran Compiler 14.0

vec-report, Qvec-report

Controls the diagnostic information reported by the vectorizer.

Syntax

Linux OS and OS X:

-vec-report[=n]

Windows OS:

/Qvec-report[:n]

Arguments

n

Is a value denoting which diagnostic messages to report. Possible values are:

0

Tells the vectorizer to report no diagnostic information.

1

Tells the vectorizer to report on vectorized loops.

2

Tells the vectorizer to report on vectorized and non-vectorized loops.

3

Tells the vectorizer to report on vectorized and non-vectorized loops and any proven or assumed data dependences.

4

Tells the vectorizer to report on non-vectorized loops.

5

Tells the vectorizer to report on non-vectorized loops and the reason why they were not vectorized.

6

Tells the vectorizer to use greater detail when reporting on vectorized and non-vectorized loops and any proven or assumed data dependences.

7

Tells the vectorizer to emit vector code quality message ids and corresponding data values for vectorized loops. It provides information such as the expected speedup, memory access patterns, and the number of vector idioms for vectorized loops.

Default

-vec-report=0
or /Qvec-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.

Description

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.

IDE Equivalent

Windows: Diagnostics > Vectorizer Diagnostic Level

Linux: None

OS X: Diagnostics > Vectorizer Diagnostic Report

Alternate Options

None

Example

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 saturation8

If 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".

Note

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


Submit feedback on this help topic