The -par-report (Linux* and Mac OS* X) or /Qpar-report (Windows*) option controls the diagnostic levels 0, 1, 2, or 3 of the auto-parallelizer. Specify a value of 3 to generate the maximum diagnostic details.
Run the diagnostics report by entering commands similar to the following:
Operating System |
Commands |
---|---|
Linux and Mac OS X |
icpc -c -parallel -par-report 3 sample.cpp |
Windows |
icl /c /Qparallel /Qpar-report:3 sample.cpp |
where -c (Linux and Mac OS X) or /c (Windows) instructs the compiler to compile the example without generating an executable.
Linux and Mac OS X: The space between the option and the phase is optional.
Windows: The colon between the option and phase is optional.
For example, assume you want a full diagnostic report on the following example code:
Example |
---|
void no_par(void) { int i; int a[1000]; for (i=1; i<1000; i++) { a[i] = (i * 2) % i * 1 + sqrt(i); a[i] = a[i-1] + i; } } |
The following example output illustrates the diagnostic report generated by the compiler for the example code shown above. In most cases, the comment listed next to the line is self-explanatory.
Example Report Output |
---|
procedure: no_par sample.c(13):(3) remark #15048: DISTRIBUTED LOOP WAS AUTO-PARALLELIZED sample.c(13):(3) remark #15050: loop was not parallelized: existence of parallel dependence sample.c(19):(5) remark #15051: parallel dependence: proven FLOW dependence between a line 19, and a line 19 |
The -par-threshold{n) (Linux* and Mac OS* X) or /Qpar-threshold[:n] (Windows*) option sets a threshold for auto-parallelization of loops based on the probability of profitable execution of the loop in parallel. The value of n can be from 0 to 100. You can use -par-threshold0 (Linux and Mac OS X) or /Qpar-threshold:0 (Windows) to auto-parallelize loops regardless of computational work.
Use -ipo[value] (Linux and Mac OS X) or /Qipo (Windows) to eliminate assumed side-effects done to function calls.