Gfortran4

From Vd

Jump to: navigation, search

GNU fortran compiler

GNU fortran web page. An introduction is found at usage

Compiler flags

Gfortran accept the (mostly) same flag as gcc. The most common compiler flags are :

  • -c just compile, do not attempt linking
  • -O2 Turn on extensive optimization. This is the default.
  • -O3 Even more otimization
  • -fomit-frame-pointer Some performance improvement, but makes debugging harder
  • -funroll-loops Unroll loops, may yield performance improvement
  • -mmmx, -msse, -msse2, -msse3 or -m3dnow Instruct the compiler to use multimedia instructions
  • -mtune=opteron tune for the AMD opteron processor
  • -ffast-math may improve performance, use with care.


The GNU fortran compilers add a single underscore "_" to symbols. The nm utility can be used to list the symbols in an object file.

[olews@login-0-0 f77]$ nm realft.o
                 U four1_
0000000000000000 T realft_
                 U sin
[olews@login-0-0 f77]$
Views
Personal tools