Compaq Fortran
User Manual for
OpenVMS Alpha Systems


Previous Contents Index

2.3.10 /CONVERT --- Unformatted Numeric Data Conversion

The /CONVERT qualifier specifies the format of numeric unformatted data in a file, such as IEEE little endian, VAX G_float, VAX D_float floating-point format, or a nonnative big endian format.

By default, an unformatted file containing numeric data is expected to be in the same floating-point format used for memory representation or /CONVERT=NATIVE. You set the floating-point format used for memory representation using the /FLOAT qualifier (see Section 2.3.19).

Instead of specifying the unformatted file format by using the /CONVERT qualifier, you can use one of the other methods (predefined logical names or the OPEN CONVERT keyword) described in Chapter 9, which allow the same program to use different floating-point formats, as shown in Figure 2-1.

The qualifier has the following form (specify one keyword):

/CONVERT=
  • BIG_ENDIAN
  • CRAY
  • FDX
  • FGX
  • IBM
  • LITTLE_ENDIAN
  • NATIVE
  • VAXD
  • VAXG

BIG_ENDIAN

Specifies that unformatted files containing numeric data are in IEEE big endian (nonnative) format.

If you specify BIG_ENDIAN, the resulting program will read and write unformatted files containing numeric data assuming:

CRAY

Specifies that unformatted files containing numeric data are in CRAY (nonnative) big endian format.

If you specify CRAY, the resulting program will read and write unformatted files containing numeric data assuming:

FDX

Specifies that unformatted files containing numeric data is in OpenVMS Alpha little endian format, as follows:

FGX

Specifies that unformatted files containing numeric data is in OpenVMS Alpha little endian format, as follows:

IBM

Specifies that unformatted files containing numeric data are in IBM® (nonnative) big endian format (such as IBM System\370 and similar systems).

If you specify IBM, the resulting program will read and write unformatted files containing numeric data assuming:

LITTLE_ENDIAN

Specifies that unformatted files containing numeric data is in native little endian integer format and IEEE little endian floating-point format, as follows:

NATIVE

Specifies that the format for unformatted files containing numeric data is not converted. When using NATIVE (the default), the numeric format in the unformatted files must match the floating-point format representation in memory, which is specified using the /FLOAT qualifier.

This is the default.

VAXD

Specifies that unformatted files containing numeric data is in OpenVMS VAX little endian format, as follows:

VAXG

Specifies that unformatted files containing numeric data is in OpenVMS VAX little endian format, as follows:

For More Information:

2.3.11 /D_LINES --- Debugging Statement Indicator, Column 1

Specify /D_LINES to request that the compiler should treat lines in fixed-form source files that contain a D in column 1 as source code rather than comment lines. Such lines might print the values of variables or otherwise provide useful debugging information. This qualifier is ignored for free-form source files.

The default is /NOD_LINES, which means that lines with a D in column 1 are treated as comments.

2.3.12 /DEBUG --- Object File Traceback and Symbol Table

The /DEBUG qualifier requests that the object module contain information for use by the OpenVMS Debugger and the run-time error traceback mechanism.

The qualifier has the following form:

/DEBUG=
    • [NO]SYMBOLS
    • [NO]TRACEBACK
    [, ...]
    • NONE
    • ALL

[NO]SYMBOLS

Controls whether the compiler provides the debugger with local symbol definitions for user-defined variables, arrays (including dimension information), structures, parameter constants, and labels of executable statements.

[NO]TRACEBACK

Controls whether the compiler provides an address correlation table so that the debugger and the run-time error traceback mechanism can translate virtual addresses into source program routine names and compiler-generated line numbers.

ALL

Requests that the compiler provide both local symbol definitions and an address correlation table. If you specify /DEBUG without any keywords, it is the same as /DEBUG=ALL or /DEBUG=(TRACEBACK,SYMBOLS). When you specify /DEBUG, also specify /NOOPTIMIZE to prevent optimizations that complicate debugging.

NONE

Requests that the compiler provide no debugging information. The /NODEBUG, /DEBUG=NONE, and /DEBUG=(NOTRACEBACK, NOSYMBOLS) qualifiers are equivalent.

If you omit /DEBUG, the default is /DEBUG=(TRACEBACK, NOSYMBOLS).

Note

The use of /NOOPTIMIZE is strongly recommended when the /DEBUG qualifier is used. Optimizations performed by the compiler can cause several different kinds of unexpected behavior when using the OpenVMS Debugger.

For More Information:

2.3.13 /DIAGNOSTICS --- Create Diagnostics File

The /DIAGNOSTICS qualifier creates a file containing compiler messages and diagnostic information.

The qualifier has the following form:

/DIAGNOSTICS[=file-spec]

The default is /NODIAGNOSTICS.

If you omit the file specification, the diagnostics file has the name of your source file and a file type of DIA.

The diagnostics file is reserved for use with Compaq third-party layered products such as, but not limited to, the Language Sensitive Editor (LSE).

For More Information:

On using LSE, see the Guide to Source Code Analyzer for OpenVMS Systems or online LSE HELP.

2.3.14 /DOUBLE_SIZE --- DOUBLE PRECISION Data Size

The /DOUBLE_SIZE qualifier allows you to specify the data size for floating-point DOUBLE PRECISION data declarations. The qualifier has the following form:

/DOUBLE_SIZE=
  • 64
  • 128

To request that all DOUBLE PRECISION declarations, constants, functions, and intrinsics use the REAL (KIND=16) extended-precision data rather than REAL (KIND=8) double-precision data, specify /DOUBLE_SIZE=128. REAL (KIND=16) data is stored in memory using X_float format.

If you omit /DOUBLE_SIZE=128, the size of DOUBLE PRECISION declarations is REAL (KIND=8) or 64-bit double-precision data (default is /DOUBLE_SIZE=64). To select the floating-point format used in memory for 64-bit REAL (KIND=8) data, use the /FLOAT qualifier.

For More Information:

On the /FLOAT qualifier, see Section 2.3.19.

2.3.15 /ERROR_LIMIT --- Limit Compiler Messages

The /ERROR_LIMIT qualifier specifies the maximum number of error-level or fatal-level compiler errors allowed for a given compilation unit (one or more files specified on the FORTRAN command line that create a single object file).

The qualifier has the following form:

/ERROR_LIMIT[=nn] or /NOERROR_LIMIT

If you specify /ERROR_LIMIT=n, the compilation can have up to n - 1 errors without terminating the compilation. When the error limit is reached, compilation is terminated. If you specify /NOERROR_LIMIT, there is no limit on the number of errors that are allowed.

By default, execution of the compiler is terminated when 30 error (E-level) and fatal (F-level) messages are detected (default is /ERROR_LIMIT=30).

When the error limit is surpassed, only compilation of the current comma-list element is terminated; the compiler will proceed to compile any other comma-list element. For example, consider the following:


$ FORTRAN A,B,C

If comma-list element A has more than 30 E- or F-level errors, its compilation is terminated, but the compiler proceeds to compile elements B and C.

A list of files separated by plus signs (+) form a single compilation unit. In the following example, compilation of the plus-sign separated files A, B, or C stops when the total of E- or F-level errors for all three files exceeds 30:


$ FORTRAN A+B+C

Specifying /ERROR_LIMIT=0 is equivalent to specifying /ERROR_LIMIT=1 (compilation terminates when the first error-level or fatal-level error occurs).

For More Information:

On compiler diagnostic messages, see Section 2.5.

2.3.16 /EXTEND_SOURCE --- Line Length for Fixed-Form Source

Specify /EXTEND_SOURCE to request that the compiler increase the length of Compaq Fortran statement fields to column 132 for fixed-form source files, instead of column 72 (the default). It is ignored for free-form source files.

You can also specify this qualifier by using the OPTIONS statement. The default in either case is /NOEXTEND_SOURCE.

To request warning messages for truncated fixed-form source lines, specify /WARNINGS=TRUNCATED_SOURCE.

For More Information:

2.3.17 /F77 --- FORTRAN IV or FORTRAN-77 Compatibility

The /F77 qualifier requests that the compiler use FORTRAN-77 (and thus Fortran 90/95) interpretation rules for those statements that have different meanings in older versions of the Fortran standards. The default is /F77.

If you specify /NOF77, the compiler uses the FORTRAN 66 (FORTRAN IV) interpretation, which include:

2.3.18 /FAST --- Request Fast Run-Time Performance

Specifying /FAST sets the following qualifiers that usually improve run-time performance:

2.3.19 /FLOAT --- Specify Floating-Point Format in Memory

The /FLOAT qualifier specifies the floating-point data format to be used in memory for REAL or COMPLEX data. For performance reasons, consider specifying the same floating-point memory format as the floating-point format used by unformatted files the program will access if the data falls within the acceptable range.

Figure 2-1 shows the FORTRAN command qualifiers used to specify the floating-point format used in memory and in an unformatted file. Because REAL (KIND=16) (same as REAL*16) data is always in X_float format on Alpha systems, the /FLOAT keyword specifies the format for REAL (KIND=4), COMPLEX (KIND=4), REAL (KIND=8), and COMPLEX (KIND=8) data (or equivalent declarations).

Figure 2-1 Specifying the Format of Numeric Data for Unformatted Files


To specify the floating-point format (such as big endian) for all unformatted files opened by the program, use the /CONVERT qualifier. To allow the same program to use different floating-point formats, you must use the predefined logical names or the OPEN CONVERT keyword to specify the format for specific unit numbers, as described in Chapter 9.

The qualifier has the following form:

/FLOAT=
  • D_FLOAT
  • G_FLOAT
  • IEEE_FLOAT

D_FLOAT

Specifies that the memory format for REAL (KIND=4) and COMPLEX (KIND=4) data is VAX F_float and that the memory format for REAL (KIND=8) and COMPLEX (KIND=8) data is VAX D_float. Same as the obsolete qualifier /NOG_FLOATING.

OpenVMS VAX systems fully support D_float and G_float implementations of the REAL (KIND=8) (DOUBLE PRECISION) data type in memory. OpenVMS Alpha systems can store REAL (KIND=8) floating-point data in memory in D_float, G_float, or T_float format.

Because the Alpha instruction set does not support D_float computations, D_float data is converted to G_float format for arithmetic computations and then converted back to D_float format. For programs that perform many REAL (KIND=8) computations, using D_float data on Alpha systems is slower than G_float or T_float data and the results will differ from VAX D_float computations and results.

Unless a program uses unformatted data files in D_float format, do not use the /FLOAT=D_FLOAT qualifier. If range and accuracy constraints do not disallow the use of the other REAL (KIND=8) data types, consider converting existing unformatted files that contain D_float data to another format, such as G_float, T_float, or X_float (see Chapter 9).

G_FLOAT

Specifies that the memory format for single precision REAL (KIND=4) and COMPLEX (KIND=4) data is VAX F_float and that the memory format for double precision REAL (KIND=8) and COMPLEX (KIND=8) data is VAX G_float. Same as the obsolete qualifier /G_FLOATING.

The default is /FLOAT=G_FLOAT, unless you specify /NOG_FLOATING.

IEEE_FLOAT

Specifies that the memory format for single precision REAL (KIND=4) and COMPLEX (KIND=4) data is IEEE S_float and the memory format for double precision REAL (KIND=8) and COMPLEX (KIND=8) is IEEE T_float.

Specifying /FLOAT=IEEE_FLOAT allows the use of certain IEEE exceptional values. When you specify /FLOAT=IEEE_FLOAT, you should be aware of the /CHECK=FP_EXCEPTIONS, /IEEE_MODE, and /ROUNDING_MODE qualifiers.

Because REAL (KIND=16) (same as REAL*16) data is always in X_float format on Alpha systems, operations that use REAL (KIND=16) data may encounter certain exceptional values even when /FLOAT=IEEE_FLOAT is not used.

If your program requires the G_float form of double precision for its correct operation (it uses a range larger than 10**38), you should use the /FLOAT qualifier in an OPTIONS statement in your source program.

You should not mix floating data type formats in routines that pass single-precision or double-precision quantities amongst themselves.

For More Information:

2.3.20 /GRANULARITY --- Control Shared Memory Access to Data

The /GRANULARITY qualifier controls the size of data that can be safely accessed from different threads. You do not need to specify this option for local data access by a single process, unless asynchronous write access from outside the user process might occur. The default is /GRANULARITY=QUADWORD.

The qualifier has the following form:

/GRANULARITY=
  • BYTE
  • LONGWORD
  • QUADWORD

Data that can be written from multiple threads must be declared as VOLATILE (so it is not held in registers). To ensure alignment in common blocks, derived types, and record structures, use the /ALIGNMENT qualifier.

BYTE

Requests that all data (one byte or greater) can be accessed from different threads sharing data in memory. This option will slow run-time performance.

LONGWORD

Ensures that naturally aligned data of four bytes or greater can be accessed safely from different threads sharing access to that data in memory. Accessing data items of three bytes or less and unaligned data may result in data items written from multiple threads being inconsistently updated.

QUADWORD

Ensures that naturally aligned data of eight bytes can be accessed safely from different threads sharing data in memory. Accessing data items of seven bytes or less and unaligned data may result in data items written from multiple threads being inconsistently updated. This is the default.

For More Information:

2.3.21 /IEEE_MODE --- Control IEEE Arithmetic Exception Handling

The /IEEE_MODE qualifier specifies the arithmetic exception handling used for floating-point calculations, such as for exceptional values. It also controls the precision of exception reporting (like /SYNCHRONOUS_EXCEPTIONS).

Exceptional values are associated with IEEE arithmetic and include Infinity (+ and -) values, Not-A-Number (NaN) values, invalid data values, and denormalized numbers (see Section 8.4.7).

Use the /IEEE_MODE qualifier to control:

This qualifier only applies to arithmetic calculations when:

The qualifier has the following form:

/IEEE_MODE=
  • FAST
  • UNDERFLOW_TO_ZERO
  • DENORM_RESULTS

The default, /IEEE_MODE=FAST, provides faster run-time performance than UNDERFLOW_TO_ZERO or DENORM_RESULTS. Specifying DENORM_RESULTS provides the slowest run-time performance.

FAST

Specifies that the program should stop if any exceptional values are detected. This is the default.

When the program encounters or calculates any exceptional values (infinity (+ or --), NaN, or invalid data) in a calculation, the program stops and displays a message. This allows the fastest run-time performance.

Denormalized values calculated in an arithmetic expression are set to zero. Denormalized values encountered as variables in an arithmetic expression (including constant values) are treated as invalid data (an exceptional value), which stops the program.

Exceptions are not reported until one or more instructions after the instruction that caused the exception. To have exceptions reported at the instruction that caused the exception when using /IEEE_MODE=FAST, also specify /SYNCHRONOUS_EXCEPTIONS.

Using FAST (default) allows fast run-time performance for those programs that do not generate exceptional values.

UNDERFLOW_TO_ZERO

Specifies that the program should continue if any exceptional values are detected and set calculated denormalized (underflow) values to zero.

When the program encounters an exceptional value (infinity (+ or --), NaN, invalid data) in an arithmetic expression, the program continues. It also continues when the result of a calculation is an exceptional value.

Calculated denormalized values are set to zero (0). This prevents the denormalized number from being used in a subsequent calculation (propagated).

Exceptions are reported at the instruction that caused the exception (same as /SYNCHRONOUS_EXCEPTIONS). This allows precise run-time reporting of exceptions for those programs that generate exceptional values, but this slows program run-time performance.

Using UNDERFLOW_TO_ZERO allows programs to handle exceptional values, but does not propagate numbers in the denormalized range.

To request run-time messages for arithmetic exceptions, specify the /CHECK=FP_EXCEPTIONS qualifier.

DENORM_RESULTS

Specifies that the program should continue if any exceptional values are detected and leave calculated denormalized values as is (allows underflow).

When the program encounters an exceptional value (infinity (+ or --), NaN, invalid data) in an arithmetic expression, the program continues. It also continues when the result of a calculation is an exceptional value.

Calculated denormalized values are left as denormalized values. When a denormalized number is used in a subsequent arithmetic expression, it requires extra software-assisted handling and slows performance. A program that generates denormalized numbers will be slower than the same program compiled using /IEEE_MODE=UNDERFLOW_TO_ZERO.

Exceptions are reported at the instruction that caused the exception (same as /SYNCHRONOUS_EXCEPTIONS). This allows precise run-time reporting of exceptions for those programs that generate exceptional values, but this slows program run-time performance.

Using DENORM_RESULTS allows programs to handle exceptional values, including allowing underflow of denormalized numbers.

To request run-time messages for arithmetic exceptions, specify the /CHECK=FP_EXCEPTIONS qualifier. To request run-time messages for only those arithmetic exceptions related to denormalized numbers, specify the /CHECK=UNDERFLOW qualifier.

For More Information:


Previous Next Contents Index