PGI Compiler Support

The PGI Server Compilers and tools are for x86-32 32-bit (IA32) and 64-bit (Opteron) processor-based (and compatible) servers running the Linux86 operating systems. PGI Server includes multi-user network floating licenses for all of the PGI compilers which include the Portland Group's native parallelizing/optimizing FORTRAN 77, Fortran 90, HPF, OpenMP C++ and ANSI C compilers for Intel Pentium II/III/4 and AMD Athlon/AthlonXP workstations. Additional tools included are the PGDBG OpenMP Linux graphical debugger and the PGPROF graphical OpenMP Linux performance profiler.

Availability | Getting Started | Getting Help | Frequent Questions

---

PGI Compiler Availability

The University has 10 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.

Upgrade Announcement
Announcement concerning the most recent upgrade of the PGI compilers.

return to top

---

Getting Started with the PGI Compilers on Linux
Using the PGI compilers on the ITC Linux clusters

Installing the PGI Compilers Locally

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).

  1. To initalize your environment to use the PGI compilers, use the command,

        module add pgi
    
  2. 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 C or C++, use
        pgCC [options] filename.c
    
    A list of compiler options can be obtained by invoking the compiler with the -help option, e.g.
     
        pgf90  -help 
    

return to top

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 from the Licensing Database. 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.

The installation of the PGI compilers then goes as follows:

  1. After loading the CDROM into your machine's drive, run the following command to install the compilers:
        /mnt/cdrom/install
    

  2. After accepting the license agreement, select the 'PGI Workstation and PGI Server' installation. When the install 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.

  3. To make the compiler accessible, add the following lines to your .profile, assuming you run bash, sh or ksh:

            $ PGI=/opt/pgi
            $ export PGI
            $ PATH=$PGI/linux86/< 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
    
    where you must substitute the correct version number for < version > in the lines above.

    If you are the administrator of the machine and it is based on Red Hat, you may make the lines into a script pgi.sh and add it to the /etc/profile.d directory so that the path will be automatically set for all users of the system. 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
    
    Similarly, the administrator can base a script pgi.csh upon these commands, using the appropriate version number in place of < version >, and install it into /etc/profile.d.
  4. You can verify the release number of the products you have installed using the -V options on any of the compiler commands. This will also show you the sequence of steps the compiler will use to compile and link programs for execution on your system.

    • For Fortran 77, use "pgf77 -V x.f"
    • For Fortran 90, use "pgf90 -V x.f"
    • For HPF, use "pghpf -V x.f"
    • For C++, use "pgCC -V x.c"
    • For ANSI C, use "pgcc -V x.c"

    Note that the files x.f or x.c need not exist in order for you to successfully execute these commands.

    Additional installation information can be found on the vendor website at PGI Workstation and Server Release and Installation Notes


return to top

---

Getting Help with the PGI Compilers

PGI Compiler Documentation

Some older hardcopy manuals for the PGI Compilers are available for reference in the Research Computing Support Center in Wilson Hall, room 244.

If users cannot find the answers to their questions in the online documentation, they can email their questions to ITC Research Computing Support.

return to top

---

Frequent Questions about the PGI Compilers

PGI Support FAQ
Portland Group's Frequently Asked Questions archive.

return to top

---

© 2008 by the Rector and Visitors of the University of Virginia.

The information contained on the University of Virginia’s Department of Information Technology and Communication (ITC) website is provided as a public service with the understanding that ITC makes no representations or warranties, either expressed or implied, concerning the accuracy, completeness, reliability or suitability of the information, including warrantees of title, non-infringement of copyright or patent rights of others. These pages are expected to represent the University of Virginia community and the State of Virginia in a professional manner in accordance with the University of Virginia’s Computing Policies.