PGI Compiler Support
The PGI Server Compilers and tools are for x86-32 32-bit (IA32) and x86-64-bit (Opteron,EMT) processor-based (and compatible) servers running the Linux operating systems. ITC maintains a multi-user network floating license for all of the PGI compilers, which include the Portland Group’s native parallelizing/optimizing Fortran 77, Fortran 95, C, and C++ compilers. Additional tools included are the PGDBG OpenMP Linux graphical debugger and the PGPROF graphical performance profiler.
PGI Compiler Availability
The University has floating network licenses for the PGI compilers on the Linux platform. In order to use these licenses, the computer must be connected to the University network to enable it to communicate with the network license manager.
Using the PGI compilers on the ITC Linux Clusters
The PGI compilers are accessed on the ITC Linux clusters by using the modules software to dynamically set the appropriate environmental variables (e.g. PATH and LD_LIBRARY_PATH).
To initalize your environment to use the PGI compilers, use the command,
module add pgi
After you have modified your environment to access the PGI compilers, you can invoke the compiler on a source code file in the following ways.
For Fortran 77 or Fortran 90, use
pgf90 [options] filename.f
for fixed-form source, or
pgf90 [options] filename.f90
for free-form source.
For C use
pgcc [options] filename.c
For C++ use
pgCC [options] filename.cpp
or
pgCC [options] filename.cxx
A list of compiler options can be obtained by invoking the compiler with the -help option, e.g.
pgf90 -help
More information is available from the manpage, e.g.
man pgf90
The PGI Debugger
PGI provides a very capable debugger, pgdbg. In its default mode, it is graphical, and it requires that an X server run on the user’s local desktop machine. It may be run in command-line mode with the -text option; see the manpage for a full list of options. As with all debuggers, the user’s program must be compiled with the -g flag in order to enable debugging.
If you wish to use the graphical debugger and do not have or want to install an X11 server, you can also use NX. Another option for a graphical debugger is Totalview.
Installing the PGI Compilers Locally
The PGI compiler can be downloaded from the Portland Group’s Web site. A free 14-day trial license is included with the download; this can be used to install the software. Once the user confirms that the software works, a full University license can be obtained by emailing uvacse@virginia.edu. Please note that use of PGI from off-grounds locations requires either the UVa Anywhere VPN client (Windows and Mac OSX) or ssh tunneling (all platforms). This is not necessary for on-grounds installations.
Installation is simple; after untarring the tarfile into a temporary directory, execute (as root) the install script. When the script prompts you to create an evaluation license, answer ‘y’ for yes. We also suggest you make the files in the PGI installation read-only.
Once the compiler is installed, the system administrator of the machine on which the software is installed must change the license.dat file. Note that the license file is normally located at the top-level directory of the PGI installation, e.g. /opt/pgi. Delete the old evaluation license and replace it with the license.dat obtained from the Licensing Database. Note that this license file is abbreviated; this precludes the need to update the license file on your local installation every time ITC changes the master file due to a new version or to the yearly renewal. Note also that the master license must support the version you have installed, so if you install a newer version than our master license permits, you will not be able to use the compiler. If this occurs, you will need to notify Research Computing Support (res-consult@virginia.edu); there will then be a short delay while we obtain and install a new license.
To make the compiler accessible, add the following lines to your .profile, assuming you run bash or ksh:
$ PGI=/opt/pgi
$ export PGI
$ PATH=$PGI/linux86<-64>/< version >/bin:$PATH
$ export PATH
$ MANPATH=$MANPATH:$PGI/man
$ export MANPATH
$ LM_LICENSE_FILE=$LM_LICENSE_FILE:$PGI/license.dat
$ export LM_LICENSE_FILE
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PGI/linux86/lib
$ export LD_LIBRARY_PATH
On most Linux systems, the system administrator can copy the pgi.sh and pgi.csh startup scripts provided with the compiler to /etc/profile.d, in which case it is not necessary for users to change their personal startup scripts.
Users of csh or tcsh should use the commands
% setenv PGI /opt/pgi
% set path = ( $PGI/linux86/< version >/bin $path )
% setenv MANPATH "$MANPATH":$PGI/man
% setenv LM_LICENSE_FILE "$LM_LICENSE_FILE":$PGI/license.dat
% setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH":$PGI/linux86/lib
On most Linux systems, the system administrator can copy the pgi.sh and pgi.csh startup scripts provided with the compiler to /etc/profile.d, in which case it is not necessary for users to change their personal startup scripts.
Additional installation information can be found on the vendor website at PGI Workstation and Server Release and Installation Notes
Documentation
The Portland Group has online documentation at their support page. The debugger and profiler are described in the PGI Tools Guide.
If users cannot find the answers to their questions in the online documentation, they can email their questions to UVACSE.
Frequently-Asked Questions about the PGI Compilers
PGI Support FAQ
Portland Group’s Frequently Asked Questions archive.
