The -par-threshold{n} (Linux*) 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.
The -par-report (Linux) or /Qpar-report (Windows) option controls the diagnostic levels 0, 1, 2, or 3 of the auto-parallelizer. Specify level 3 to get the most information possible from the option.
For example, assume you want a full diagnostic report on the following example code:
Example 1: Sample code |
---|
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 |
You can use -par-report3 (Linux) or /Qpar-report3 (Windows) by entering a command similar to the following:
Platform |
Commands |
---|---|
Linux |
ifort -parallel -par-report3 -c diag_prog.f90 |
Windows |
ifort /Qparallel /Qpar-report3 /c diag_prog.f90 |
where -c (Linux) or /c (Windows) instructs the compiler to compile the example without generating an executable.
The following example output illustrates the diagnostic report generated by the compiler for the example code shown above.
Example 2: Sample Code Report Output |
---|
procedure: NO_PAR serial loop: line 26 flow data dependence from line 27 to line 28, due to "A" flow data dependence from line 28 to line 28, due to "A" |
Use the !DEC$ PARALLEL directive to eliminate assumed data dependency.