Using Environment Modules on Linux
TMP
You can use
TMP
to specify the directory to use for placement of any temporary files created during execution of the PGI compilers and tools. This variable is interchangeable with
TMPDIR
.
TMPDIR
You can use
TMPDIR
to specify the directory to use for placement of any temporary files created during execution of the PGI compilers and tools.
Using Environment Modules on Linux
On Linux, if you use the Environment Modules package, that is, the module load
command, PGI includes a script to set up the appropriate module files.
Assuming your installation base directory is
/opt/pgi
, and your
MODULEPATH
environment variable is
/ usr/local/Modules/modulefiles
, execute this command:
% /opt/pgi/linux86/10.0-0/etc/modulefiles/pgi.module.install \
-all -install /usr/local/Modules/modulefiles
This command creates module files for all installed versions of the PGI compilers. You must have write permission to the modulefiles
directory to enable the module commands:
% module load pgi32/10.0
% module load pgi64/10.0
% module load pgi/10.0
where "pgi/10.0" uses the 32-bit compilers on a 32-bit system and uses 64-bit compilers on a 64-bit system.
To see what versions are available, use this command:
% module avail pgi
The module load
command sets or modifies the environment variables as indicated in the following table.
This Environment Variable... Is set or modified by the module load command to ...
CC
CPP
Full path to pgcc
Full path to pgCC
CXX
C++
FC
F77
F90
LD_LIBRARY_PATH
MANPATH
PATH
Path to pgCC
Path to pgCC
Full path to pgf95
Full path to pgf77
Full path to pgf90
Prepends the PGI library directory
Prepends the PGI man page directory
Prepends the PGI compiler and tools bin
directory
142
Chapter 10. Using Environment Variables
This Environment Variable... Is set or modified by the module load command to ...
PGI
The base installation directory
V
Full path to pgCC
Note
PGI does not provide support for the Environment Modules package. For more information about the package, go to: http://modules.sourceforge.net.
Stack Traceback and JIT Debugging
When a programming error results in a run-time error message or an application exception, a program will usually exit, perhaps with an error message. The PGI run-time library includes a mechanism to override this default action and instead print a stack traceback, start a debugger, or, on Linux, create a core file for postmortem debugging.
The stack traceback and just-in-time debugging functionality is controlled by an environment variable,
PGI_TERM
, described in “PGI_TERM,” on page 139
. The run-time libraries use the value of
PGI_TERM
to determine what action to take when a program abnormally terminates.
When the PGI runtime library detects an error or catches a signal, it calls the routine pgi_stop_here() prior to generating a stack traceback or starting the debugger. The pgi_stop_here()
routine is a convenient spot to set a breakpoint when debugging a program.
143
144