par-threshold, Qpar-threshold

Sets a threshold for the auto-parallelization of loops.

IDE Equivalent

Windows: None

Linux: Optimization > Auto-Parallelization Threshold

Mac OS X: Optimization > Auto-Parallelization Threshold

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-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. To use this option, you must also specify -parallel (Linux and Mac OS X) or /Qparallel (Windows).

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.

Note iconNote

This option may behave differently on Intel® microprocessors than on non-Intel microprocessors.

Alternate Options

None


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.