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

map-opts, Qmap-opts

Maps one or more compiler options to their equivalent on a different operating system. This feature is only available for ifort.

Syntax

Linux:

-map-opts

macOS:

None

Windows:

/Qmap-opts

Arguments

None

Default

OFF

No platform mappings are performed.

Description

This option maps one or more compiler options to their equivalent on a different operating system. The result is output to stdout.

On Windows systems, the options you provide are presumed to be Windows options, so the options that are output to stdout will be Linux equivalents.

On Linux systems, the options you provide are presumed to be Linux options, so the options that are output to stdout will be Windows equivalents.

The option may also provide the following:

  • Option mapping information for options included in the compiler configuration file

  • Alternate forms of the options that are supported but may not be documented

The option mapping can be invoked from the compiler command line or it can be used directly.

No compilation is performed when option mapping is used.

This option is useful if you have both compilers and want to convert scripts or makefiles.

NOTE:

Compiler options are mapped to their equivalent on the architecture you are using.

IDE Equivalent

None

Alternate Options

None

Examples

The following command line maps the Linux options to Windows-based options, and then outputs the results to stdout:

ifort -map-opts -xP -O2

The following command line maps the Windows options to Linux-based options, and then outputs the results to stdout:

ifort /Qmap-opts /QxP /O2

The following shows what is displayed if you use this command line method to find the Linux equivalent for option /Oy-:

ifort /Qmap-opts /Oy-
Intel(R) Compiler option mapping tool
mapping Windows options to Linux for Fortran
'-Qmap-opts' Windows option maps to
  --> '-map-opts' option on Linux
  --> '-map_opts' option on Linux
'-Oy-' Windows option maps to
  --> '-fomit-frame-pointer-' option on Linux
  --> '-fno-omit-frame-pointer' option on Linux
  --> '-fp' option on Linux

You can also execute option mapping directly from a command line environment where the full path to the map_opts executable is known (compiler bin directory) by using the following syntax:

map_opts -t<target OS> -l<language> -opts <compiler option(s)>

where values for:

  • <target OS> = {l|linux|w|windows}

  • <language> = {f|fortran|c}

The following shows how to find the Linux equivalent for option /Oy-:

map_opts -tl -lf -opts /Oy-
Intel(R) Compiler option mapping tool
mapping Windows options to Linux for Fortran
'-Oy-' Windows option maps to
  --> '-fomit-frame-pointer-' option on Linux
  --> '-fno-omit-frame-pointer' option on Linux
  --> '-fp' option on Linux

The following shows how to find the Linux equivalent for option -fp:

map_opts -tw -lf -opts -fp
Intel(R) Compiler option mapping tool
mapping Linux options to Windows for Fortran
'-fp' Linux option maps to
  --> '-Oy-' option on Windows