The Fortran Run-Time library checks certain environment variables that you can use to customize run-time diagnostic error reporting:
If set to the name of a file, writes diagnostic output 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.
If set to true, disables the display of all error information. This might be 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.
If set to true, disables the display of call stack 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 set to true, more detailed call stack information is displayed 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, 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.
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 FOR_FULL_SRC_FILE_SPEC to true.