Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

diag, Qdiag

Controls the display of diagnostic information during compilation.

Syntax

Linux:

-diag-type=diag-list

macOS:

-diag-type=diag-list

Windows:

/Qdiag-type:diag-list

Arguments

type

Is an action to perform on diagnostics. Possible values are:

enable

Enables a diagnostic message or a group of messages. If you specify -diag-enable=all (Linux* and macOS) or /Qdiag-enable:all (Windows*), all diagnostic messages shown in diag-list are enabled.

disable

Disables a diagnostic message or a group of messages. If you specify -diag-disable=all (Linux* and macOS) or /Qdiag-disable:all (Windows*), all diagnostic messages shown in diag-list are disabled.

error

Tells the compiler to change diagnostics to errors.

warning

Tells the compiler to change diagnostics to warnings.

remark

Tells the compiler to change diagnostics to remarks (comments).

diag-list

Is a diagnostic group or ID value. Possible values are:

driver

Specifies diagnostic messages issued by the compiler driver.

vec

Specifies diagnostic messages issued by the vectorizer.

par

Specifies diagnostic messages issued by the auto-parallelizer (parallel optimizer).

openmp

Specifies diagnostic messages issued by the OpenMP* parallelizer.

warn

Specifies diagnostic messages that have a "warning" severity level.

error

Specifies diagnostic messages that have an "error" severity level.

remark

Specifies diagnostic messages that are remarks or comments.

cpu-dispatch

Specifies the CPU dispatch remarks for diagnostic messages. These remarks are enabled by default.

id[,id,...]

Specifies the ID number of one or more messages. If you specify more than one message number, they must be separated by commas. There can be no intervening white space between each id.

tag[,tag,...]

Specifies the mnemonic name of one or more messages. If you specify more than one mnemonic name, they must be separated by commas. There can be no intervening white space between each tag.

The diagnostic messages generated can be affected by certain options, such as [Q]x, /arch (Windows) or -m (Linux and macOS).

Default

OFF

The compiler issues certain diagnostic messages by default.

Description

This option controls the display of diagnostic information during compilation. Diagnostic messages are output to stderr unless the [Q]diag-file option is specified.

NOTE:

The [Q]diag options do not control diagnostics emitted at runtime. For more information about runtime errors and diagnostics, see Handling Runtime Errors.

On ifort, to control the diagnostic information reported by the vectorizer, use options [q or Q]opt-report and [q or Q]opt-report-phase, phase vec.

On ifort, to control the diagnostic information reported by the auto-parallelizer, use options [q or Q]opt-report and [q or Q]opt-report-phase, phase par.

IDE Equivalent

Visual Studio: Diagnostics > Disable Specific Diagnostics

Alternate Options

enable vec

Linux and macOS: -qopt-report; -qopt-report -qopt-report-phase=vec

Windows: /Qopt-report; /Qopt-report /Qopt-report-phase:vec

disable vec

Linux and macOS: -qopt-report=0 -qopt-report-phase=vec

Windows: /Qopt-report:0 /Qopt-report-phase:vec

enable par

Linux and macOS: -qopt-report; -qopt-report -qopt-report-phase=par

Windows: /Qopt-report; /Qopt-report /Qopt-report-phase:par

disable par

Linux and macOS: -qopt-report=0 -qopt-report-phase=par

Windows: /Qopt-report:0 /Qopt-report-phase:par

Example

The following example shows how to disable all remarks or comments:

-diag-disable=remark     ! Linux and macOS systems
/Qdiag-disable:remark    ! Windows systems

The following example shows how to enable diagnostic IDs 117, 230 and 450:

-diag-enable=117,230,450     ! Linux and macOS systems
/Qdiag-enable:117,230,450    ! Windows systems

The following example shows how to change vectorizer diagnostic messages to warnings:

-diag-enable=vec -diag-warning=vec      ! Linux and macOS systems
/Qdiag-enable:vec /Qdiag-warning:vec    ! Windows systems

Note that you need to enable the vectorizer diagnostics before you can change them to warnings.

The following example shows how to disable all auto-parallelizer diagnostic messages:

-diag-disable=par     ! Linux and macOS systems
/Qdiag-disable:par    ! Windows systems

The following example shows how to change all diagnostic warnings and remarks to errors:

-diag-error=warn,remark    ! Linux and macOS systems
/Qdiag-error:warn,remark   ! Windows systems

The following example shows how to get a list of only vectorization diagnostics:

-diag-dump -diag-disable=all -diag-enable=vec        ! Linux and macOS systems
/Qdiag-dump /Qdiag-disable:all /Qdiag-enable:vec     ! Windows systems

See Also