Generating Listing and Map Files

Compiler-generated assembler output listings and linker-generated map files can help you understand the effects of compiler optimizations and see how your application is laid out in memory. They may also help you interpret the information provided in a stack trace at the time of an error.

How to Generate Assembler Output

When compiling from the command line, specify the -S (Linux* and Mac OS*) or /asmattr option with one of its keyword (Windows*):

ifort -S file.f90 (Linux and Mac OS)
ifort file.f90 /asmattr:all (Windows)

On Linux and Mac OS systems, the resulting assembly file name has a .s suffix. On Windows systems, the resulting assembly file name has an .asm suffix.

Additionally, on Windows systems, you can use the Visual Studio integrated development environment:

  1. Select Project>Properties.
  2. Click the Fortran tab.
  3. In the Output Files category, change the Assembler Output settings according to your needs. You can choose from a number of options such as No Listing, Assembly-only Listing, and Assembly, Machine Code and Source.

How to Generate a Link Map (.map) File

When compiling from the command line, specify the -Xlinker and -M options (Linux and Mac OS) or the /map (Windows) option:

ifort file.f90 -Xlinker -M  (Linux and Mac OS)

ifort file.f90 /map (Windows)

Additionally, on Windows systems, you can use the Visual Studio integrated development environment:

  1. Select Project>Properties.

  2. Click the Linker tab.

  3. In the Debug category, select Generate Map File.