User and Reference Guide for the Intel® C++ Compiler 14.0

opt-threads-per-core, Qopt-threads-per-core

Informs the compiler about the number of hardware threads per core that will be used for an application. This option only applies to Intel® MIC Architecture.

Architecture Restrictions

Only available on Intel® 64 architecture targeting Intel® MIC Architecture

Syntax

Linux OS:

-opt-threads-per-core=n

OS X:

None

Windows OS:

/Qopt-threads-per-core:n

Arguments

n

Is the number of hardware threads per core that the compiler should assume that will be used while executing the application. Possible values are 1, 2, 3, or 4.

Default

4

Four hardware threads per core are used for the application.

Description

This option informs the compiler about the number of hardware threads per core that will be used for an application. This enables the compiler to perform better code optimizations (such as instruction scheduling).

You should choose a value for n that is based on how many threads will be used per core while executing the application. For example, if the application is parallelized using OpenMP* API, use the value of n that uses the same number of threads per core as the OpenMP* API affinity setting will use when executing the application code on the Intel® Xeon Phi™ coprocessor.

This option does not affect the number of threads per core that will be used at run time.

Code compiled with this option can run correctly on any (hardware-supported) number of threads per core.

IDE Equivalent

None

Alternate Options

None

See Also


Submit feedback on this help topic