Object code that the XL Fortran compiler produces often invokes compiler-supplied subprograms at run time to handle certain complex tasks. These subprograms are collected into several libraries.
The function of the XL Fortran Runtime Environment may be divided into these main categories:
- Support for Fortran I/O operations
- Mathematical calculation
- Operating-system services
- Support for SMP parallelization
The XL Fortran Runtime Environment also produces runtime diagnostic messages in the national language appropriate for your system.
Unless you bind statically, you cannot run object code produced by the XL Fortran compiler without the XL Fortran Runtime Environment. However, static binding is discouraged because it could cause problems when running applications on operating systems that require newer XL Fortran libraries than the one that was statically bound. The compiler defaults to dynamic binding, which is the most flexible solution for running your applications on multiple operating system levels.
The XL Fortran Runtime Environment is upward-compatible. Programs that are compiled and linked with a given level of the runtime environment and a given level of the operating system require the same or higher levels of both the runtime environment and the operating system to run.
Runtime subprograms are collected into libraries. By default, the compiler invocation command also invokes the linker and gives it the names of the libraries that contain runtime subprograms called by Fortran object code.
The names of these runtime subprograms are external symbols. When object code that is produced by the XL Fortran compiler calls a runtime subprogram, the .o object code file contains an external symbol reference to the name of the subprogram. A library contains an external symbol definition for the subprogram. The linker resolves the runtime subprogram call with the subprogram definition.
You should avoid using names in your XL Fortran program that conflict with names of runtime subprograms. Conflict can arise under two conditions:
- The name of a subroutine, function, or common block that is defined in a Fortran program has the same name as a library subprogram.
- The Fortran program calls a subroutine or function with the same name as a library subprogram but does not supply a definition for the called subroutine or function.
To minimize naming conflicts between user-defined names and the names that are defined in the runtime libraries, the names of input/output routines in the runtime libraries are prefixed with an underscore(_), or _xl.