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