NAG Fortran Compiler, Release 7.2: Runtime Environment Variables

Navigation: Previous Up Next

## 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
  abort_on_error | Signal abort on runtime error (default except on Windows).
  autoskip_namelist | Enable auto-skipping namelist input.
  blank_common_size=N | Set default size of blank `COMMON` blocks in Co-SMP mode.
  floating_exception_warnings | Display exception warnings on program termination (default).
  log_autoskip_namelist | Enable auto-skipping namelist input, with logging.
  no_abort_on_error | Non-zero exit on runtime error, without signalling abort.
  show_dangling | Enable tracing of dangling pointers (only with -C=dangling).
  suppress_floating_exception_warnings | Suppress all exception warnings on program termination.
  suppress_underflow_warning | Suppress floating underflow warning on program termination.
  underflow_warning | Display underflow warning on program termination.

  The abort_on_error option causes the `SIGABRT` signal to be raised on error termination, via the `abort()` function. This is the default except on Windows.

  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 floating_exception_warnings option enables display, on normal termination, of any IEEE floating exception flags that are set, except for `IEEE_INEXACT` (that flag is nearly always set). This is the default.

  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. The source code manipulating the dangling pointer needs to be compiled with the -C=dangling option for this to be effective. 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_floating_exception_warnings option suppresses the warnings, on program termination, if the floating-point division-by-zero, invalid-operation or overflow flags are set.

  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).