====== PGI Compiler ======
The PGI Compilers are a set of commercial (or community) Fortran,C and C++ compilers from the Portland Group. To make use of them, first start an interactive GPU session and run one of the following module commands, depending on which version of the compilers you wish to use.
The main feuture of PGI compiler is that implement [[:openacc|OpenACC]] (Open Accelerator programming standard).
===== Installed version =====
*
$ module avail pgi
pgi/19.4
===== Compiling Applications =====
Load the compiler settings
$ module load pgi/19.4
Compiler C program
$ pgcc program.c -o program
Compile C++ program
$ pgc++ program.cpp -o program
Compile Fortran program
$ pgf90 program.f90 -o program
==== Compilers Options ====
^Option^Description^
|''-O0/-O1/-O2/-O3/-O4''|Specifies general optimization at four levels. (The default is 2.)|
|''-mp'' |Enables compiler recognition of OpenMP directives.|
|''-acc'' |Enables compiler recognition of OpenACC directives.|
|''-Mconcur''| Enables autothreading.|
|''-fast'' | Chooses generally optimal flags for the target platform.|
|''-Mipa=fast'' | Enables interprocedural optimization.|
|''-Minfo=accel''| Print optimization information|
====== Links ======
* https://www.pgroup.com/resources/docs.php