Navigation: Previous   Up   Next

2.18 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_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
show_dangling Enable tracing of dangling pointers; this only
affects code compiled with -C=dangling

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]
TMPDIR
Controls the directory used for scratch files (the default is system-dependent).