2.19 Runtime Environment Variables

The following variables control the runtime environment for programs compiled with the NAG Fortran Compiler.

NAGFORTRAN_MTRACE_FILE
Programs compiled using any -mtrace= option will write the memory trace to this file. The default is standard error.
NAGFORTRAN_MTRACE_OPTIONS
Changes the memory tracing options for programs compiled using any -mtrace= option.
NAGFORTRAN_NUM_IMAGES
Sets the number of images with which to execute a program in Co-SMP mode (it has no effect if the main program was compiled with -coarray=single). If the value of the variable is not an integer value, or is less than one or greater than 1000, it is ignored. In the absence of this variable, the number of images for a Co-SMP mode program is taken from the -num_images= option, or from the number of hardware threads.
NAGFORTRAN_RUNTIME_ERROR_FILE
Runtime error messages will be written to this file. The default is standard error.
NAGFORTRAN_RUNTIME_LANGUAGE
Controls the language used for runtime error messages. This may be ‘English’ or ‘Japanese’ (not case-sensitive); the default is English.
NAGFORTRAN_RUNTIME_OPTIONS
Controls runtime optional behaviour excluding memory tracing. This is a comma-separated list of options from the following list.

Option Effect
autoskip_namelist Enables auto-skipping namelist input.
blank_common_size=N Sets the default size of blank COMMON blocks when
executing in Co-SMP mode.
log_autoskip_namelist Enables auto-skipping namelist input, with logging.
show_dangling Enables tracing of dangling pointers; this only
affects code compiled with -C=dangling.
suppress_underflow_warning Do not produce the usual warning on program termination
when the floating-point underflow flag is set.
underflow_warning Do produce the usual warning on program termination
when the floating-point underflow flag is set.

The autoskip_namelist option enables autoskipping namelist input. In this mode, when the name after the ampersand in the input record does not match the namelist group name in the READ statement, instead of raising an i/o error condition it skips records until it finds one that begins with an ampersand and the correct name.

The blank_common_size=N option sets the default size of blank COMMON blocks to N bytes when executing in Co-SMP mode with multiple images; it has no effect otherwise. If not specified, the default size is one mebibyte (1048576 bytes). This option is only needed if blank COMMON blocks in different program units have different sizes, and the largest one is not encountered first.

The log_autoskip_namelist option enables autoskipping namelist input (as above), with logging. In this mode, when an autoskip occurs, the location of the READ statement and the action being taken are logged to standard error, for example:

       [example.f90, line 5: Looking for namelist group NAME, skipping WRONG]

The show_dangling option causes messages to be produced on the runtime error file when a dangling pointer is created, reassociated with something else, nullified, or ceases to exist. For example,

[a.f90, line 20: Dangling pointer P detected (number 1), associated at b.f90, line 18]
[c.f90, line 7: Dangling pointer P (number 1) has been reassociated]
[c.f90, line 9: Dangling pointer Q (number 2) has been nullified]
[file.f90, line 21: Dangling pointer R (number 3) no longer exists]
The dangling pointer number is incremented every time a dangling pointer is detected. If an array with dangling pointer components ceases to exist, a message will be produced for each dangling pointer component of each element; however, the element subscripts will not be shown, instead ‘(...)’ will be produced to indicate that it is an array element, e.g.
[file.f90, line 44: Dangling pointer X(...)%A (number 8) no longer exists]

The suppress_underflow_warning runtime option has the same effect as the -no_underflow_warning compilation option; that is, it suppresses the usual warning message on program termination when the floating-point underflow flag is set.

The underflow_warning runtime option requests that if the floating-point underflow flag is set on program termination, a warning message should be produced. This is the default behaviour, but the runtime option will override the -no_underflow_warning compilation option.

TMPDIR
Controls the directory used for scratch files (the default is system-dependent).