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.

Families

FamilyLanguageCommand
GNUCgcc
C++g++
Fortran 77/90gfortran
INTEL

Cicc
C++icpc
Fortran 77/90ifort
AMD AOCC

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

Basic flags

GNUINTELAMDNVIDIADescription
-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

GNUINTELAMDNVIDIADescription
-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-module dirSave/search for module files in directory dir (Fortran only).

Precision flags


GNUINTELAMDNVIDIADescription
-fdefault-integer-8-i8-fdefault-integer-8-i8Specifies the default size for integer variables to be 8 bytes.
-fdefault-real-8-r8-fdefault-real-8-r8Specifies the default size for real variables to be 8 bytes.
-fdefault-double-8-double-size 64-fdefault-double-8-r8Specifies the default size for double variables to be 8 bytes.

Debug flags

GNUINTELAMDNVIDIADescription
-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-check bounds-fcheck=bounds-MboundsAdd runtime array bounds checking for Fortran.
-Wuninitialized-check uninit-Wuninitialized-Check for uninitialized variables.
-ffpe-trap=zero,invalid,overflow-fpe-all=0-ffpe-trap=zero,invalid,overflow-Ktrap=fpTrap floating point exceptions:
  • divide by zero
  • invalid operands
  • floating point overflow
-fbacktrace-traceback-fbacktrace-Meh_frameAdd debug information for runtime traceback.
-fconvert=swap-convert big_endian-fconvert=swap-byteswapioSpecify the representation of data for unformatted files.
-ffree-line-length-132-extend-source 132-ffree-line-length-132-MextendAllow 132 characters source line lengths (in fixed format).