Intel® System Studio
Share information with other developers using Intel® System Studio.

icc -diag-type

Brandon_B_
Beginner
708 Views

Hello,

I'm trying to understand how to use the -diag-type option and its arguments. I know about -vec-report, but would like to see what happens when I correctly use -diag-type with the "vec" argument. So far, I'm not sure of the syntax:

 

-sh-3.2$ icc -diag-type "vec" helloworld.c
icc: command line warning #10006: ignoring unknown option '-diag-type'
icc: error #10236: File not found:  'vec'

 


I've tried a number of variants of the above without success. What worries me the most is the common motif of "ignoring unknown option '-diag-type'".

Thanks for the help!

0 Kudos
4 Replies
Yang_W_Intel
Employee
708 Views

Hello,
        I think this is a misunderstanding. There is no option with name "-diag-type". The option is actually -diag-<type> where the <type> should be replaced by the action which supported by icc compiler. The supported type is listed below which is copied from Intel compiler documents. For example, use option -diag-enable=vec to enable the vectorization diagnostics.
        Hope this clarifies.

Thanks.

-Yang

 

type

Is an action to perform on diagnostics. Possible values are:

enable

Enables a diagnostic message or a group of messages.

disable

Disables a diagnostic message or a group of messages.

error

Tells the compiler to change diagnostics to errors.

warning

Tells the compiler to change diagnostics to warnings.

remark

Tells the compiler to change diagnostics to remarks (comments).

diag-list

Is a diagnostic group or ID value. Possible values are:

driver

Specifies diagnostic messages issued by the compiler driver.

port-linux

Specifies diagnostic messages for language features that may cause errors when porting to Linux* systems. This diagnostic group is only available on Windows* systems.

port-win

Specifies diagnostic messages for GNU extensions that may cause errors when porting to Windows. This diagnostic group is only available on Linux and OS X* systems.

thread

Specifies diagnostic messages that help in thread-enabling a program.

vec

Specifies diagnostic messages issued by the vectorizer.

par

Specifies diagnostic messages issued by the auto-parallelizer (parallel optimizer).

openmp

Specifies diagnostic messages issued by the OpenMP* parallelizer.

warn

Specifies diagnostic messages that have a "warning" severity level.

error

Specifies diagnostic messages that have an "error" severity level.

remark

Specifies diagnostic messages that are remarks or comments.

cpu-dispatch

Specifies the CPU dispatch remarks for diagnostic messages. These remarks are enabled by default.

id[,id,...]

Specifies the ID number of one or more messages. If you specify more than one message number, they must be separated by commas. There can be no intervening white space between each id.

tag[,tag,...]

Specifies the mnemonic name of one or more messages. If you specify more than one mnemonic name, they must be separated by commas. There can be no intervening white space between each tag.

The diagnostic messages generated can be affected by certain options, such as x, /arch (Windows) or -m (Linux and OS X).

0 Kudos
Brandon_B_
Beginner
708 Views

Thanks! I still seem to be misunderstanding the purpose a bit. I had originally thought that I could get information similar to -vec-report:

login4.stampede(3)$ icc -xhost -O3 -vec-report=4 dependency.c -o dependency
dependency.c(33): (col. 2) remark: loop was not vectorized: existence of vector dependence.
dependency.c(33): (col. 2) remark: loop skipped: multiversioned.
dependency.c(33): (col. 2) remark: loop was not vectorized: not inner loop.
dependency.c(48): (col. 4) remark: loop was not vectorized: existence of vector dependence.
dependency.c(48): (col. 4) remark: loop skipped: multiversioned.
dependency.c(47): (col. 6) remark: loop was not vectorized: not inner loop.

login4.stampede(6)$ icc -xhost -O3 -diag-enable vec dependency.c -o dependency
login4.stampede(7)$ icc -xhost -O3 -diag-enable vec=4 dependency.c -o dependency
icc: warning #10034: Unrecognized keyword 'vec=4' for option '-diag-enable'

As you can see on the emboldened line, there is no output about vecorization, as there was on the previous lines involving the use of -vec-report.

0 Kudos
Sukruth_H_Intel
Employee
708 Views

Hi Brandon,

                   Compiler options have quite changed in 15.0 version of compiler. In order to get the Vector report as above , you may use "-qopt-report=n", where "n" indicates the level of detail in the report.

icc <src_file> -qopt-report=5 -qopt-report-file=stdout.

By default if you don't specify the "-qopt-report-file=stdout" option, then the report would be generated in the *.optrpt file, which can be opened using an text editor.

Please do let us know if you need any further information.

Regards,
Sukruth H V

0 Kudos
Yang_W_Intel
Employee
708 Views

Hi,
     The diag-<type> is used to control whether or how the diagnostic message are displayed.  For example:
-diag-disable remark    >this would disable all the remarks from compiler diagnostic message. You will not see the remarks from compiler

-diag-warning remark   >this would change all the remarks to warning

-diag-disable xxx    >this would disable the messages with ID "xxx"

For the compiler 14.x or older,
-diag-enable vec -vec-report4   > this is same as -vec-report4 since vec report is only triggered by -vec-report option
-diag-disable vec -vec-report4  > this will disable the vec report from compiler. no vec message reported any more

Starting from compiler 15.0, we have a significant change in the compiler optimization report. The vec-report option will be deprecated.
The vectorization report is part of optimization report, which is controled by two major options:
-opt-report=<N>     > N = 1 ~ 5 to control the report level
-opt-report-phase=<val>    > <val> is the optimization phase.
e.g.
-opt-report=5 -opt-report-phase=vec          >this will report the most details of the vectorizations!!

Thanks.

-Yang

0 Kudos
Reply