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!
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.
Is an action to perform on diagnostics. Possible values are:
Is a diagnostic group or ID value. Possible values are:
The diagnostic messages generated can be affected by certain options, such as
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.
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.
Sukruth H V
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.
-opt-report=5 -opt-report-phase=vec >this will report the most details of the vectorizations!!