<< >> Title Contents Index Home Help

B Driver Customization

The Portland Group compilation drivers, PGHPF, pgcc, pgf77, pgCC (HPF, C, Fortran 77, and C++) allow you to issue a single command that builds command lines to execute the various compilation tools using the correct options (including options for the compiler, the assembler and the linker). The environment variables provide information that the driver uses to locate executable files and other system files. The driver initialization file (PGIRC file) contains statements and configuration keywords that set various driver parameters; these parameters determine the defaults supplied to the driver, to the compiler or to other phases of the compilation sequence. Most users need not be concerned with customizing the driver, since the initialization file supplied with each system should serve their needs.


A PGIRC file is required for the driver to operate correctly. If you remove the PGIRC file supplied with your software and do not specify an alternate PGIRC file, you will receive an error message from the driver, for example using the PGHPF driver:

pghpf-error-Unable to open - /command-path/.pghpfrc

B.1 Environment Variable

The drivers use environment variables to locate support files and libraries as well as executable programs. If you install the PGI software in its default location, /usr/pgi, the environment variables do not need to be set as long as the directory containing the PGI executables is added to the PATH environment variable (in general, this is the directory /usr/pgi/arch/archbin where arch is a system -specific name for example SPARC or SGI). Otherwise the following variable needs to be set:

The root directory for the PGI products. For example, if your compilers were installed in /usr2/pgi, set PGI to this value.

B.1.1 Setting Environment Variables

The method for setting the PGI environment variables depends on your shell. Below are the commands for some common shells (note we use target as a generic name for any system, for example SPARC or SGI).

Bourne Shell or Korn Shell:

PGI=/usr2/pgi; export PGI
PATH=$PATH:$PGI/target/bin; export PATH

C Shell:

setenv PGI /usr2/pgi
setenv PATH $PATH:$PGI/target/bin

<< >> Title Contents Index Home Help