| 1 | <!--===- docs/RuntimeEnvironment.md |
| 2 | |
| 3 | Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | See https://llvm.org/LICENSE.txt for license information. |
| 5 | SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | |
| 7 | --> |
| 8 | |
| 9 | ```{contents} |
| 10 | --- |
| 11 | local: |
| 12 | --- |
| 13 | ``` |
| 14 | |
| 15 | # Environment variables of significance to Fortran execution |
| 16 | |
| 17 | A few environment variables are queried by the Fortran runtime support |
| 18 | library. |
| 19 | |
| 20 | The following environment variables can affect the behavior of |
| 21 | Fortran programs during execution. |
| 22 | |
| 23 | ## `DEFAULT_UTF8=1` |
| 24 | |
| 25 | Set `DEFAULT_UTF8` to cause formatted external input to assume UTF-8 |
| 26 | encoding on input and use UTF-8 encoding on formatted external output. |
| 27 | |
| 28 | ## `FORT_CONVERT` |
| 29 | |
| 30 | Determines data conversions applied to unformatted I/O. |
| 31 | |
| 32 | * `NATIVE`: no conversions (default) |
| 33 | * `LITTLE_ENDIAN`: assume input is little-endian; emit little-endian output |
| 34 | * `BIG_ENDIAN`: assume input is big-endian; emit big-endian output |
| 35 | * `SWAP`: reverse endianness (always convert) |
| 36 | |
| 37 | ## `FORT_CHECK_POINTER_DEALLOCATION` |
| 38 | |
| 39 | Fortran requires that a pointer that appears in a `DEALLOCATE` statement |
| 40 | must have been allocated in an `ALLOCATE` statement with the same declared |
| 41 | type. |
| 42 | The runtime support library validates this requirement by checking the |
| 43 | size of the allocated data, and will fail with an error message if |
| 44 | the deallocated pointer is not valid. |
| 45 | Set `FORT_CHECK_POINTER_DEALLOCATION=0` to disable this check. |
| 46 | |
| 47 | ## `FORT_FMT_RECL` |
| 48 | |
| 49 | Set to an integer value to specify the record length for list-directed |
| 50 | and `NAMELIST` output. |
| 51 | The default is 72. |
| 52 | |
| 53 | ## `NO_STOP_MESSAGE` |
| 54 | |
| 55 | Set `NO_STOP_MESSAGE=1` to disable the extra information about |
| 56 | IEEE floating-point exception flags that the Fortran language |
| 57 | standard requires for `STOP` and `ERROR STOP` statements. |