Parallelism Report

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

ifort -c -parallel -par-report 3 sample.f90

Windows

ifort /c /Qparallel /Qpar-report:3 sample.f90

where -c (Linux and Mac OS X) or /c (Windows) instructs the compiler to compile the example without generating an executable.

Note iconNote

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

subroutine no_par(a, MAX)

integer :: i, a(MAX)

do i = 1, MAX

a(i) = mod((i * 2), i) * 1 + sqrt(3.0)

a(i) = a(i-1) + i

end do

end subroutine no_par

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.f90(7):(4) remark #15049: loop was not parallelized: loop is not a parallelization candidate

sample.f90(7):(4) remark #15050: loop was not parallelized: existence of parallel dependence

sample.f90(13):(6) remark #15051: parallel dependence: proven FLOW dependence between A line 13, and A line 13

Responding to the results

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.

Use the !DEC$ PARALLEL directive to eliminate assumed data dependency.