Compiler options common for different compilers or all PGI compilers are discussed in sub-sections Compilers and General usage of PGI compilers. The option -fastsse is generally recommended to be used to produce optimized code.
The following table lists some of the PGI Fortran specific compiler options:
| Option |
Description |
|---|---|
| -M {fixed | free} |
Fixed/free form source code, override file suffix rule |
| -Mpreprocess | Preprocess code, override file suffix rule |
| -Mrecursive | Allow recursive procedures |
| -i8 |
Treat INTEGER variables as 8 bytes |
| -r8 |
Interpret REAL variables as 8 bytes |
The file suffix rules relevant to PGI Fortran are given by the following table:
| Suffix |
How compiled |
|---|---|
| .f90, .f95 |
Fortran 90/95, free form |
| .F90, .F95 |
As above, and preprocessed |
| .f |
Fortran, fixed form |
| .F |
As above, and preprocessed |
| .hpf |
High Performance Fortran (HPF) |
| .s |
Assembly language |
| .o | Object file |
| .a | Library of object files |
By default, the compilers produce static binaries. The CNL OS does not support using shared object files, so you should always link everything statically on Louhi.
The Cray wrappers ftn or f77 should always be used for PGI Fortran on Louhi. See the sections Compilers and General usage of PGI compilers or man ftn and man f77 for a discussion of the Cray wrappers. For more detailed information on the PGI compiler options, see the man pages for pgf77 or pgf95. The PGI on-line documentation offers all manuals in pdf format.
For writing and compiling parallel codes on Louhi, see the sections Using MPI and Shared memory parallelization.