# guide-opts, Qguide-opts

Tells the compiler to analyze certain code and generate recommendations that may improve optimizations. This feature is only available for ifort.

## Syntax

Linux: | -guide-opts=string

macOS: | -guide-opts=string

Windows: | /Qguide-opts:string

## Arguments

string | Is the text denoting the code to analyze. The string must appear within quotes. It can take one or more of the following forms:
filename
filename, routine
filename, range [, range]...
filename, routine, range [, range]...
If you specify more than one of the above forms in a string, a semicolon must appear between each form. If you specify more than one range in a string, a comma must appear between each range. Optional blanks can follow each parameter in the forms above and they can also follow each form in a string.
filename | Specifies the name of a file to be analyzed. It can include a path. If you do not specify a path, the compiler looks for filename in the current working directory.
routine | Specifies the name of a routine to be analyzed. You can include an identifying argument. The name, including any argument, must be enclosed in single quotes. The compiler tries to uniquely identify the routine that corresponds to the specified routine name. It may select multiple routines to analyze, especially if the following is true: More than one routine has the specified routine name, so the routine cannot be uniquely identified. No argument information has been specified to narrow the number of routines selected as matches.
range | Specifies a range of line numbers to analyze in the file or routine specified. The range must be specified in integers in the form: first_line_number-last_line_number The hyphen between the line numbers is required.

## Default

OFF | You do not receive guidance on how to improve optimizations. However, if you specify the [Q]guide option, the compiler analyzes and generates recommendations for all the code in an application

## Description

This option tells the compiler to analyze certain code and generate recommendations that may improve optimizations.

This option is ignored unless you also specify one or more of the following options:

- [Q]guide

- [Q]guide-vec

- [Q]guide-data-trans

- [Q]guide-par

When the [Q]guide-opts option is specified, a message is output that includes which parts of the input files are being analyzed. If a routine is selected to be analyzed, the complete routine name will appear in the generated message.

When inlining is involved, you should specify callee line numbers. Generated messages also use callee line numbers.

## IDE Equivalent

Visual Studio: Diagnostics > Guided Auto Parallelism > Guided Auto Parallelism Code Selection Options

## Alternate Options

None

## Example

Consider the following:

    Linux*: -guide-opts="m.f, 1-10; m2.f90, 1-40, 50-90, 100-200; m5.f, 300-400; x.f, 'funca(j)', 22-44, 55-77, 88-99; y.f, 'subrb'"

    Windows*: /Quide-opts="m.f, 1-10; m2.f90, 1-40, 50-90, 100-200; m5.f, 300-400; x.f, 'funca(j)', 22-44, 55-77, 88-99; y.f, 'subrb'"

The above command causes the following to be analyzed:

file m.f, line numbers 1 to 10
file m2.f90, line numbers 1 to 40, 50 to 90, and 100 to 200
file m5.f, line numbers 300 to 400
file x.f, function funca with argument (j), line numbers 22 to 44, 55 to 77, and 88 to 99
file y.f, subroutine subrb

Parent topic: Advanced Optimization Options

## See Also

guide, Qguide compiler option
guide-data-trans, Qguide-data-trans compiler option
guide-par, Qguide-par compiler option
guide-vec, Qguide-vec compiler option
guide-file, Qguide-file compiler option