You are here: Home Resources Software Installed Software Compilers and Languages PGI

PGI

The Portland Group (PGI) compiler suite includes Fortran 90/95, Fortran 77, C and C++ compilers.

To use the PGI compiler the appropriate module file needs to be loaded. PGI is available on Ekman, Ferlin, Lindgren.

Ekman, Ferlin and Povel

To access the portland compilers on Ekman, Ferlin and Povel you should use

module add pgi

this will load the default portland group compiler version. To see which versions of the compiler are available then use

module avail pgi

To use the various compilers you should use the following commands

  • Fortran programs: pgf90
  • C programs: pgcc
  • C++ programs: pgCC

More information on the commands and the flags used can be found on the various man pages e.g. by typing

man pgCC 

Lindgren

In order to use the Portand group compilers on Lindgren, it is necessary to have the PrgEnv-pgi loaded. When that module is loaded the cc, CC and ftn scripts will automatically use the intel compiler.

When you log into Lindgren  PrgEnv-pgi is the default. 

When you first load the Intel PrgEnv the default  compiler will be active. To see which versions of the the Portland compiler are available use

module avail pgi

To use a different version of the intel compiler you can use for example

module swap pgi/11.5.0 pgi/10.9.0

To check the version of PGI compiler, simply type:

cc -V

 As stated in the lindgren compiling section the cc, CC and ftn scripts automatically link the different librarys depending on which modules are loaded. FFTW version 2 is a bit more complicted however.

The available drivers (also for linking of MPI applications) are:

  • Fortran programs: ftn
  • C programs: cc
  • C++ programs: CC
Example:
cc -o myprog myprog.c
ftn -o myprog myprog.f

For more information on the various compiler flags you read the various man pages e.g.

man pgf90
man pgcc

 

More about PGI compilers

More about modules