Intel® C++ Compiler XE 13.1 User and Reference Guides

Using Guided Auto Parallelism

The guided auto parallelism feature of the Intel® Compiler is a tool offering selective advice to improve the performance of serially coded applications. The tool suggests changes that take advantage of the compiler's ability to automatically vectorize and parallelize code as well as improve the efficiency of data operations. The tool does not require that you implement threaded code to improve the execution performance of your code nor does it require that your code is already threaded or parallel code.

To invoke this tool, use the compiler option –guide[=n] (on Linux* operating systems) or /Qguide[:n] (on Windows* operating systems). Using this option causes the compiler to generate messages suggesting ways to optimize the performance of your application. You can also use more specific compiler options such as –guide-vec , –guide-par, and –guide-data-trans (on Linux* OS), or /Qguide-vec, /Qguide-par, and /Qguide-data-trans (on Windows* OS) to perform individual guided optimizations for vectorizing, parallelizing, and data transformation of your application.

When any guided auto parallelism option is used, the compiler provides only diagnostic advice. Object files or executables are not created in this mode. See the table below for descriptions of the options.

Linux*

Windows*

Description

-guide(=n)

/Qguide[:n]

Lets you set a level (n) of guidance for auto-vectorization, and data transformation analysis.

To obtain guidance for auto parallelism, you must use the -parallel (Linux*) or /Qparallel (Windows*) option along with the -guide or /Qguide option.

-guide-par(=n)

/Qguide-par[:n]

Lets you to set a level (n) of guidance only for auto parallelism analysis.

Note

You must use the -parallel (Linux*) or /Qparallel (Windows*) option along with the -guide-par or /Qguide-par option to get this advice.

-guide-vec(=n)

/Qguide-vec[:n]

Lets you to set a level (n) of guidance only for auto-vectorization analysis.

-guide-data-trans(=n)

/Qguide-data-trans[:n]

Lets you to set a level (n) of guidance only for data transformation analysis.

For all of the above options, the optional argument n specifies the level of guidance. The argument n takes the values 1-4. When n is not specified, the default is 4. If you specify n=1 or 2, a standard level of guidance is provided.

When you use n=3 or n=4, you may get advanced messages. For example, you may get messages about how to optimize a particular loop-nest or get a message on how exception-handling inside a loop-nest affects optimizations for that loop-nest. Or you may get a message on how to provide extra information to the compiler on cost-modeling (expected values of trip-counts, and so on).

If you simultaneously specify a level of guidance (n) for the general -guide or /Qguide option and also for one or more of the other specific guide options, the level of guidance (n) for the specific guide option overrides the general -guide or /Qguide option setting.

If you do not specify a level of guidance for the general -guide or /Qguide option, but do set a level of guidance for one or more of the specific guide options, the -guide or /Qguide option is set equal to the greatest value passed to the specific guide options.

Capturing Guidance Messages

The guided auto parallelism tool analyzes all of your serial code or individual parts of your code and generates advisory messages. By default, messages that are generated by the guided auto parallelism tool are output to stderr.

To capture messages in a file, use the options listed in the following table.

Note

The options listed in the following table must be used with the -guide or /Qguide, or -guide-par or /Qguide-par, or -guide-vec or /Qguide-vec, or -guide-data-trans or /Qguide-data-trans options. If not, they are ignored.

Linux*

Windows*

Description

-guide-file[=file_name]

/Qguide-file[:file_name]

Gathers all messages generated during a guided auto-parallelization run into the specified file.

-guide-file-append[=file_name]

/Qguide-file-append[:file_name]

Lets you specify the file into which all messages generated during a guided auto parallelism run should be appended.

For the above options the file_name argument can also include a path. If a path is not specified, the file is created in the current working directory. If there is already a file named file_name, it is overwritten when you use the -guide-file or /Qguide-file option. If you do not include an extension as part of the file_name, the extension .guide is appended.

Configuring Code Regions for GAP Messages

To limit guided auto parallelism analysis to specific regions (hotspots) in your application, use the options mentioned in the table below.

Linux*

Windows*

Description

-guide-opts[=string]

/Qguide-opts[:string]

Lets you analyze specified code elements, identified by string.

-guide-profile(=filename|dir)

/Qguide-profile[:filename|dir]

Lets you specify a loop profiler data file (or a set of files) when used with option -guide or /Qguide.

You must use the -guide-opts (Linux*) or /Qguide-opts (Windows*) option along with one of the guided auto parallelism options like -guide, -guide-vec, -guide-par, -guide-data-trans (on Linux*) or /Qguide, /Qguide-vec, /Qguide-par, /Qguide-data-trans (Windows*) options. Use the string parameter to provide information about known areas of interest (hotspots). The string parameter takes one or more of the following variables: filename, routine, range. The compiler parses the string parameter and generates syntax errors if there are any.

Syntax

-guide-opts=string

Follow these guidelines when using the string parameter:

Alternatively, you can automate and narrow down the targeted regions to specific hotspots in your application code by using the -guide-profile (on Linux* OS) or the /Qguide-profile option (on Windows* OS) along with the -guide or /Qguide option.

Syntax

-guide-profile=filename | dir [ , [ filename | dir ] ... ]

The region targeted by the -guide or /Qguide option, when used along with the -guide-profile or /Qguide-profile option, is configured by processing the XML data file(s) produced from a loop profiler instrumented run. The loop profiler result files are specified as the actual loop profiler data file, or as the directory name where loop profile data files are stored.

See Also


Submit feedback on this help topic