Compaq Fortran
User Manual for
Tru64 UNIX and Linux Alpha Systems


Previous Contents Index

3.4 -arch keyword --- Specify Type of Code Instructions Generated

Use the -arch keyword option to specify the type of Alpha architecture code instructions to be generated for the program unit being compiled.

Compaq Tru64 UNIX provides an operating system kernel that includes an instruction emulator. This emulator allows new instructions, not implemented on the host processor chip, to execute and produce correct results. Applications using emulated instructions will run correctly, but may incur significant software emulation overhead at runtime.

All Alpha processors implement a core set of instructions. Certain Alpha processor versions include additional instruction extensions.

If you omit the -arch keyword , -arch generic is used.

-arch generic

Generates code that is appropriate for all Alpha processor implementations. This is the default.

Programs compiled with the generic keyword run on all implementations of the Alpha architecture without any instruction emulation overhead.

-arch host

Generates code for the processor generation in use on the system being used for compilation.

Programs compiled with the host keyword run on other implementations of the Alpha architecture might encounter instruction emulation overhead.

-arch ev4

Generates code for the 21064, 21064A, 21066, and 21068 implementations of the Alpha architecture.

Programs compiled with the ev4 keyword run without instruction emulation overhead on all Alpha processors.

-arch ev5

Generates code for some 21164 chip implementations of the Alpha architecture that use only the base set of Alpha instructions (no extensions).

Programs compiled with the ev5 keyword run without instruction emulation overhead on all Alpha processors.

-arch ev56

Generates code for some 21164 chip implementations that use the byte and word manipulation instruction extensions of the Alpha architecture.

Programs compiled with the ev56 keyword might incur emulation overhead on ev4 and ev5 processors, but still run correctly on Compaq Tru64 UNIX systems.

-arch pca56

Generates code for the 21164PC chip implementation that uses the byte and word manipulation instruction extensions and multimedia instruction extensions of the Alpha architecture.

Programs compiled with the pca56 keyword might incur emulation overhead on ev4 and ev5 and ev56 processors, but still run correctly on Compaq Tru64 UNIX systems.

-arch ev6

Generates code for chip implementations that use advanced instruction extensions of the Alpha architecture. This option permits the compiler to generate any EV6 instruction, including the following extensions to the base Alpha instruction set: BWX (Byte/Word manipulation), MVI (Multimedia) instructions, and square root and floating-point convert extensions (FIX).

Programs compiled with the ev6 keyword might incur emulation overhead on ev4, ev5, ev56, and pca56 processors, but still run correctly on Compaq Tru64 UNIX systems.

-arch ev67

Generates code for chip implementations that use advanced instruction extensions of the Alpha architecture. This option permits the compiler to generate any EV67 instruction, including the following extensions to the base Alpha instruction set: BWX (Byte/Word manipulation), MVI (Multimedia) instructions, square root and floating-point convert extensions (FIX), and count extensions (C1X).

Programs compiled with the ev67 keyword might incur emulation overhead on ev4, ev5, ev56, pca56, and ev6 processors, but still run correctly on Compaq Tru64 UNIX systems.

3.5 -assume buffered_io --- Buffered Output

Use the -assume buffered_io option so that, at runtime, the default value BUFFERED='YES' applies to opening sequential output files. As a result, write statements to these disk files will first fill buffers with data before the runtime library routines move it to the files and empty the buffers.

The default value is -assume nobuffered_io . Its effect is to have the runtime library routines respond to write statements by moving data to sequential disk files immediately.

3.6 -assume byterecl --- Units for Unformatted File Record Length

Specifying the -assume byterecl option:

For More Information:

3.7 -assume dummy_aliases --- Dummy Variable Aliasing

If you specify the -assume dummy_aliases option, the compiler must assume that dummy (formal) arguments to procedures share memory locations with other dummy arguments or with variables shared through use association, host association, or common block use.

These program semantics do not strictly obey the Fortran 95/90 standards and they slow performance.

If you omit -assume dummy_aliases , the compiler does not need to make these assumptions, which results in better run-time performance. However, omitting -assume dummy_aliases can cause some programs that depend on such aliases to fail or produce wrong answers.

You only need to compile the called subprogram with -assume dummy_aliases .

If you compile a program that uses dummy aliasing with -assume nodummy_aliases in effect, the run-time behavior of the program becomes unpredictable. In such programs, the results depend on the exact optimizations that are performed. In some cases, normal results occur; however, in other cases, results differ because the values used in computations involving the offending aliases differ.

For More Information:

On -assume dummy_aliases , see Section 5.8.10.

3.8 -assume gfullpath --- Source File Path for Debugging

The -assume gfullpath option includes the full source file path in debugger information. The default is -assume nogfullpath .

3.9 -assume minus0 --- Standard Semantics for Minus Zero

The -assume minus0 option tells the compiler to use Fortran 95 standard semantics for the treatment of IEEE floating value -0.0 in the SIGN intrinsic. This applies if the processor is capable of differentiating -0.0 from +0.0.

The default is -assume nominus0 , which tells the compiler to use Fortran 77 standard semantics in the SIGN intrinsic to treat -0.0 and +0.0 as 0.0.

3.10 -assume pthreads_lock --- Thread Lock Selection for Parallel Execution

(TU*X ONLY) This option lets you select the kind of locking used for an unnamed critical section (under -mp and -omp ). In the rare event that your program should need more restrictive locking, then specify the -assume pthreads_lock option to set _OtsPthreadLock, which locks out other pthreads in addition to all critical sections.

The default is nopthreads_lock, which results in much faster compile times. Using the default creates a bifcall (enter_critical) to set _OtsGlobalLock, which does not lock out other pthreads, but does provide a single lock for all unnamed critical sections.

3.11 -assume source_include --- INCLUDE file search

This option determines where the compiler searches for INCLUDE files. The default is -assume source_include , which instructs the compiler to search the directory where the source files are located. If you specify -assume nosource_include , the compiler searches the default directory for INCLUDE files (the same as if -vms is used).

3.12 -assume noaccuracy_sensitive, -fp_reorder --- Reorder Floating-Point Calculations

Specifying -assume noaccuracy_sensitive or -fp_reorder ) allows the compiler to reorder code based on algebraic identities (inverses, associativity, and distribution) to improve performance. The numeric results can be slightly different from the default ( -no_fp_reorder ) because of the way intermediate results are rounded.

The -assume noaccuracy_sensitive and -fp_reorder options are equivalent.

Numeric results with -fp_reorder are not categorically less accurate. They can produce more accurate results for certain floating-point calculations, such as dot product summations.

For example, the following expressions are mathematically equivalent but may not compute the same value using finite precision arithmetic.


X = (A + B) - C 
 
X = A + (B - C) 

If you omit -fp_reorder and omit -fast , the compiler uses a limited number of rules for calculations, which might prevent some optimizations.

If you specify -fp_reorder , or if you specify -fast and omit -no_fp_reorder , the compiler can reorder code based on algebraic identities to improve performance.

For More Information:

On -fp_reorder , see Section 5.8.9.

3.13 -assume nounderscore --- Underscore on External Names

Specifying the -assume nounderscore prevents the compiler from appending an underscore (_) to the following external user-defined names:

The name of a blank (unnamed) common block remains _BLNK__ and Compaq Fortran intrinsic names remain the same. If you omit -assume nounderscore , Compaq Fortran appends an underscore to calls to most external names.

You can also use the cDEC$ ATTRIBUTES ALIAS directive to change how external names are spelled.

3.14 -automatic, -static --- Type of Data Storage

The -automatic and -static options control whether:

A subprogram declared with the RECURSIVE keyword is always recursive (whether you specify or omit the -static option).

Specifying -automatic (or -recursive ) puts local variables on the run-time stack.

Specifying -static causes all local variables to be statically allocated. The default is -static (same as -noautomatic ).

3.15 -c --- Inhibit Linking and Retain Object File

Use the -c option to suppress the loading phase of the compilation and force an object file to be produced even if only one program is compiled. If you omit -c , the linker creates an executable program and any temporary object files are deleted.

If you specify the -o output option with the -c option and multiple Fortran files, a single .o file is created, allowing full interprocedure optimizations.

However, if you specify multiple source files and the -c option without the -o output option, multiple object files are created and interprocedure optimizations do not occur.

3.16 -call_shared, -non_shared, -shared --- Shared Library Use

The -call_shared and -non_shared options control whether ld first searches in archive or shared libraries for unresolved references. The -shared option allows the creation of a shared library.

-call_shared

Specifying -call_shared (the default) causes the linker to search for unresolved references in shared libraries ( .so files) before archive libraries ( .a files).

If the unresolved reference is found in the shared library, the unresolved reference is resolved when the program is run (during program loading), reducing executable program size. For more information on related options, see Section 2.5.2.

-non_shared

Specifying -non_shared requests that the linker search only in archive libraries ( .a files) for unresolved references; shared library ( .so ) files are not searched.

-shared

Specifying -shared requests the creation of a dynamic shareable object that can be included into a shared library.

If you omit -c on the f90 command line, the linker creates a shared library ( .so file) that other dynamic executables can use at run-time. To explicitly name the resulting object file or shared library, use the -o option.

If you also specify the -c option to inhibit linking, an object file ( .o file) is created that can be subsequently processed by ld to create a shared library.

The default is -call_shared .

For More Information:

3.17 -ccdefault keyword --- Specifies Carriage Control for Terminals

The -ccdefault keyword options specify default carriage control when a terminal displays a file.

The following options apply where the default one is -ccdefault default :

-ccdefault fortran

Specifying -ccdefault fortran results in normal Fortran interpretation of the first character, such as the character "0" resulting in a blank line before output.

-ccdefault list

Specifying -ccdefault list results in one linefeed between records.

-ccdefault none

Specifying -ccdefault none results in no carriage control processing.

-ccdefault default

Specifying -ccdefault default results in the possibility of other options, such as -vms , affecting this default setting.

3.18 -check bounds, -C, -check_bounds --- Boundary Run-Time Checking

Specifying -check bounds (same as -C ) generates code to perform run-time checks on subscript and substring expressions. A run-time message is reported if the expression is outside the addresses of the dimension of the array or outside the length of the string. The default ( -check nobounds ) suppresses range checking.

For array bounds, each individual dimension is checked. Array bounds checking is not performed for arrays that are dummy arguments in which the last dimension bound is specified as * or when both upper and lower dimensions are 1.

Once the program is debugged, omit this option to reduce executable program size and slightly improve run-time performance.

3.19 -check noformat --- Ignore Certain Format Mismatches at Run Time

Specifying -check noformat disables the run-time message associated with format mismatches (number 61). It also requests that the data item be formatted using the specified descriptor, unless the length of the item cannot accommodate the descriptor (for example, it is still an error to pass an INTEGER*2 item to an E edit descriptor). Using -check noformat allows such format mismatches as a REAL*4 item formatted with an I edit descriptor.

If you omit the -vms option, the default is -check noformat .

If you specify -vms and omit -check noformat , -check format is used.

3.20 -check nooutput_conversion --- Ignore Truncated Format Mismatches at Run Time

Specifying -check nooutput_conversion disables the run-time message (number 63) associated with format truncation. The data item is printed with asterisks. Error number 63 occurs when a number could not be output in the specified format field length without loss of significant digits (format truncation).

If you omit the -vms option, the default is -check nooutput_conversion .

If you specify -vms and omit -check nooutput_conversion , -check output_conversion is used.

3.21 -check nopower --- Allow Special Floating-Point Expressions

Specifying the -check nopower option allows certain arithmetic expressions containing floating-point numbers and exponentiation to be evaluated and return a result rather than cause the compiler to display a run-time message and stop the program. The specific arithmetic expressions include:

For example, if you specify -check nopower , the calculation of the expression 0.0 ** 0.0 results in 1. The expression (--3.0) ** 3.0 results in --27.0.

If you omit -check nopower for such expressions, an exception occurs, error message number 65 is displayed, and the program stops (default is -check power ).

3.22 -check omp_bindings --- OpenMPtm Fortran API Binding Rules Checking

Specifying the -check omp_bindings option (TU*X ONLY) provides run-time checking to enforce the binding rules for OpenMP Fortran API compiler directives. When this option is in effect, the Compaq Fortran compiler issues an error message if your program attempts any of the following actions:

The default is -check noomp_bindings . Additionally, the following conditions apply:

For More Information:

3.23 -check overflow --- Integer Overflow Run-Time Checking

Use the -check overflow option to request that all integer calculations (INTEGER, INTEGER with a kind parameter, or INTEGER with a length specifier) be checked for arithmetic overflow at run time. Real and complex calculations are always checked for overflow and are not affected by -check overflow .

If the check reveals that the code caused arithmetic overflow, an error message is displayed at run time, program execution stops, and a core dump occurs.

Once the program is debugged, omit this option to reduce executable program size and slightly improve run-time performance.

3.24 -check underflow --- Floating-Point Underflow Run-Time Checking

Specifying -check underflow (TU*X ONLY) displays a run-time warning message (maximum of twice) when a floating-point underflow occurs. The default is -check nounderflow .

Floating-point underflow is allowed to continue if the -fpe3 or -fpe4 option was specified; otherwise, the underflow value is replaced by zero. A count of how many occurrences of each type of exception is displayed upon program completion. For additional information, see Section 3.37.

For More Information:

On underflow ranges for floating-point data types, see Section 9.4.

3.25 -convert keyword --- Unformatted Numeric Data Conversion

The -convert keyword options control whether numeric data in unformatted files is converted or not. Numeric data in an unformatted file is expected to be in native little endian integer and little endian IEEE S_float, T_float, and X_float floating-point formats, unless handled otherwise by the application.

You can specify the unformatted numeric data format for specific unit numbers by using the OPEN statement CONVERT specifier or by setting the appropriate FORT_CONVERTn environment variable.

The following options apply (the default is -convert native ):

-convert big_endian

Specifying -convert big_endian indicates that unformatted files containing numeric data are in IEEE big endian (nonnative) format.

The resulting program will read and write unformatted files containing numeric data by using the following assumptions:

-convert cray

Specifying -convert cray indicates that unformatted files containing numeric data are in CRAY (nonnative) big endian format.

The resulting program will read and write unformatted files containing numeric data by using the following assumptions:

-convert fdx

Specifying -convert fdx indicates that numeric data in unformatted files is in OpenVMS Alpha little endian format, as follows:

-convert fgx

Specifying -convert fgx indicates that numeric data in unformatted files is in OpenVMS Alpha little endian format, as follows:

-convert ibm

Specifying -convert ibm indicates that unformatted files containing numeric data are in IBM (nonnative) big endian format.

The resulting program will read and write unformatted files containing numeric data by using the following assumptions:

-convert little_endian

Specifying -convert little_endian indicates that numeric data in unformatted files is in native little endian integer format and IEEE little endian floating-point format (same as used in memory).

On Compaq Tru64 UNIX systems, using -convert little_endian produces the same results as -convert native .

-convert native

Specifying -convert native indicates that numeric data in unformatted files is not converted. The disk floating-point formats are expected to match the memory floating-point formats, as follows:

If you omit other -convert keyword options, -convert native is used.

-convert vaxd

Specifying -convert vaxd indicates that numeric data in unformatted files is in VAXD little endian format, as follows:

-convert vaxg

Specifying -convert vaxg indicates that numeric data in unformatted files is in VAXG little endian format, as follows:

For More Information:


Previous Next Contents Index