PGI - Compiling and Linking Fortran Programs

Pacman

The PGI Fortran 90 compiler is:

pgf90

The Fortran 90 compiler with MPI support is:

mpif90

NOTE: the PrgEnv-pgi module must be loaded to use this compiler.

Here's a sample compiler command showing several common options:

pacman% pgf90 -O3 -g -0 reduce reduce.f90

Fish

The PGI Fortran 90 compiler is

ftn

The Fortran 90 compiler with MPI support is also:

ftn

NOTE: the PrgEnv-pgi module must be loaded to use this compiler.

Here's a sample compiler command showing several common options:

fish1% ftn -O3 -g -0 reduce reduce.f90

Portland Group Fortran 90 Compiler Options

See "man pgf90" for additional information.

Option Description
-c Generate intermediate object file but does not attempt to link.
-g Adds information for debugging to the object file and/or executable.
-I<directory> Tells the preprocessor to search in directory for include or module files.
-L<directory> Tells the linker to search in directory for libraries.
-r8 Promotes REALs from the default size of 4 bytes to 8 bytes.
-i8 Promotes INTEGERs from the default size of 4 bytes to 8 bytes.
-O3 Higher level of optimization than -O2 (the default optimization level).
-fast Higher optimization level than -O3
-Mipa Tells the compiler to perform interprocedural analysis. Can be very time consuming toperform. This flag should also be used in both compilation and linking steps.
-Mconcur Enables autoparallelization. Additional options can be used with -Mconcur to provide morefine-grained control of autoparallelization, see man pgf90 for details.
-Minfo Instructs the compiler to report optimizations that are made.
-Mneginfo Instructs the compiler to report optimizations that are not made.
-mp Enables parallelization via OpenMP directives.

Many other compiler options are available. Please be familiar with the online PGI documentation.

Back to Top