HP Fortran Programmer's Guide (September 2007)

Compiling and linking
Using environment variables
Chapter 294
Using environment variables
Environment variables are variables that are defined in the operating environment of the
system and are available to various system components. For example, when you run a
program, the shell looks at the PATH variable to determine where the program is located.
Table 2-14 lists and briefly describes the environment variables that control the way
HP Fortran programs are compiled, linked, and run.
The following sections describe how to use the HP_F90_OPTS, LPATH, and
MP_NUMBER_OF_THREADS environment variables. See the environ(5) man page for information
about system-level environment variables.
HP_F90OPTS environment variable
The HP_F90OPTS environment variable is read by the f90 driver for options to insert in the
command line. This variable is useful when you want the same options and arguments each
time you invoke the f90 command. For example, if HP_F90OPTS is set to the -v option, the
following command line:
$ f90 +list hello.f90
is equivalent to:
Table 2-14 HP Fortran environment variables
Environment variable Description
HP_F90OPTS Specifies a list of command-line options that f90 inserts in
the command line that invokes the HP Fortran compiler.
LPATH Specifies a list of directories that the linker is to search for
libraries.
MP_NUMBER_OF_THREADS Specifies the desired number of processors to be used to run
HP Fortran programs that have been compiled for parallel
execution.
TMPDIR Specifies a directory for temporary files; used in place of the
default directory /var/tmp.
TTYUNBUF Controls tty buffering. To enable tty buffering, set
TTYUNBUF to 0; to disable tty buffering, set it to a nonzero
value.