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. For all the details on each of the compilers, please check the relevant man pages.

Table of Contents

Families

FamilyLanguageCommand
GNUCgcc
C++g++
Fortran 77/90gfortran
PGICpgccC++pgCCFortran 77pgf77
Fortran 90pgf90
INTEL

Cicc
 
C++icpc
 
Fortran 77/90ifort
CRAY

Ccraycc (through cc)
 
C++crayCC (through CC)
 
Fortran 77/90crayftn (through ftn)
AMD AOCC

Cclang
C++clang++
Fortranflang
PGICpgcc
C++pgCC
Fortran 77pgf77
Fortran 90pgf90

Basic flags

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

Preprocessor flags

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

Precision flags

...


GNU
PGI
INTELCRAYAMDPGIDescription
-fdefault-integer-8-i8-
i8
s integer64-fdefault-integer-8-
s integer64
i8Specifies the default size for integer variables to be 8 bytes.
-fdefault-real-8-r8-
r8
s real64-fdefault-real-8-
s real64
r8Specifies the default size for real variables to be 8 bytes.
-fdefault-double-8
-r8
-double-size 64-s real64-fdefault-double-8-r8Specifies the default size for double variables to be 8 bytes.

Debug flags

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