Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page contains information about the different compiler families available on the various Linux platforms at ECMWF and their different options.

Table of Contents

Families

FamilyLanguageCommand
GNUCgcc
C++g++
Fortran 77/90gfortran
PGICpgcc
C++pgCC
Fortran 77pgf77
Fortran 90pgf90
INTELCicc
 C++icpc
 Fortran 77/90ifort
CRAYCcraycc (through cc)
 C++crayCC (through CC)
 Fortran 77/90crayftn (through ftn)

Basic flags

GNUPGIINTELCRAYDescription
-c-c-c-cCompile or assemble the source files, but do not link.
-o filename-o filename-o filename-o filenameName the output file filename.
-On-On-On-OnSet the optimisation level to n.

Preprocessor flags

GNUPGIINTELCRAYDescription
-Dname-Dname-Dname-DnamePredefine name as a macro for the preprocessor.
-E-E-E-EPreprocessed source files including #line directives are output to stdout.
-I dir-I dir-I dir-I dirSpecifies an additional directory dir to search for include files.
-J dir-module-dir--Save/search for module files in directory dir (Fortran only).

Precision flags

 

GNUPGIINTELCRAYDescription
-fdefault-integer-8-i8-i8-s integer64Specifies the default size for integer variables to be 8 bytes.
-fdefault-real-8-r8-r8-s real64Specifies the default size for real variables to be 8 bytes.
-fdefault-double-8-r8-double-size 64-s real64Specifies the default size for double variables to be 8 bytes.

Debug flags

GNUPGIINTELCRAYDescription
-g-g-g-gProduces symbolic debug information.
-pg-pg-pg-pgGenerate extra code to write profile information suitable for the analysis program gprof.
-fcheck=bounds-Mbounds-check bounds-R bAdd runtime array bounds checking for Fortran.
-Wuninitialized--check uninit-Check for uninitialized variables.
-ffpe-trap=zero,invalid,overflow-Ktrap=fp-fpe-all=0-K trap=fpTrap floating point exceptions:
  • divide by zero
  • invalid operands
  • floating point overflow
-fbacktrace-Meh_frame-traceback-Add debug information for runtime traceback.
-fconvert=swap-byteswapio-convert big_endian-hbyteswapioSpecify the representation of data for unformatted files.
-ffree-line-length-132-Mextend-extend-source 132-N 132Allow 132 characters source line lengths (in fixed format).