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
Family | Language | Command |
---|
GNU | C | gcc |
---|
C++ | g++ |
Fortran 77/90 | gfortran |
INTEL
| C | icc |
---|
C++ | icpc |
Fortran 77/90 | ifort |
AMD AOCC
| C | clang |
---|
C++ | clang++ |
Fortran | flang |
NVIDIA | C | pgcc |
---|
C++ | pgCC |
Fortran 77 | pgf77 |
Fortran 90 | pgf90 |
Basic flags
GNU | INTEL | AMD | NVIDIA | Description |
---|
-c | -c | -c | -c | Compile or assemble the source files, but do not link. |
-o filename | -o filename | -o filename | -o filename | Name the output file filename. |
-On | -On | -On | -On | Set the optimisation level to n. |
Preprocessor flags
GNU | INTEL | AMD | NVIDIA | Description |
---|
-Dname | -Dname | -Dname | -Dname | Predefine name as a macro for the preprocessor. |
-E | -E | -E | -E | Preprocessed source files including #line directives are output to stdout. |
-I dir | -I dir | -I dir | -I dir | Specifies an additional directory dir to search for include files. |
-J dir | - | -module-dir | -module dir | Save/search for module files in directory dir (Fortran only). |
Precision flags
GNU | INTEL | AMD | NVIDIA | Description |
---|
-fdefault-integer-8 | -i8 | -fdefault-integer-8 | -i8 | Specifies the default size for integer variables to be 8 bytes. |
-fdefault-real-8 | -r8 | -fdefault-real-8 | -r8 | Specifies the default size for real variables to be 8 bytes. |
-fdefault-double-8 | -double-size 64 | -fdefault-double-8 | -r8 | Specifies the default size for double variables to be 8 bytes. |
Debug flags
GNU | INTEL | AMD | NVIDIA | Description |
---|
-g | -g | -g | -g | Produces symbolic debug information. |
-pg | -pg | -pg | -pg | Generate extra code to write profile information suitable for the analysis program gprof. |
-fcheck=bounds | -check bounds | -fcheck=bounds | -Mbounds | Add 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=fp | Trap floating point exceptions:- divide by zero
- invalid operands
- floating point overflow
|
-fbacktrace | -traceback | -fbacktrace | -Meh_frame | Add debug information for runtime traceback. |
-fconvert=swap | -convert big_endian | -fconvert=swap | -byteswapio | Specify the representation of data for unformatted files. |
-ffree-line-length-132 | -extend-source 132 | -ffree-line-length-132 | -Mextend | Allow 132 characters source line lengths (in fixed format). |