PGI Compilers

From ScorecWiki

Jump to: navigation, search

Basic Usage

Setup your environment to use the PGI compilers with the command:

 source /usr/local/pgi/latest/env.sh

To use the PGI MPI compiler wrappers set one more environment variable:

 export PATH=/usr/local/pgi/latest/linux86-64/12.3/mpi/mpich/bin:$PATH

To run an executable using mpi on N processes on a workstation use the following command:

 mpirun -np N -machinefile machinefile.txt /PATH/TO/YOUR/EXECUTABLE [arguments for executable]
 

To run an executable using mpi on N processes on a workstation within Totalview use the following command:

 mpirun -np N -machinefile machinefile.txt -dbg=totalview /PATH/TO/YOUR/EXECUTABLE [arguments for executable]

machinefile.txt is an ascii file with the format <machine name>:<number of processes>. For example a machine file for avatar will contain:

 avatar:16

Linking Problems

Linking executables with dependencies on third party libraries that were not compiled with PGI (like Simmetrix) can result in many undefined references. There is no known simple fix. It is recommended that you compile and link your code with the same compiler the dependencies used.

Documentation

Reference manuals are here: https://www.pgroup.com/resources/docs.htm

Personal tools