Fortran Compilation Options
Fortran is short for Formula Translation. It is designed for scientific and engineering problems or problems in business management that can be expressed in mathematical formulas, featuring strong numerical computing. The Fortran language was proposed in 1954 and was officially used in 1956. It is the main language used in numerical computing.
The Fortran language is a compiled language. The compilation and loading processes are similar to those of C and C++. Common Fortran compilers include GFortran of the GNU compiler, ifort of the Intel compiler, and pgif90 of the NVIDIA PGI compiler.
For Fortran code porting, the Intel ifort compiler is commonly used on the x86 platform. On the Kunpeng platform, the GNU GFortran compiler is used. Differences between common compilation options of ifort and GFortran lists the differences between the common compilation options of the two compilers.
Intel compiler |
GNU compiler |
Description |
|---|---|---|
Icc |
gcc |
C compiler |
ifort |
gfortran |
Fortran compiler |
mpiicc |
mpicc |
MPI C compiler |
mpiifort |
mpif90 |
MPI Fortran compiler |
-convert big_endian |
-fconvert=big-endian |
Forcible big-endian byte order |
-integer-size 64 |
-fdefault-integer-8 |
Int type size |
-real-size 64 |
-fdefault-real-8 |
Single-precision floating-point type size |
-double-size 64 |
-fdefault-double-8 |
Double-precision floating-point type size |
-fixed |
-ffixed-form |
The Fortran source code is in fixed format. |
-free |
-ffree-form |
The Fortran source code is in free format. |
-openmp |
-fopenmp |
OpenMP parallel programming |
-std90/95/03/08/none |
-std=f95/f2003/f2008/f2018/gnu/legacy |
Specifies the standard with which the Fortran compiler complies. The default value of GFortran is GNU of the latest standard. |
