Using Guided Auto-Parallelization

Guided auto-parallelization is a diagnostic tool to help you locate portions in your serial code that can be parallelized. When you invoke the guided auto-parallelization tool, the Intel® compiler guides you to make changes in your code that efficiently increases automatic parallelization/vectorization of your 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 improve optimization. You can also use more specific compiler options such as –guide-vec , –guide-par, and –guide-data-trans (on Linux* OS), or the /Qguide-vec, /Qguide-par, and /Qguide-data-trans (on Windows* OS) to obtain individual guided optimizations for vectorizing, parallelizing, and data transformation.

When any guided auto-parallelization 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 to set a level of guidance for auto-vectorization and data transformation.

To obtain guidance for auto-parallelization, 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 of guidance only for auto-parallelization.

Note iconNote

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 of guidance only for auto-vectorization.

-guide-data-trans(=n)

/Qguide-data-trans[:n]

Lets you to set a level of guidance only for data transformation.

For all of the above options, the argument n is optional and it 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 specify a level of guidance for the -guide or /Qguide option along with one of the other guide options, and set a different level of guidance (values for n) for the other guide options, the value set for the individual guide optimization overrides the setting specified for -guide or /Qguide option.

If you do not specify a level of guidance for the -guide or /Qguide option, but specify one of the other guide options with a level of guidance, the -guide or /Qguide option is enabled with the greatest value passed to any of the individual guide optimizations specified.

Capturing Guidance Messages

The guided auto-parallelization 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-parallelization tool are output to stderr.

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

Note iconNote

The options listed in the table must be used along 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 they are not, the guided auto-parallelization tool ignores them.

Linux*

Windows*

Description

-guide-file[=file_name]

/Qguide-file[:file_name]

Gathers all messages generated during a guided auto-parallization compile into a 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-parallelization compile should be appended.

For the -guide-file or /Qguide-file and -guide-file-append or /Qguide-file-append options, the file_name argument can also include a path. If the path is not specified, the file is created in the current working directory. If there is already a file with the file_name, it is overwritten. If you don’t provide an extension with file_name, the extension is .guide.

Guided Auto-parallelization on Known Hotspots

When you know the hotspots in your application and want advice only for those hotspots, use the –guide-opts (Linux*) or /Qguide-opts (Windows*) option along with any of the guided auto-parallelization options like -guide, -guide-vec, -guide-par, -guide-data-trans (on Linux*) or /Qguide, /Qguide-vec, /Qguide-par, /Qguide-data-trans (Windows*) options. The output message indicates which portions of the input files were analyzed. Complete routine name is generated in the message if a routine is selected to be analyzed.

Use the string parameter to provide information about known 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:

See Also



Submit feedback on this help topic

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