Previous | Contents | Index |
If you omit /OPTIMIZE=TUNE=xxxx, HOST is used if /FAST is specified; otherwise, GENERIC is used.
HP Fortran unrolls loops at /OPTIMIZE=LEVEL=3 or higher. When timings using LEVEL=5 show that performance has not improved, consider specifying UNROLL=1 with LEVEL=5, such as the following:
$ FORTRAN /OPTIMIZE=(LEVEL=5,UNROLL=1) M_APP.F90+SUB.F90/NOLIST |
Controls how the compiler treats fixed-form file source lines that are shorter than the statement field width (72 characters, or 132 characters if /EXTEND_SOURCE is in effect.) This determines how the compiler treats character and Hollerith constants that are continued across two or more source lines. This qualifier does not apply to free-form source files.
Specifying /PAD_SOURCE causes the compiler to treat short source lines as if they were padded with blanks out to the statement field width. This may be useful when compiling programs developed for non-HP compilers that assume that short source lines are blank-padded.
The default, /NOPAD_SOURCE, is compatible with current and previous HP Fortran compilers, which causes the compiler to not treat short source lines as padded with blanks so that the first character of a continuation line immediately follows the last character of the previous line.
If /NOPAD_SOURCE is in effect, the compiler issues an informational message if it detects a continued constant that might be affected by blank padding.
On /WARNINGS=USAGE qualifier, see Section 2.3.51.
2.3.37 /REAL_SIZE --- Floating-Point Data Size
The /REAL_SIZE qualifier controls how the compiler interprets floating-point declarations that do not have a specified length.
The qualifier has the following form:
/REAL_SIZE=
|
32
Defines REAL declarations, constants, functions, and intrinsics as REAL (KIND=4) (single precision) and COMPLEX declarations, constants, functions, and intrinsics as COMPLEX (KIND=4) (single complex).64
Defines REAL and COMPLEX declarations, constants, functions, and intrinsics as REAL (KIND=8) (double precision) and COMPLEX declarations, constants, functions, and intrinsics as COMPLEX (KIND=8) (double complex).This also causes intrinsic functions to produce a double precision REAL (KIND=8) or COMPLEX (KIND=8) result instead of a single precision REAL (KIND=4) or COMPLEX (KIND=4) result, except if the argument is explicitly typed.
For example, references to the CMPLX intrinsic produce DCMPLX results (COMPLEX (KIND=8)), except if the argument to CMPLX is explicitly typed as REAL (KIND=4) or COMPLEX (KIND=4), in which case the resulting data type is COMPLEX (KIND=4). Other affected intrinsic functions include CMPLX, FLOAT, REAL, SNGL, and AIMAG.
128
Specifying /REAL_SIZE=128 defines:
- REAL and DOUBLE PRECISION declarations, constants, functions, and intrinsics as REAL (KIND=16) (REAL*16)
- COMPLEX and DOUBLE COMPLEX declarations, constants, functions, and intrinsics as COMPLEX (KIND=16) (COMPLEX*32)
If you omit /REAL_SIZE=128, then:
- REAL declarations, constants, functions, and intrinsics are defined as REAL (KIND=4).
- DOUBLE PRECISION declarations, constants, functions, and intrinsics are defined as REAL (KIND=8).
- COMPLEX declarations, constants, functions, and intrinsics are defined as COMPLEX (KIND=4).
- DOUBLE COMPLEX declarations, constants, functions, and intrinsics are defined as COMPLEX (KIND=8).
Specifying /REAL_SIZE=128 causes REAL, DOUBLE PRECISION, COMPLEX, and DOUBLE COMPLEX intrinsic functions to produce REAL (KIND=16) or COMPLEX (KIND=16) results unless their arguments are typed with an explicit KIND type parameter.
For example, a reference to the CMPLX intrinsic with /REAL_SIZE=128 produces a COMPLEX (KIND=16) result unless the argument is explicitly typed as REAL (KIND=4) or COMPLEX (KIND=4), in which case the result is COMPLEX (KIND=4).
The default is /REAL_SIZE=32.
The /RECURSIVE qualifier requests that HP Fortran generate code and allocate data so that a subroutine or a function can be called recursively.
The /RECURSIVE qualifier:
Subprograms declared with the RECURSIVE keyword are always recursive (whether you specify or omit the /RECURSIVE qualifier).
Variables declared with the AUTOMATIC statement or attribute always use stack-based storage for all local variables (whether you specify or omit the /RECURSIVE or /AUTOMATIC qualifiers).
Specifying /RECURSIVE sets /AUTOMATIC.
On the RECURSIVE keyword, see the HP Fortran for OpenVMS Language Reference Manual.
2.3.39 /REENTRANCY --- Specify Threaded or Asynchronous Reentrancy
The /REENTRANCY qualifier specifies whether code generated for the main program and any Fortran procedures it calls will be relying on threaded or asynchronous reentrancy. The default is /REENTRANCY=NONE.
The qualifier has the following form:
/REENTRANCY=
|
ASYNC
Informs the HP Fortran run-time library that the program may contain asynchronous handlers that could call the RTL. The run-time library will guard against asynchronous interrupts inside its own critical regions.NONE
Informs the HP Fortran run-time library that the program will not be relying on threaded or asynchronous reentrancy. The run-time library need not guard against such interrupts inside its own critical regions. Same as /NOREENTRANCY.THREADED
Informs the HP Fortran run-time library that the program is multithreaded, such as programs using the POSIX threads library. The run-time library will use thread locking to guard its own critical regions.To use the kernel threads libraries, also specify the /THREADS_ENABLE qualifier on the LINK command (see the Guide to the POSIX Threads Library).
Specifying NOREENTRANCY is equivalent to /REENTRANCY=NONE.
On writing multithreaded applications, see the Guide to the POSIX Threads Library.
2.3.40 /ROUNDING_MODE --- Specify IEEE Floating-Point Rounding Mode
The /ROUNDING_MODE qualifier allows you to control how rounding occurs during calculations. This qualifier applies only to IEEE data types (when you specify /FLOAT=IEEE_FLOAT). Note that if you specify /FLOAT=G_FLOAT or /FLOAT=D_FLOAT, /ROUNDING_MODE must not also be specified.
Note that the rounding mode applies to each program unit being compiled.
The qualifier has the following form:
/ROUNDING_MODE=
|
NEAREST
This is the normal rounding mode, where results are rounded to the nearest representable value. If you omit the /ROUNDING_MODE qualifier, /ROUNDING_MODE=NEAREST is used.CHOPPED
Results are rounded to the nearest representable value in the direction toward zero.MINUS_INFINITY
Results are rounded toward the next smallest representative value.DYNAMIC
Lets you set the rounding mode at run time.On OpenVMS I64, you can call the SYS$IEEE_SET_ROUNDING_MODE routine to set the rounding mode and obtain the previous rounding mode.
When you call SYS$IEEE_SET_ROUNDING_MODE, you can set the rounding mode to one of the following settings:
- Round toward zero (same as /ROUNDING_MODE=CHOPPED)
- Round toward nearest (same as /ROUNDING_MODE=NEAREST)
- Round toward plus infinity
- Round toward minus infinity (same as /ROUNDING_MODE=CHOPPED)
If you compile with /ROUNDING_MODE=DYNAMIC, the initial rounding mode is set to NEAREST. It will remain NEAREST until you call SYS$IEEE_SET_ROUNDING_MODE to change it.
On OpenVMS Alpha, there is no system routine to call to set the rounding mode dynamically. You have to write and call your own routines to set the rounding mode at run time. The mode is set by setting the rounding control bits in the floating-point control register (FPCR). You can do this in C using the asm feature from the system include file c_asm.h , or in assembly language.
Note
For the fastest run-time performance, avoid using /ROUNDING_MODE=DYNAMIC.
The rounding mode applies to each program unit being compiled.
Controls whether the HP Fortran compiler:
The default is /NOSEPARATE_COMPILATION.
When creating object modules for use in an object library, consider using /SEPARATE_COMPILATION to minimize the size of the routines included by the linker as it creates the executable image. In most cases, to allow more interprocedure optimizations, use the default /NOSEPARATE_COMPILATION.
The /SEVERITY qualifier changes one or both of the following:
The qualifier has the following form:
/SEVERITY=WARNINGS=
|
The default is that compiler diagnostic warning messages and standards checking messages have a severity of warning or /SEVERITY=(WARNINGS=WARNING).
You can specify one of the following:
For example, the following command line requests that compiler diagnostic messages have a severity of warning (default) and standards checking messages have a severity of error (and requests Fortran 95 standards checking)::
$ FORTRAN/SEVERITY=WARNINGS=STDERROR/STANDARD=F95 file.F90 |
The /SHOW qualifier controls whether optionally listed source lines and a symbol map appear in the source listing. (Optionally listed source lines are text-module source lines and preprocessor-generated source lines.)
For the /SHOW qualifier to take effect, you must specify the /LIST qualifier.
The qualifier has the following form:
/SHOW =
|
ALL
Requests that all optionally listed source lines and a symbol map be included in the listing file. Specifying /SHOW is equivalent to /SHOW=ALL.[NO]DICTIONARY
Controls whether HP Fortran source representations of any CDD/Repository records referenced by DICTIONARY statements are included in the listing file.[NO]INCLUDE
Controls whether the source lines from any file or text module specified by INCLUDE statements are included in the source listing.[NO]MAP
Controls whether the symbol map is included in the listing file.[NO]PREPROCESSOR
Controls whether preprocessor-generated source lines are included in the listing file.NONE
Requests that no optionally listed source lines or a symbol map be included in the listing file. Specifying /NOSHOW is equivalent to /SHOW=NONE.
The /SHOW qualifier defaults are NOINCLUDE and MAP.
On the /LIST qualifier, see Section 2.3.28.
2.3.44 /SOURCE_FORM --- Fortran 90/95 Source Form
The /SOURCE_FORM qualifier allows you to specify whether all HP Fortran source files on the FORTRAN command line are in fixed or free source form. The qualifier has the following form:
/SOURCE_FORM=
|
FIXED
Specifies that the input source files will be in fixed source form, regardless of the file type. Source files with a file type of FOR or F (or any file type other than F90) are assumed to contain fixed source form.FREE
Specifies that the input source files will be free form, regardless of the file type. Source files with a file type of F90 are assumed to contain free source form.
On column positions and source forms, see the HP Fortran for OpenVMS Language Reference Manual.
2.3.45 /STANDARD --- Perform Fortran 90/95 Standards Checking
The /STANDARD qualifier instructs the compiler to generate informational messages for language elements that are not standard in the Fortran 90 or Fortran 95 language and that can be identified at compile-time. The default is /NOSTANDARD. If you specify /STANDARD with no value, the default is Fortran 95.
The qualifier has the following form:
/[NO]STANDARD=
|
The /STANDARD=F90 qualifier requests that the compiler issue informational messages for:
The /STANDARD=F95 qualifier (or /STANDARD) requests that the compiler issue informational messages for:
Specifying /STANDARD=NONE is equivalent to /NOSTANDARD.
If you specify the /NOWARNINGS qualifier, the /STANDARD qualifier is ignored.
If you omit the /STANDARD qualifier, the default is /NOSTANDARD.
To change the severity of standards checking warning messages to error severity, specify /SEVERITY=WARNINGS=SDTERROR (see Section 2.3.42).
Source statements that do not conform to Fortran 90 or Fortran 95 language standards are detected by the HP Fortran compiler under the following circumstances:
Given these circumstances, the compiler is able to detect most instances of nonconforming usage. It does not detect all instances because the /STANDARD qualifier does not produce checks for all nonconforming usage at compile time. In general, the unchecked cases of nonconforming usage arise from the following situations:
Most of the unchecked cases occur in the interface between calling and called subprograms. However, other cases are not checked, even within a single subprogram.
The following items are known to be unchecked:
On the HP Fortran language, see the HP Fortran for OpenVMS Language Reference Manual.
2.3.46 /SYNCHRONOUS_EXCEPTIONS --- Report Exceptions More Precisely (Alpha only)
The /SYNCHRONOUS_EXCEPTIONS qualifier associates an exception with the instruction that causes it. Specifying /SYNCHRONOUS_EXCEPTIONS slows program execution, you should specify it only when debugging a specific problem, such as locating the source of an exception.
If you omit /SYNCHRONOUS_EXCEPTIONS, /NOSYNCHRONOUS_EXCEPTIONS is used where exceptions can be reported imprecisely one or more instructions after the instruction that caused the exception.
Specifying /IEEE_MODE=FAST (default) provides imprecise exception reporting (same as /NOSYNCHRONOUS_EXCEPTIONS). Specifying other /IEEE_MODE keywords (when you also specify /FLOAT=IEEE_FLOAT) provides precise exception reporting (same as /SYNCHRONOUS_EXCEPTIONS on Alpha systems).
Note that floating-point exceptions are always synchronous on EV6 and later processors, regardless of whether /SYNCHRONOUS_EXCEPTIONS is used.
Previous | Next | Contents | Index |