The Intel® Fortran run-time system recognizes a number of environment variables. These variables can be used to customize run-time diagnostic error reporting, allow program continuation under certain conditions, disable the display of certain dialog boxes under certain conditions, and allow just-in-time debugging. For a list of run-time environment variables used by OpenMP*, see OpenMP Environment Variables in Optimizing Applications.
For information on setting compile time environment variables, see Setting Compile-Time Environment Variables.
The run-time environment variables are:
decfort_dump_flag
If this variable is set to Y or y, a core dump will be taken when any
severe Intel Fortran run-time error occurs.
F_UFMTENDIAN
This variable specifies the numbers of the units to be used for little-endian-to-big-endian
conversion purposes. See Environment Variable
F_UFMTENDIAN Method.
FOR_ACCEPT
The ACCEPT statement does not include an explicit logical unit number.
Instead, it uses an implicit internal logical unit number and the FOR_ACCEPT environment variable. If FOR_ACCEPT
is not defined, the code ACCEPT
f,iolist
reads from CONIN$
(standard input). If FOR_ACCEPT is defined (as
a file name optionally containing a path), the specified file would be
read.
FOR_DEBUGGER_IS_PRESENT
This variable tells the Fortran run-time library that your program
is executing under a debugger. If set to True, it generates debug exceptions
whenever severe or continuous errors are detected. Under normal conditions
you don't need to set this variable on Windows systems, as this information
can be extracted from the operating system. On Linux* and Mac OS* systems,
you will need to set this variable if you want debug exceptions. Setting
this variable to True when your program is not executing under a debugger will cause unpredictable behavior.
FOR_DEFAULT_PRINT_DEVICE (Windows*
only)
This variable lets you specify the print device other than the default
print device PRN (LPT1) for files closed (CLOSE
statement) with the DISPOSE='PRINT' specifier. To specify a different
print device for the file associated with the CLOSE
statement DISPOSE='PRINT' specifier, set FOR_DEFAULT_PRINT_DEVICE
to any legal DOS print device before executing the program.
FOR_DIAGNOSTIC_LOG_FILE
If this variable is set to the name of a file, diagnostic output is
written to the specified file.
The Fortran run-time system attempts to open that file (append output)
and write the error information (ASCII text) to the file.
The setting of FOR_DIAGNOSTIC_LOG_FILE is independent
of FOR_DISABLE_DIAGNOSTIC_DISPLAY, so you can
disable the screen display of information but still capture the error
information in a file. The text string you assign for the file name is
used literally, so you must specify the full name. If the file open fails,
no error is reported and the run-time system continues diagnostic processing.
See also Locating Run-Time
Errors.
FOR_DISABLE_DIAGNOSTIC_DISPLAY
This variable disables the display of all error information. This variable
is helpful
if you just want to test the error status of your program and do not want
the Fortran run-time system to display any information about an abnormal
program termination.
FOR_DISABLE_STACK_TRACE
This variable disables the call stack trace information that follows
the displayed severe error message text.
The Fortran run-time error message is displayed whether or not FOR_DISABLE_STACK_TRACE is set to true. If
the program is executing under a debugger, the automatic output of the
stack trace information by the Fortran library will be disabled to reduce
noise. You should use the debugger's stack trace facility if you want
to view the stack trace.
See also Locating Run-Time
Errors.
FOR_IGNORE_EXCEPTIONS
This variable disables the default run-time exception handling, for
example, to allow just-in-time debugging. The run-time system exception
handler returns EXCEPTION_CONTINUE_SEARCH to the operating system, which
looks for other handlers to service the exception.
FOR_NOERROR_DIALOGS
This variable disables the display of dialog boxes when certain exceptions
or errors occur. This is useful when running many test programs in batch
mode to prevent a failure from stopping execution of the entire test stream.
FOR_PRINT
Neither the PRINT statement nor
a WRITE statement with an asterisk
(*) in place of a unit number includes an explicit logical unit number.
Instead, both use an implicit internal logical unit number and the FOR_PRINT environment
variable. If FOR_PRINT is not
defined, the code PRINT f,iolist
or WRITE (*,f) iolist
writes to CONOUT$ (standard output). If FOR_PRINT
is defined (as a file name optionally containing a path), the specified
file would be written to.
FOR_READ
A READ statement that uses an asterisk (*) in place of a unit number
does not include an explicit logical unit number. Instead, it uses an
implicit internal logical unit number and the FOR_READ
environment variable. If FOR_READ is not
defined, the code READ (*,f) iolist
or READ f,iolist
reads from CONIN$ (standard input). If FOR_READ
is defined (as a file name optionally containing a path), the specified
file would be read.
FOR_TYPE
The TYPE statement does not include an explicit logical unit number.
Instead, it uses an implicit internal logical unit number and the FOR_TYPE environment variable. If FOR_TYPE
is not defined, the code TYPE f,iolist
writes to CONOUT$ (standard output). If FOR_TYPE is defined (as a file name optionally containing
a path), the specified file would be written to.
FORT_BUFFERED
Lets you request that buffered I/O should be used at run time for output
of all Fortran I/O units, except those with output to the terminal. This
provides a run-time mechanism to support the -assume
buffered_io (Linux*) or /assume:buffered_io (Windows*) compiler option.
FORT_CONVERTn
Lets you specify the data format for an unformatted file associated
with a particular unit number (n), as described in Methods
of Specifying the Data Format.
FORT_CONVERT.ext
and FORT_CONVERT_ext
Lets you specify the data format for unformatted files with a particular
file extension suffix (ext), as described in Methods
of Specifying the Data Format.
FORT_FMT_RECL
Lets you specify the default record length (normally 132 bytes) for
formatted files.
FORT_UFMT_RECL
Lets you specify the default record length (normally 2040 bytes) for
unformatted files.
FORTn
Lets you specify the file name for a particular unit number (n), when a file name is not specified in the
OPEN statement or an implicit OPEN
is used, and the compiler option -fpscomp
filesfromcmd (Linux) or /fpscomp:filesfromcmd
(Windows) was not specified. Preconnected files attached to units 0, 5,
and 6 are by default associated with system standard I/O files.
NLSPATH
(Linux* and Mac OS* only)
The path for the Intel Fortran run-time error message catalog.
TBK_ENABLE_VERBOSE_STACK_TRACE
This variable displays more detailed call stack information in the
event of an error.
The default brief output is usually sufficient to determine where an
error occurred. Brief output includes up to twenty stack frames, reported
one line per stack frame. For each frame, the image name containing the
PC, routine name, line number, and source file are given.
The verbose output, if selected, will provide (in addition to the information
in brief output) the exception context record if the error was a machine
exception (machine register dump), and for each frame, the return address,
frame pointer and stack pointer and possible parameters to the routine.
This output can be quite long (but limited to 16K bytes) and use of the
environment variable FOR_DIAGNOSTIC_LOG_FILE is
recommended if you want to capture the output accurately. Most situations
should not require the use of verbose output.
The variable FOR_ENABLE_VERBOSE_STACK_TRACE
is also recognized for compatibility with Compaq* Visual Fortran.
TBK_FULL_SRC_FILE_SPEC
By default, the traceback output displays only the file name and extension
in the source file field. To display complete file name information including
the path, set the environment variable TBK_FULL_SRC_FILE_SPEC
to true.
The variable FOR_FULL_SRC_FILE_SPEC is also
recognized for compatibility with Compaq* Visual Fortran.
TMP,
TMPDIR, and TEMP
Specifies an alternate working directory where temporary files are
created. See Temporary Files Created by
the Compiler or Linker.
You can set a run-time environment variable from within a program by calling the SETENVQQ routine. For example:
program ENVVAR
use ifport
LOGICAL(4) res
! Add other data declarations here
! call SETENVQQ as a function
res=SETENVQQ("FOR_IGNORE_EXCEPTIONS=T")