par-threshold, Qpar-threshold

Sets a threshold for the auto-parallelization of loops.

IDE Equivalent

Windows: Optimization > Threshold For Auto-Parallelization
Linux: None

Architectures

IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture

Syntax

Linux: -par-threshold[n]
Windows:  /Qpar-threshold[[:]n]

Arguments

n    Is an integer whose value is the threshold for the auto-parallelization of loops. Possible values are 0 through 100.
If n is 0, loops get auto-parallelized always, regardless of computation work volume.
If n is 100, loops get auto-parallelized when performance gains are predicted based on the compiler analysis data. Loops get auto-parallelized only if profitable parallel execution is almost certain.
The intermediate 1 to 99 values represent the percentage probability for profitable speed-up. For example, n=50 directs the compiler to parallelize only if there is a 50% probability of the code speeding up if executed in parallel.

Default

-par-threshold100 or
/Qpar-threshold100
Loops get auto-parallelized only if profitable parallel execution is almost certain. This is also the default if you do not specify n.

Description

This option sets a threshold for the auto-parallelization of loops based on the probability of profitable execution of the loop in parallel.

This option is useful for loops whose computation work volume cannot be determined at compile-time. The threshold is usually relevant when the loop trip count is unknown at compile-time.

The compiler applies a heuristic that tries to balance the overhead of creating multiple threads versus the amount of work available to be shared amongst the threads.

Alternate Options

Linux: -par_threshold
Windows: /Qpar_threshold

See Also

Optimizing Applications:
Auto-Parallelization Overview

Auto-Parallelization: Enabling, Options, Directives, and Environment Variables

Auto-Parallelization: Threshold Control and Diagnostics