Auto-parallelization: Threshold Control and Diagnostics

Threshold Control

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.

Diagnostics

The -par-report (Linux) or /Qpar-report (Windows) option controls the auto-parallelizer's diagnostic levels 0, 1, 2, or 3.

Example of Parallelization Diagnostics Report

The following examples shows an output generated by -par-report3 (Linux) or /Qpar-report3 (Windows):

Example 1: Output

program MYPROG
procedure: myprog
serial loop: line 5: not a parallel candidate due to
statement at line 6
serial loop: line 9
flow data dependence from line 10 to line 10, due to "a"
12 Lines Compiled

The sample output resulted from the command:

Platform

Commands

Linux

ifort -c -parallel -par-report3 myprog.f90

Windows

ifort -c /Qparallel /Qpar-report3 myprog.f90

where the program code for myprog.f90 was:

Example 2: Sample code

program myprog

integer a(10000), q

C Assumed side effects

  do i=1,10000

    a(i) = foo(i)

  enddo

C Actual dependency

  do i=1,10000

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

  enddo

end

Troubleshooting Tips