Message Options

This topic contains a list and details of different message options.

-m msg_lvl

The -m msg_lvl option specifies the minimum compiler message levels to enable. The following list shows the integers to specify in order to enable each type of message and which messages are generated by default.

msg_lvl
Message types enabled
0
Error, warning, caution, note, and comment
1
Error, warning, caution, and note
2
Error, warning, and caution
3
Error and warning (default)
4
Error

Caution and warning messages denote, respectively, possible and probable user errors.

By default, messages are sent to the standard error file, stderr, and are displayed on the terminal. If the -r option is specified, messages are also sent to the listing file.

To see more detailed explanations of messages, use the explain command. This command retrieves message explanations and displays them online. For example, to obtain documentation on message 500, enter the following command:
% explain ftn-500

The default msg_lvl is 3, which suppresses messages at the comment, note, and caution level. It is not possible to suppress messages at the error level. To suppress specific comment, note, caution, and warning messages, see -M msgs below.

To obtain messages regarding nonstandard Fortran usage, specify -e n. For more information about this option, see -ddisable_opt and -eenable_opt.

-M msgs

The -M msgs  option suppresses specific messages at the warning, caution, note, and comment levels and can change the default message severity to an error or a warning level. The severity of error-level messages with this option cannot be suppressed or altered.

To suppress messages, specify one or more integer numbers that correspond to the Cray Fortran compiler messages to suppress. To specify more than one message number, specify a comma (but no spaces) between the message numbers. For example, -M 110,300 suppresses messages 110 and 300.

To change a message's severity to an error level or a warning level, specify an E (for error) or a W (for warning) and then the number of the message. For example, consider the following option: -M 300,E600,W400. This specification results in the following messages:
  • Message 300 is disabled and is not issued, provided that it is not an error-level message by default. Error-level messages cannot be suppressed and cannot have their severity downgraded.
  • Message 600 is issued as an error-level message, regardless of its default severity.
  • Message 400 is issued as a warning-level message, provided that it is not an error-level message by default.

-O [no]msgs

Default: -O nomsgs

The -O msgs option causes the compiler to write optimization messages to stderr.

Similar information in a more-readable format can be obtained by using the -rm option instead. Specifying the -rm option enables -O msgs. For more information, see -h list=list_opt, -rlist_opt.

-O [no]negmsgs

Default: -O nonegmsgs

The -O negmsgs option causes the compiler to generate messages to stderr that indicate why optimizations such as vectorization or inlining did not occur in a given instance.

The -O negmsgs option enables the -O msgs option. The -rm option enables the -O negmsgs option.

-h ignore_unknown_dirs

Suppresses generation of warning messages when the compiler encounters an unknown directive.

-h error_on_warning

Default: off

The -h error_on_warning option changes the message level of all warning messages to error. This option is off by default.