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
PGI
INTEL

C
pgcc
icc
C++
pgCC
icpc
Fortran 77
pgf77Fortran
/90
pgf90
ifort
INTEL
AMD AOCC

C
icc  
clang
C++
icpc
clang++
Fortran
77/90
ifort
flang
CRAY 
NVIDIAC
craycc (through cc)
pgcc
C++
crayCC (through CC) Fortran 77/90crayftn (through ftn)
pgCC
Fortran 77pgf77
Fortran 90pgf90

Basic flags

GNU
PGI
INTEL
INTEL
AMD
CRAY
NVIDIADescription
-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

GNU
PGI
INTEL
INTEL
AMD
CRAY
NVIDIADescription
-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

 


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

Debug flags

GNU
PGI
INTEL
INTEL
AMD
CRAY
NVIDIADescription
-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-
check
fcheck=bounds-
R b
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-ffpe-
K trap
trap=zero,invalid,overflow-Ktrap=fpTrap floating point exceptions:
  • divide by zero
  • invalid operands
  • floating point overflow
-fbacktrace-
Meh_frame
traceback-
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).