Compaq Fortran
User Manual for
Tru64 UNIX and
Linux Alpha Systems


Previous Contents Index


Chapter 3
f90 and fort Command-Line Options

This chapter describes f90 and fort command-line options in detail.

Note

To invoke the Compaq Fortran compiler, use:
  • f90 on Tru64 UNIX Alpha systems
  • fort command on Linux Alpha systems


This chapter uses f90 to indicate invoking Compaq Fortran on both systems, so replace this command with fort if you are working on a Linux Alpha system.

To invoke the Compaq C compiler, use:
  • cc on Tru64 UNIX Alpha systems
  • ccc on Linux Alpha systems


This chapter uses cc to indicate invoking Compaq C on both systems, so replace this command with ccc if you are working on a Linux Alpha system.

3.1 Overview of Command-Line Options

Options to the f90 command affect how the compiler processes a file in conjunction with the file name suffix information described in Section 2.1.1. The simplest form of the f90 command is often sufficient.

You can override some options specified on the command line by using the OPTIONS statement in your Fortran source program. The options specified by the OPTIONS statement affect only the program unit where the statement occurs.

If you compile parts of your program by using multiple f90 commands, options that affect the execution of the program should be used consistently for all compilations, especially if data is shared or passed between procedures. For example:

Some options consist of two words separated by a space, while others may have words joined by an underscore ( _ ). Most options can be abbreviated. For example, you can abbreviate -check output_conversion to -check out (usually four characters or more).

3.2 f90 and fort Command Categories and Options

Table 3-1 lists categories of command-line options, the f90 and fort command-line options, and the sections in which they are described in detail.

Table 3-1 f90 and fort Command Categories and Options
Category Option Name and Section in this Manual
Assembler File -s (see Section 3.81)
Data Size -i2 , -i4 , -i8 , -integer_size num (see Section 3.53)
-r8 , -r16 , -real_size num , (see Section 3.78)
-double_size num , (see Section 3.34)
For a summary of available data types, see Chapter 9.
Compaq FUSE Cross-Reference File -fuse_xref , (see Section 3.47) (TU*X ONLY)
Debugging and Symbol Table -d_lines (see Section 3.33)
-g0 , -g1 , -g2 , -g , -g3 , and -ladebug (see Section 3.48)
Also see Chapter 4.
Data Accuracy and Floating-Point Exceptions -assume noaccuracy_sensitive (see Section 3.12)
-check nopower (see Section 3.25)
-double_size num (see Section 3.34)
-fast (see Section 3.40)
-fpe n (see Section 3.44)
-fpconstant (see Section 3.43)
-fp_reorder (see Section 3.12)
-fprm keyword (see Section 3.46)
-intconstant (see Section 3.55)
-math_library keyword (see Section 3.61)
-r8 , -r16 , -real_size num (see Section 3.78)
-speculate keyword (TU*X ONLY) (see Section 3.84)
-synchronous_exceptions (see Section 3.86)
Language and Run-Time Compatibility -1 , -66 , -f66 , -onetrip (see Section 3.37)
-altparam (see Section 3.66)
-assume dummy_aliases (see Section 3.9)
-assume noprotect_constants (see Section 3.13)
-f77rtl (see Section 3.39)
-mixed_str_len_arg (see Section 3.62)
-std, std95 (see Section 3.85)
-vms (see Section 3.98)
Linking, Loading, and Output File Naming -assume nounderscore (see Section 3.15)
-assume no2underscores (see Section 3.16)
-c (see Section 3.19)
-call_shared , -non_shared , -shared (see Section 3.20)
-l (see Section 3.57)
-l dir (see Section 3.58)
-l string (see Section 3.59)
-names keyword (see Section 3.65)
-o output (see Section 3.71)
-u (see Section 3.91)
-v (see Section 3.96)
-Wl, -xxx (see Section 3.99)
Also see Section 2.5.
Listing File -show code , -show include , -machine_code (see Section 3.82)
-source_listing (see Section 3.83)
-v (see Section 3.95)
-vms (applies to INCLUDE statements with /LIST or /NOLIST) (see Section 3.98)
Also see Appendix C.
Module and Include File Directory Searching -i dir , -noinclude (see Section 3.52)
-module directory (see Section 3.63),
Also see Section 2.1.3 (module files) and Section 2.1.4 (include files).
Miscellaneous -nohpf_main (TU*X ONLY) (see Section 3.68)
-norun (see Section 3.70)
-version (see Section 3.97)
-what (see Section 3.97)
Nonnative Unformatted Data File Conversion and Use -assume byterecl (see Section 3.7)
-convert keyword (see Section 3.30)
Also see Chapter 10.
Parallel HPF Execution Performance (TU*X ONLY) -hpf , -hpf n , -assume nozsize , -nearest_neighbor num , -nonearest_neighbor , -show hpf (see Section 3.50)
Parallel Directives Execution (TU*X ONLY) -mp (see Section 3.64)
-omp (see Section 3.74)
-assume cc_omp (see Section 3.8)
Performance Optimization (Nonparallel and Parallel) -align keyword (see Section 3.3)
-annotations keyword (see Section 3.4)
-arch keyword (see Section 3.5)
-assume noaccuracy_sensitive (see Section 3.12)
-assume dummy_aliases (see Section 3.9)
-fast (see Section 3.40)
-fpe n (see Section 3.44)
-fp_reorder ( -assume noaccuracy_sensitive ) (see Section 3.12)
-fprm keyword (see Section 3.46)
-inline type , -noinline (see Section 3.54)
-math_library keyword (see Section 3.61)
-om (see Section 3.73)
-o0 , -o1 , -o2 , -o3 , -o4 , -o , -o5 (see Section 3.72)
-pipeline (see Section 3.76)
-speculate keyword (TU*X ONLY) (see Section 3.84)
-synchronous_exceptions (see Section 3.86)
-transform_loops (see Section 3.89)
-tune keyword (see Section 3.90)
-unroll num (see Section 3.94)
Also see Section 5.1.2.
Preprocessor -cpp , -d name , -fpp (see Section 3.45), -i , -i dir , -k , -m , -p , -u name (see Section 3.31), -wp, -xxx (see Section 3.31.3)
Profiling, Feedback Files, and cord -p0 , -p1 or -p , -pg (see Section 3.77)
-gen_feedback , -feedback file , -cord (TU*X ONLY) (see Section 3.41)
Record Output -assume buffered_io (see Section 3.6)
-ccdefault keyword (see Section 3.21)
Recursion and Data Storage -automatic , -static (see Section 3.18)
-recursive (see Section 3.79)
Run-Time Messages and Checking -check arg_temp_created , (see Section 3.22)
-c , -check bounds (see Section 3.23)
-check noformat (see Section 3.24)
-check nooutput_conversion (see Section 3.27)
-check overflow (see Section 3.28)
-check nopower (see Section 3.25)
-check underflow (TU*X ONLY) (see Section 3.29)
-fpe n (see Section 3.44)
-synchronous_exceptions (see Section 3.86)
Also see the options related to "Floating-point exceptions, rounding, and accuracy" in this table.
Shared Access to Data -granularity keyword , (see Section 3.49)
Source Form and Column Use -d_lines (see Section 3.33)
-extend_source (see Section 3.36)
-fixed , -free (see Section 3.42)
-pad_source (see Section 3.75)
Threaded Applications -granularity keyword , (see Section 3.49)
-pthread (TU*X ONLY) (see Section 3.88)
-reentrancy keyword (see Section 3.80)
-threads (TU*X ONLY) (see Section 3.88)
VMS Run Time -vms (see Section 3.98)
Warning Messages at Compile Time -error_limit num , -noerror_limit (see Section 3.35)
-v (see Section 3.96)
-warn keyword
-w1 (see Section 3.100)
-warning_severity (see Section 3.101)

3.3 -align keyword --- Data Alignment

Use the -align keyword options to control the alignment of fields associated with common blocks, derived-type structures, and record structures.

If you omit the -align keyword , -fast , and -vms options:

Although Compaq Fortran always aligns local data items on natural boundaries, certain data declaration statements and unaligned arguments can force unaligned data.

Note

For optimal performance on Alpha systems, make sure your data is aligned naturally (see Section 5.4).

The compiler issues messages when it detects unaligned data (unless you specify -warn noalignments ). For information about the causes of unaligned data and detection at run time, see Section 5.4, Data Alignment Considerations.

If necessary, you can specify either -align records or -align norecords on the same command line as one of the following: -align nocommons , -align commons , or -align dcommons . For example:


% f90 -align dcommons -align norecords main.f90

If you specify -fast and omit the -align keyword options, the compiler uses:
-align dcommons -align records -align sequence

If you specify -vms and omit the -fast and -align keyword options, the compiler uses:
-align commons -align norecords -align nosequence

If no -align option is specified, the default is -align records , which is the same as specifying -align rec8byte .

The following options apply:

-align all

Tells the compiler to add padding bytes wherever possible to obtain the natural alignment of data items in common blocks and structures.

-align all essentially turns on these options: -align nocommons , -align dcommons , -align records , -align sequence , -align norec1byte , -align norec2byte , -align norec4byte , and -align norec8byte .

-align commons

Aligns the data items of all common blocks on natural boundaries up to 4 bytes. The default is -align nocommons .

-align dcommons

Aligns the data items of all common blocks on natural boundaries up to 8 bytes instead of the default byte boundary.

The default is -align nodcommons .

If your command line includes the -std , -std90 , or -std95 options, then the compiler ignores -align dcommons . See Section 3.85.

-align none

Tells the compiler not to add padding bytes anywhere in common blocks or structures.

-align none essentially turns on these options: -align nocommons , -align nodcommons , -align norecords , -align nosequence , -align norec1byte , -align norec2byte , -align norec4byte , and -align norec8byte .

-align recNbyte

Aligns fields of records and components of derived types on the smaller of the size boundary specified (N can be 1, 2, 4, or 8) or the boundary that will naturally align them.

Specifying -align recnbyte does not affect whether common blocks are naturally aligned or packed.

-align norecords

Aligns fields witin record structures and components of derived types on the next available byte boundary instead of the default natural boundaries.

The default is -align records , which requests alignment of the fields of all derived-type data and RECORD data blocks on natural boundaries up to 8 bytes.

-align sequence

Tells the compiler that components of derived types with the SEQUENCE attribute will obey whatever alignment rules are currently in use. The default alignment rules align unsequenced components on natural boundaries.

The default value of -align nosequence means that components of derived types with the SEQUENCE attribute will be packed, regardless of whatever alignment rules are currently in use.

Specifying -fast sets -align sequence so that components of derived types with the SEQUENCE attribute will be naturally aligned for improved performance. Specifying -align all also sets -align sequence . If your command line includes the -std , -std90 , or -std95 options, then the compiler ignores -align sequence . See Section 3.85.

For More Information:

3.4 -annotations keyword --- Place Optimization Information in Source Listing

The -annotations keyword option specifies that annotations will be added to the source listing file. These annotations indicate which of a set of optimizations the compiler applied to particular parts of the source file. Note that some of the values of keyword below may exist for optimizations that are not supported on your platform. If so, the source listing file contains no corresponding annotations.

You can view the resulting annotations in the source listing file to see what optimizations the compiler performed or why the compiler was not able to optimize a particular code sequence.

The default is -noannotations , which places no annotations in the source listing file.

The -annotations option requires a keyword.

The following options apply:

-annotations none

Same as -noannotations , which is the default value.

-annotations all

Selects all of the annotations.

-annotations code

Annotates the machine code listing with descriptions of special instructions used for prefetching, alignment, and so on.

-annotations detail

Provides, where available, an additional level of annotation detail.

-annotations feedback

Annotates the source listing if profile-directed feedback optimizations were used.

-annotations inlining

Indicates where code for a called procedure was expanded inline.

-annotations loop_transforms

Indicates where advanced loop nest optimizations have been applied to improve cache performance (unroll and jam, loop fusion, loop interchange, and so on).

-annotations loop_unrolling

Indicates where a loop was unrolled (contents expanded multiple times).

-annotations prefetching

Indicates where special instructions were used to reduce memory latency.

-annotations shrinkwrapping

Annotates the source listing if code establishing routine context was removed.

-annotations software_pipelining

Indicates where instructions have been rearranged to make optimal use of the processor's functional units. See Section 5.8.6, Software Pipelining.

-annotations tail_calls

Indicates an optimization where a call from one routine to another can be replaced with a jump.

-annotations tail_recursion

Indicates an optimization that eliminates unnecessary routine context for a recursive call.

3.5 -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 run time.

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

BWX - Byte/Word manipulation instructions
MAX - Multimedia instructions
FIX - Square root and floating-point conversion
CIX - Count

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

The following options apply:

-arch generic

Generates instructions that are appropriate for most Alpha processors. 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 instructions for the machine the compiler is running on (for example, ev56 instructions on an ev56 processor and ev4 instructions on an ev4 processor).

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

-arch ev4

Generates instructions for ev4 processors (for 21064, 20164A, 21066, and 21068 chips).

Applications compiled with this option will not incur any emulation overhead on any Alpha processor.

-arch ev5

Generates instructions for ev5 processors (some 21164 chips that use only the base set of Alpha instructions, with no extensions).

Applications compiled with this option will not incur any emulation overhead on any Alpha processor.

-arch ev56

Generates instructions for ev56 processors (the 21164 chips that use the BWX extension).

This option permits the compiler to generate any ev4 instruction plus any instruction contained in the BWX extension.

Applications compiled with this option might incur emulation overhead on ev4 and ev5 processors, but will still run correctly.

-arch pca56

Generates instructions for pca56 processors (21164PC chips).

This option permits the compiler to generate any ev4 instruction plus any instruction contained in the BWX or MAX extension.

Applications compiled with this option may incur emulation overhead on ev4, ev5, and ev56 processors, but will still run correctly.

-arch ev6

Generates instructions for ev6 processors (21264 chips).

This option permits the compiler to generate any ev6 instruction, including instructions contained in the BWX, MAX, and FIX extensions.

Applications compiled with this option may incur emulation overhead on ev4, ev5, ev56, and pca56 processors, but will still run correctly.

-arch ev67

Generates instructions for ev67 processors (21264A chips).

This option permits the compiler to generate any ev67 instruction, including instructions contained in the BWX, MAX, FIX, and CIX extensions. Applications compiled with this option may incur emulation overhead on ev4, ev5, ev56, ev6, and pca56 processors, but will still run correctly.

3.6 -assume buffered_io --- Buffered Output

Use the -assume buffered_io option so that, at run time, 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 run-time library routines move it to the files and empty the buffers.

The default value is -assume nobuffered_io . Its effect is to have the run-time library routines move data to sequential disk files immediately.

For More Information:

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

Specifying the -assume byterecl option:

The default is -assume nobyterecl .

For More Information:

3.8 -assume cc_omp --- Enable Conditional Compilation for OpenMP

(TU*X ONLY) This option enables conditional compilation as defined by the OpenMP Fortran API. (When !$space appears in free-form source or !$spaces appears in column 1 of fixed-form source, the rest of the line is accepted as a Fortran line.)

If -omp is specified, the default is -assume cc_omp ; otherwise, the default is -assume nocc_omp .

3.9 -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.

The default is -assume nodummy_aliases .

For More Information:

3.10 -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.11 -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 90/77 standard semantics in the SIGN intrinsic to treat -0.0 and +0.0 as 0.0.

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

Specifying -assume noaccuracy_sensitive 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 ( -assume accuracy_sensitive ) because of the way intermediate results are rounded.

The -assume noaccuracy_sensitive and -fp_reorder options are synonymous.

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

The default is -assume accuracy_sensitive or -no_fp_reorder (unless -fast was specified).

For More Information:

3.13 -assume noprotect_constants --- Remove Protection from Constants

The -assume noprotect_constants option tells the compiler to pass a copy of a constant actual argument. As a result, the called routine can modify this copy, even though the Fortran standard prohibits such modification. The calling routine does not modify the constant.

The default is -assume protect_constants , which results in passing of a constant actual argument. Any attempt to modify it results in an error.

3.14 -assume nosource_include --- INCLUDE file search

This option determines where the compiler searches for INCLUDE files.

If you specify -assume nosource_include , the compiler searches the default directory for INCLUDE files (the same as if -vms is used).

The default is -assume source_include , which instructs the compiler to search the directory where the source files are located.

3.15 -assume nounderscore --- Underscore on External Names

Specifying -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.

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

The default is -assume underscore , in which case Compaq Fortran appends an underscore to calls to most external names.

3.16 -assume no2underscores --- Two Underscores on External Names

(L*X ONLY) Specifying -assume no2underscores prevents the compiler from appending two underscores ( __ ) 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.

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

The default is -assume 2underscores , in which case Compaq Fortran appends two underscores to calls to most external names.

If -assume nounderscore is specified, -assume 2underscores and -assume no2underscores are ignored.

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

(TU*X ONLY) The -assume pthreads_lock 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, use this option to set _OtsPthreadLock , which locks out other pthreads in addition to all critical sections.

The default is -assume 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.18 -automatic, -static --- Local Variable Allocation

The -automatic and -static options control how local variables are allocated.

Specifying -automatic puts local variables on the run-time stack. Specifying -automatic sets -recursive .

Specifying -static causes all local variables to be statically allocated.

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

The default is -static or -noautomatic .

3.19 -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.20 -call_shared, -non_shared, -shared --- Shared Library Use

These options relate to shared libraries.

The default is -call_shared .

The following options apply:

-call_shared

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

Requests that the linker search only in archive libraries ( .a files) for unresolved references; shared library ( .so ) files are not searched. Object files ( .o suffix) from archives are included in the executable produced.

-shared

Produces a dynamic shareable object that can be included into a shared library. This includes creating all of the tables for run-time linking and resolving references to other specified shared objects. The object created can be used by the linker to produce a shareable object 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 when you use -shared , a .o file is created; otherwise, a .so file is created.

For More Information:

3.21 -ccdefault keyword --- Carriage Control for Terminals

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

The following options apply:

-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

Results in one line feed between records.

-ccdefault none

Results in no carriage-control processing.

-ccdefault default

Specifies that the compiler is to use the default carriage-control setting. This is the default value of -ccdefault .

This default setting can be affected by the -vms option as follows:

3.22 -check arg_temp_created --- Check for Copy of Temporary Arguments

Specifying -check arg_temp_created generates code to check if actual arguments are copied into temporary storage before routine calls. If a copy is made at run time, an informative message is displayed.

The default is -check noarg_temp_created .

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

Specifying -check bounds or -c or -check_bounds (all are synonymous) generates code to perform run-time checks on array subscript and character 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.24 -check format --- Format Mismatches at Run Time

Specifying -check format issues the run-time FORVARMIS fatal error when the data type of an item being formatted for output does not match the format descriptor being used (for example, a REAL*4 item formatted with an I edit descriptor).

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.) Specifying -check noformat allows such format mismatches as a REAL*4 item formatted with an I edit descriptor.

If you specify the -vms option, the default is -check format . Otherwise, the default is -check noformat .

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

Specifying -check nopower allows certain arithmetic expressions containing floating-point numbers and exponentiation to be evaluated and return a result rather than causing 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.

The default is -check power , which means that for such expressions, an exception occurs, error message number 65 is displayed, and the program stops.

3.26 -check omp_bindings --- OpenMP Fortran API Binding Rules Checking

(TU*X ONLY) Specifying -check omp_bindings 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:

Additionally, the following conditions apply:

The default is -check noomp_bindings .

For More Information:

3.27 -check output_conversion --- Truncated Format Mismatches at Run Time

Specifying -check output_conversion issues the run-time OUTCONERR continuable error message when a data item is too large to fit in a designated format descriptor field. The field is filled with asterisks (*) and execution continues.

Specifying -check nooutput_conversion disables the run-time message (number 63) associated with format truncation. 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 specify the -vms option, the default is -check output_conversion . Otherwise, the default is -check nooutput_conversion .

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

Specifying -check overflow requests 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.

The default is -check nooverflow .

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

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

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 on program completion.

The default is -check nounderflow .

For More Information:

3.30 -convert keyword --- Unformatted Numeric Data Conversion

The -convert keyword options determine which format is used to read and write unformatted files.

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 data format for specific unit numbers by using the OPEN statement CONVERT specifier or by setting the appropriate FORT_CONVERTn environment variable.

The default is -convert native .

The following options apply:

-convert big_endian

Specifies that unformatted data will be in big endian format of the appropriate size:
INTEGER*1, INTEGER*2, INTEGER*4, or INTEGER*8
IEEE floating point format for REAL*4, REAL*8, REAL*16, COMPLEX*8, COMPLEX*16, or COMPLEX*32

Note that INTEGER*1 data is the same for little endian and big endian.

-convert cray

Specifies that unformatted data will be in big endian format of the appropriate size:
INTEGER*1, INTEGER*2, INTEGER*4, or INTEGER*8
CRAY floating-point format for REAL*8 or COMPLEX*16

-convert fdx

Specifies that unformatted data will be in little endian format of the appropriate size:
INTEGER*1, INTEGER*2, INTEGER*4, or INTEGER*8
Compaq VAXtm floating-point format F_floating for REAL*4 or COMPLEX*8, D_floating for REAL*8 or COMPLEX*16, and X_floating for REAL*16 or COMPLEX*32

-convert fgx

Specifies that unformatted data will be in little endian format of the appropriate size:
INTEGER*1, INTEGER*2, INTEGER*4, or INTEGER*8
Compaq VAX floating-point format F_floating for REAL*4 or COMPLEX*8, G_floating for REAL*8 or COMPLEX*16, and X_floating for REAL*16 or COMPLEX*32

-convert ibm

Specifies that unformatted data will be in big endian format of the appropriate size:
INTEGER*1, INTEGER*2, or INTEGER*4
IBM System\370 floating-point format for REAL*4 or COMPLEX*8 (IBM short 4) and for REAL*8 or COMPLEX*16 (IBM long 8)

-convert little_endian

Specifies that unformatted data will be in native RISC little endian format of the appropriate size:
INTEGER*1, INTEGER*2, INTEGER*4, or INTEGER*8
IEEE floating-point format for REAL*4, REAL*8, REAL*16, COMPLEX*8, COMPLEX*16, or COMPLEX*32

Note that INTEGER*1 data is the same for little endian and big endian.

Using -convert little_endian produces the same results as -convert native .

-convert native

Specifies that unformatted data should not be converted.

This is the default.

-convert vaxd

Specifies that unformatted data will be in little endian format of the appropriate size:
INTEGER*1, INTEGER*2, INTEGER*4, or INTEGER*8
Compaq VAX floating-point format F_floating for REAL*4 or COMPLEX*8, D_floating for REAL*8 or COMPLEX*16, and H_floating for REAL*16 or COMPLEX*32

-convert vaxg

Specifies that unformatted data will be in little endian format of the appropriate size:
INTEGER*1, INTEGER*2, INTEGER*4, or INTEGER*8
Compaq VAX floating-point format F_floating for REAL*4 or COMPLEX*8, floating-point format G_floating for REAL*8 or COMPLEX*16, and H_floating for REAL*16 or COMPLEX*32

For More Information:

3.31 -cpp and Related Options --- Run C Preprocessor

Specifying -cpp runs the C preprocessor cpp on all Fortran source files before compiling.

The default is -nocpp .

The following cpp macros are defined by the f90 command when any .f90 , .f90 , .f , .f , .for , or .FOR file is being compiled:

LANGUAGE_FORTRAN_90 (UN*X ONLY)
__LANGUAGE_FORTRAN_90__ (UN*X ONLY)
LANGUAGE_FORTRAN (UN*X ONLY)
__LANGUAGE_FORTRAN__ (UN*X ONLY)
linux (L*X ONLY)
__linux__ (L*X ONLY)
__alpha
__osf__ (UN*X ONLY)
unix (UN*X ONLY)
__unix__ (UN*X ONLY)
__OPENMP if -omp is specified (UN*X ONLY)

If you omit -cpp and -p , the cpp preprocessor is not run unless the file name suffix is .f or .for (for fixed-form source files) or .f90 (for free-form source files).

If you specify -cpp or -p , you can also specify these options:

For More Information:

3.31.1 -M --- Request cpp Dependency Lists for make

Specifying -m requests that cpp generate dependency lists suitable for make , instead of the normal output.

3.31.2 -P --- Retain cpp Intermediate Files

Specifying -p runs only the cpp preprocessor and puts the result for each source file in an intermediate file, after processing by any appropriate preprocessors. The intermediate file does not have line numbers (#) in it.

The following naming convention is used: .f file results are put into .i files. .f90 file results are put into .i90 files.

This option sets the -cpp option.

3.31.3 -Wp,-xxx --- Pass Specified Option to cpp

The -wp,-xxx option allows you to pass an option (specified by xxx) directly to the cpp preprocessor. This is useful for options that the driver does not normally pass to the preprocessor.

For example, to pass -C -M to cpp , use:


-Wp,-C,-M 

The -wp option does not invoke cpp . Use -cpp to invoke cpp .

3.32 -Dname, -Dname=def, -Dname="string" --- Define Symbol Names

Specifying -dname or -dname=def or -dname="string" defines name for use by either the cpp preprocessor or by Fortran conditional compilation.

When name=def is used for Fortran conditional compilation, def can be an integer string or a character string delimited by double quotation marks as in -dvehicle_type="red convertible" . When name=def is used for the cpp preprocessor, the definition is interpreted as if by #define . Regardless of the usage, if no definition is given, then name is defined as "1".

For example:


% f90 -Dnum=4 -Dber -Dclock="the time" foo.f90

In this example, num is the integer 4, ber is "1", and clock is the string "the time".

Preprocessor symbols can be used for conditional compilation by using the cDEC$ IF directive construct (see the Compaq Fortran Language Reference Manual) or by using cpp . Predefined preprocessor symbols are defined in Section 3.31.

Specifying -nod prevents the compiler from receiving any -dname or -uname options. (The default is to allow the compiler to receive these options.) However, the cpp preprocessor always receives these options.

For More Information:

On the C preprocessor, see cpp(1).

3.33 -d_lines --- Debugging Statement Indicator, Column 1

Use the -d_lines option to request that lines in fixed-format source files that have a D or a d character in column 1 be compiled instead of treated as comment lines. Such lines might print the values of variables or otherwise provide useful debugging information.

The -d_lines option does not apply to free-format files.

The default ( -nod_lines ) treats all lines with a D or a d in column 1 as comment lines.

3.34 -double_size 128, -double_size 64 --- Double Precision Data Size

Use the -double_size 128 option to specify the size of DOUBLE PRECISION declarations, constants, functions, and intrinsics as REAL*16 and DOUBLE COMPLEX declarations, constants, functions, and intrinsics as COMPLEX*32.

The default is -double_size 64 , where DOUBLE PRECISION declarations, constants, functions, and intrinsics are specified as REAL*8 and DOUBLE PRECISION COMPLEX declarations, constants, functions, and intrinsics as COMPLEX*16.

3.35 -error_limit num, -noerror_limit --- Limit Error Messages

Use the -error_limit num and -noerror_limit options to specify the maximum number of error-level or fatal-level compiler errors allowed for a given file specified on the command line.

If -c is specified on the command line and the maximum number of errors is reached, a warning message is issued and the next file (if any) on the command line is compiled.

If -c is not specified, a warning message is issued and compilation terminates.

If you specify -noerror_limit , there is no limit on the number of errors that are allowed.

The default is -error_limit 30 , or a maximum of 30 error-level and fatal-level messages.

3.36 -extend_source --- Line Length for Fixed-Format Source

Specifying -extend_source treats the statement field of each source line as ending in column 132 instead of column 72.

The default ( -noextend_source or -col72 ) specifies 72-column lines.

Specifying -extend_source sets the -fixed option.

Specifying -extend_source or -col132 sets the source to fixed format even if implicit naming rules set it to free format.

For More Information:

3.37 -f66, -66, -nof77, -onetrip, -1 --- Use FORTRAN 66 Semantics

Specifying -f66 , -66 , -nof77 , -onetrip , or -1 (all are synonymous) tells the compiler to select FORTRAN 66 (FORTRAN IV) interpretations in cases of incompatibility.

This option applies the following FORTRAN 66 semantics:

The default is -nof66 , which specifies that FORTRAN 77 interpretation rules are used for those statements that have a meaning incompatible with FORTRAN 66. Thus, DO loops whose lower range exceeds the upper range will not be executed.

3.38 -f77, -nof66 --- Use FORTRAN 77 Semantics

Specifying -f77 or -nof66 (they are synonymous) enforces FORTRAN 77 semantics instead of FORTRAN 66 semantics.

In Fortran F90, the default is to apply Fortran 95/90 semantics.

3.39 -f77rtl --- Use Fortran 77 Run-Time Behavior

Specifying -f77rtl tells the compiler to create an executable file whose run-time behavior is that of Compaq Fortran 77 instead of Compaq Fortran.

Specifying this option controls control the following run-time behavior:

The default is -nof77rtl .

3.40 -fast --- Set Options to Improve Run-Time Performance

Specifying -fast sets the following options:

Avoid using the -fast option unless you understand the options that -fast sets. For example, the -fast option sets the -assume noaccuracy_sensitive and -math_library fast options, which can change the calculated results of a program.

Also, before you use -fast with the -hpf option, first make sure your program does not use any zero-sized arrays or array sections (see Section 3.50). And, while the setting of -arch host and -tune host generates optimal code for the computer architecture on which the compiler is running, this code may run slowly on another version of the computer architecture.

The default is -nofast .

3.41 -feedback file, -gen_feedback, -cord --- Create and Use Feedback Files

Note

These options apply only to Tru64 UNIX systems.

These options allow the creation and use of a feedback file, which can improve run-time performance. You can optionally use cord to rearrange procedures.

You create a feedback file by using a series of commands, including f90 with the -gen_feedback option, pixie (TU*X ONLY), and prof . (See Section 5.3.5.)

The options are:

-cord

Runs the cord procedure-rearranger cord after the linker creates the executable program. This rearrangement reduces the cache conflicts of the program's text. The output of cord is left in the file specified by the -o output option (or a.out by default). At least one -feedback file must be specified.

-feedback file

Specifies the file to be used by -cord or the compiler for further optimizations.

This file is produced by the prof command with its -feedback option from an execution of the program produced by the pixie command (TU*X ONLY).

-gen_feedback

Directs the compiler to generate code that will produce accurate feedback information when profiled.

For example:


f90 -gen_feedback -o x x.f 
pixie x 
x.pixie 
prof x -pixie -feedback x.fb x.Addrs x.Counts 
f90 -feedback x.fb -O5 -fast -o x x.f 

Using -gen_feedback changes the default optimization level from -o4 to -o0 . Avoid using -gen_feedback with optimizations higher than -o3 .

For More Information:

3.42 -fixed, -free --- Fortran Source Format

Use the -fixed and -free options to specify the source format:

-fixed

Specifies that the source file is fixed format, regardless of the file name suffix.

Note that source files with a suffix of .f , .for , .f , .for , or .i are assumed to be fixed format.

-free

Specifies that the source file is free format, regardless of the file name suffix.

Note that source files with a suffix of .f90 , .f90 , or .i90 are assumed to be free format.

You cannot specify both -free and -fixed on the same command line.

Table 3-2 summarizes how the -free and -fixed options interact with the file suffix of a source file.

Table 3-2 Interaction of File Suffix and the -free and -fixed Options on Source Form
Suffix -free Option -fixed Option Expected Source Form
.f90, .F90, .i90 Not specified Not specified Free form
.f90, .F90, .i90 Specified Not specified Free form
.f90, .F90, .i90 Not specified Specified Fixed form
.f, .F, .for, .FOR, .i Not specified Not specified Fixed form
.f, .F, .for, .FOR, .i Specified Not specified Free form
.f, .F, .for, .FOR, .i Not specified Specified Fixed form

For More Information:

3.43 -fpconstant --- Handling of Floating-Point Constants

Specifying -fpconstant requests that a single-precision constant assigned to a double-precision variable be evaluated in double precision.

If you omit -fpconstant , a single-precision constant assigned to a double-precision variable is evaluated in single precision. The Fortran standard requires that the constant be evaluated in single precision.

Certain programs created for FORTRAN-77 compilers (including Compaq Fortran 77) may show different results, because they rely on single-precision constants assigned to a double-precision variable to be evaluated in double precision.

In the following example, if you specify -fpconstant , identical values are assigned to D1 and D2. If you omit the -fpconstant option, Compaq Fortran will obey the standard and assign a less precise value to D1.


    REAL (KIND=8) D1, D2 
    DATA D1 /2.71828182846182/    ! REAL (KIND=4) value expanded to double 
    DATA D2 /2.71828182846182D0/  ! Double value assigned to double 

3.44 -fpen --- Control Arithmetic Exception Handling and Reporting

Use the -fpe0 , -fpe1 (TU*X ONLY), -fpe2 (TU*X ONLY), -fpe3 , or -fpe4 (TU*X ONLY) options to control floating-point exception handling at run time for the main program. This includes whether exceptional floating-point values are allowed and how precisely run-time exceptions are reported.

Using these options, you can do the following:

To associate an exception with the instruction that causes the exception, specify any value other than -fpe0 (or specify -synchronous_exceptions ).

(TU*X ONLY) Specifying -fpe2 or -fpe4 displays error messages indicating the cause of the exceptions.

To allow source line correlation when using a debugger to locate the exception, specify the -g option when compiling the program (see Chapter 4).

The default is -fpe0 or -fpe , which are synonymous.

The following options apply:

-fpe0, -fpe

Terminates a program if a floating-point operation results in overflow or division by zero, or if the operands are exceptional values. Before termination, a message is issued and a core dump file is created. If an operand is a denormalized number, it is set to zero.

In the case of floating-point underflow, the program does not terminate, but continues with the underflow value set to zero. On Tru64 UNIX systems, a warning message is issued if -check underflow is set.

Examining the core file shows the exception one or more instructions after the instruction that caused the exception (unless you also specified -synchronous_exceptions ).

To obtain the fastest run-time performance, use -fpe0 . This is the default. Using other -fpen values will slow run-time performance.

-fpe1

(TU*X ONLY) Continues program execution and generates an Infinity or Nan if a floating-point operation results in overflow, division by zero, or invalid data.

If an operand is a denormalized number, it is set to zero. In the case of floating-point underflow, the underflow value is set to zero. A warning message is issued if -check underflow is set.

-fpe2

(TU*X ONLY) Continues program execution if a floating-point operation results in overflow, division by zero, or invalid data. A warning message is generated for the first two occurrences. If an operand is a denormalized number, it is set to zero.

In the case of floating-point underflow, the underflow value is set to zero. On program completion, a count of how many times each exception occurred is displayed.

-fpe3

Continues program execution if a floating-point operation results in overflow, division by zero, invalid data, or underflow. Calculated denormalized numbers are left as is.

For underflow, the underflow value is not set to zero, and gradual underflow occurs. On Tru64 UNIX systems, a warning message is issued if -check underflow is set.

-fpe4

(TU*X ONLY) Continues program execution if a floating-point operation results in overflow, division by zero, invalid data, or underflow. A warning message is generated for the first two occurrences. Calculated denormalized numbers are left as is.

In the case of floating-point underflow, the underflow value is not set to zero and gradual underflow occurs. On program completion, a count of how many times each exception occurred is displayed.

3.44.1 Hints on Using These Options

Table 3-3 summarizes the floating-point exception handling options.

Table 3-3 Summary of Floating-Point Exception Command-Line Options
Option Handling of Underflow Handling of Overflow, Division by Zero, and Invalid Data
-fpe0 , -fpe Sets any calculated denormalized value (result) to zero and lets the program continue. Use of a denormalized number in an arithmetic expression uses a value of zero and execution continues.

(TU*X ONLY) A message is displayed only if -check underflow is also specified.

Exceptional values are not allowed. The program terminates after displaying a message and creating a core dump file.
-fpe1
(TU*X ONLY)
Sets any calculated denormalized value to zero and lets the program continue. Use of a denormalized number in an arithmetic expression uses a value of zero and execution continues. A message is displayed only if -check underflow is also specified. The program continues (no core dump). No message is displayed. A NaN or Infinity (+ or --) exceptional value is generated.
-fpe2
(TU*X ONLY)
Sets any calculated denormalized value to zero and lets the program continue. Use of a denormalized number in an arithmetic expression uses a value of zero and execution continues. A message is displayed ( -check underflow is not needed). The program continues (no core dump). A message is displayed a maximum of twice for each type of exception. A NaN or Infinity (+ or --) is generated.
-fpe3 Leaves any calculated denormalized value as is. The program continues, allowing gradual underflow. Use of a denormalized number in an arithmetic expression results in program continuation, but with slower performance.

(TU*X ONLY) A message is displayed only if -check underflow is also specified.

The program continues (no core dump). No message is displayed. A NaN or Infinity (+ or --) is generated.
-fpe4
(TU*X ONLY)
Leaves any calculated denormalized value as is. The program continues, allowing gradual underflow. Use of a denormalized number in an arithmetic expression results in program continuation, but with slower performance. A message is displayed ( -check underflow is not needed). The program continues (no core dump). A message is displayed a maximum of twice for each type of exception. A NaN or Infinity (+ or --) is generated.

On Tru64 UNIX systems, the exception message reporting specified by the -fpen options applies only to the main program and cannot be changed during program execution.

To help you debug a routine, you can associate an exception with the instruction that causes it by specifying any value other than -fpe0 (such as -fpe3 ) or specify -synchronous_exceptions .

When compiling different routines in a program separately, you should use the same -fpen value. For example, assume:

If routine A passes an exceptional value to routine B and routine B uses that exceptional value in an arithmetic expression, program execution stops and a core file is created.

You can call the for_set_fpe routine to set the floating-point exception handling for subprograms (including C functions) or perhaps to change the setting for the main program.

To use for_set_fpe in most cases, you should recompile the program with -fpe1 or higher. You should not change the exception settings to request program continuation with for_set_fpe if you compiled the program using -fpe0 .

Both the for_set_fpe and for_get_fpe routines can be used by Fortran programs using the INTEGER parameter values located in /usr/include/for_fpe_flags.f . Programs written in C can call the for_rtl_init_ routine prior to calling the for_get_fpe or for_get_fpe routines, and must include an equivalent header file, /usr/include/for_fpe_flags.h .

For programs that use a number of denormalized values (such as those that allow gradual underflow with -fpe3 , the impact on run-time performance can be significant.

If you use the -math_library fast (or -fast ) option along with an -fpen option, the -fpen option is ignored when arithmetic values are evaluated by math library routines.

If you specify the -speculate all or -speculate by_routine options along with one of the -fpen options that request exception reporting, exceptions are not reported as expected (see Section 3.84).

For More Information:

3.45 -fpp --- Run Fortran Preprocessor

Use the -fpp option to run the Fortran preprocessor on all Fortran source files in the command line before the Fortran compiler executes. This option has no effect on any C source files in the command line. The Fortran preprocessor has a subset of the functionality of the C preprocessor (which the -cpp option invokes).

The default is -nofpp , which means that neither the Fortran preprocessor nor the C preprocessor runs on the Fortran source files in the command line.

3.46 -fprm keyword --- Control Floating-Point Rounding Mode

The -fprm nearest , -fprm dynamic (TU*X ONLY), -fprm chopped , and -fprm minus_infinity options allow you to control how rounding occurs during floating-point operations.

The rounding mode applies to each program unit being compiled.

The following options apply:

-fprm nearest

Causes the compiler to round results of floating-point operations toward the nearest representable value.

If the unrounded value is halfway between two representable values, the even value is chosen.

This is the default.

-fprm chopped

Causes the compiler to round results of floating-point operations toward zero.

-fprm minus_infinity

Causes the compiler to round results of floating-point operations toward the next smallest representative value.

-fprm dynamic

(TU*X ONLY) Allows run-time selection of a rounding mode. You can modify your program to:

When you call write_rnd , you can set the rounding mode to one of the following settings (see write_rnd(3)):

If you compile with -fprm dynamic and do not call write_rnd , the default setting ( -fprm nearest ) is used.

For the fastest run-time performance, avoid using -fprm dynamic .

For More Information:

3.47 -fuse_xref --- Cross-Reference Information for Compaq FUSE

Use the -fuse_xref option (TU*X ONLY) to request that Compaq Fortran generate a data file that the Compaq FUSE Database Manager uses to create a cross-reference database file. This improves the performance of the Compaq FUSE Call Graph Browser and Cross-Referencer, which use the database file for their operations.

3.48 -g0, -g1, -g2 or -g, -g3, -ladebug --- Traceback and Symbol Table Information

Use the -g0 , -g1 , -g2 , or -g , -g3 , and -ladebug options to control the amount of symbol table information in the object file.

If you intend to use the Compaq Ladebug debugger, specify the -ladebug option and one of the following: -g , -g2 , or -g3 .

The default is -g1 .

The following options apply:

-g0

Provides no traceback or symbol table information needed for debugging or profiling. Only symbol information needed for linking (global symbols) is produced. The size of the resulting object file is the minimum size.

-g1

Produces traceback information, which allows program counter to source file line correlation, but not symbol table information needed for debugging. Specifying -g1 produces the global symbol information needed for linking or profiling.

The object file size is somewhat larger than if -g0 was specified, but is smaller than if either -g2 or -g3 was specified.

This is the default.

-g2, -g

Produces the following:

If you use this option and do not specify an -on option, the default optimization level changes to -o0 , which disables nearly all optimizations to make debugging more accurate (the default optimization level is usually -o4 ). If you use this option and specify an -on option other than -o0 , a warning message is displayed.

-g2 and -g are synonymous.

-g3

Produces traceback information, symbol table information needed for symbolic debugging of optimized code, and global symbol information needed for linking or profiling. This option can provide additional debugging information to describe the effects of optimization, but debugging inaccuracies may occur as a result of optimizations.

-ladebug

Produces additional symbolic debugger information for the Compaq Ladebug debugger, if you specify -g , -g2 , or -g3 . This allows use of standard Fortran syntax when printing dynamic arrays using Compaq Ladebug, including array sections.

If you specify -g0 or -g1 (the default) with -ladebug , the -ladebug option is ignored.

For More Information:

3.49 -granularity keyword --- Control Shared Memory Access to Data

The -granularity keyword options allow you to control the size of shared data in memory 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 .

To be written from multiple threads, data must be naturally aligned and declared as VOLATILE (so it is not held in registers). To ensure alignment in common blocks, derived-type structures, and record structures, use the -align keyword option.

The following options apply:

-granularity byte

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

-granularity longword

Ensures that naturally aligned data of 4 bytes or greater can be accessed safely from different threads sharing access to that data in memory.

When this option is in effect, attempts to access smaller size data or misaligned data can result in data items that are inconsistently updated for multiple threads.

-granularity quadword

Ensures that naturally aligned data of 8 bytes can be accessed safely from different threads sharing data in memory.

When this option is in effect, attempts to access smaller size data or misaligned data can result in data items that are inconsistently updated for multiple threads.

For More Information:

3.50 -hpf, -hpf num, and Related Options --- Compile HPF Programs for Parallel Execution

Note

These options apply only to Tru64 UNIX systems.

-wsf is the nonpreferred synonym for -hpf .

-wsf num is the nonpreferred synonym for -hpf num .

Use the -hpf option to specify that the HPF program will be compiled to run in parallel on multiple processors using the Message Passing Interface (MPI).

If you omit the -hpf option, the executable program will run in a nonparallel (serial) run-time environment and HPF directives will only be checked for correct syntax.

The optional num parameter specifies the number of processors on which the program is intended to run, for example, -hpf 3 . If a number is not specified, the compiler generates code that can run on any number of processors. More efficient code is generated when num is specified.

When the HPF parallel programs are compiled with the -c option and linked separately, specify -hpf both when compiling and linking the program.

The following options are not compatible with the -hpf option: -cord , -double_size 128 , -feedback , -fpe1 , -fpe2 , -fpe3 , -fpe4 , -gen_feedback , -om , -omp , -p1 , and -pg .

The -check bounds option is compatible with the -hpf option only when the optional parameter num is set to 1.

When -hpf is used, the HPF target must be specified either by using the -hpf_target option or by setting the DECF90_HPF_TARGET environment variable. If neither is used, the driver will issue an error message and abort the compilation. See Section 3.50.5.

For More Information:

The following options are relevant to the -hpf option:

3.50.1 -assume bigarrays --- Run-time Checking for Distributed Small Array Dimensions

(UN*X ONLY) Specifying -assume bigarrays suppresses run-time checking for distributed small array dimensions. This allows for increased run-time performance and reduced compile time when using the -hpf option.

In programs compiled with both the -hpf and -assume bigarrays options, nearest-neighbor computations that reference small arrays will fail. An array is big enough if, for every dimension with BLOCK distribution, the shadow edge width is no bigger than the block size.

Specifying the -fast option sets the -assume bigarrays option.

The default is -assume nobigarrays .

3.50.2 -assume nozsize --- Omit Zero-Sized Array Checking

(UN*X ONLY) Specifying -assume nozsize suppresses run-time checking for zero-sized array sections. This allows for increased performance when using the -hpf option.

An array (or array section) is zero-sized when the extent of any of its dimensions takes the value zero or less than zero. When the -hpf option is specified, the compiler ordinarily inserts a series of checks to guard against irregularities (such as division by zero) in its internal computations that zero-sized arrays can cause. Depending on the particular application, these checks can cause noticeable (or even major) degradation of performance.

Specifying the -fast option sets the -assume nozsize option.

Avoid using the -assume nozsize option with -hpf when a program references any zero-sized arrays or array sections, because the resulting executable might fail to execute or might produce incorrect program results.

You can insert a run-time check into your program to ensure that a given line is not executed if an array or array section referenced there is zero-sized.

The default is -assume zsize .

3.50.3 -nearest_neighbor, -nearest_neighbor num, or -nonearest_neighbor --- Nearest Neighbor Optimization

Use the -nearest_neighbor option (TU*X ONLY) to enable the nearest neighbor parallel optimization. The compiler automatically determines the correct shadow-edge widths on an array-by-array, dimension-by-dimension basis.

This option is valid only if the -hpf option is specified.

Use the optional num field to specify the maximum width of the shadow edge, which limits how much extra storage the compiler can allocate for nearest-neighbor arrays.

When num is specified, the compiler will only recognize nearest-neighbor constructs that need shadow-edge widths less than or equal to the value of num .

If num is not specified, the compiler uses a num value of 10.

You can also set shadow-edge widths manually, using the !HPF$ SHADOW directive.

The -nonearest_neighbor option turns off the nearest-neighbor optimization. It is equivalent to specifying -nearest_neighbor with nn set to 0.

3.50.4 -show hpf --- Show HPF Parallelization Information

The -show hpf options (TU*X ONLY) show information about HPF parallelization by displaying the information to standard error and to the listing (if one is generated using the -v option). These options are valid only if the -hpf option is specified.

The -show option can take only one argument. However, the -show options can be combined by specifying -show multiple times. For example:


% f90 -hpf -hpf_target cmpi -show hpf_near -show hpf_punt foo.f90 

Specifying -show hpf selects a subset of the messages generated by all of the following -show hpf_* options. Try using -show hpf first, with the following variations only when a more detailed listing is needed.

The following options apply:

-show hpf_all, -show hpfinfo, -show wsfinfo

The -show hpf_all option is the same as specifying all the other -show hpf_* options.

The -show wsfinfo option is the nonpreferred synonym of -show hpfinfo .

-show hpf_comm

This instructs the compiler to display information about statements that cause interprocessor communication to be generated.

-show hpf_indep

This instructs the compiler to display information about the optimization of loops marked with the INDEPENDENT directive.

-show hpf_nearest

This instructs the compiler to display information about arrays and statements involved in optimized nearest-neighbor computations.

-show hpf_punt

This instructs the compiler to display information about distribution directives that were ignored and statements that were not handled in parallel.

-show hpf_temps

This instructs the compiler to display information about temporaries that were created at procedure interfaces.

3.50.5 -hpf_target --- Message Passing Protocol for Parallel Programs

This option specifies the message passing protocol to use between processors for programs running in parallel. The format is:


% -hpf_target cmpi | gmpi | smpi 

If this option is used, -hpf must also be set.

The following options apply:

-hpf_target cmpi

Causes the compiler to target Compaq MPI, a version of Message Passing Interface (MPI) specifically tuned for Alpha systems. Compaq MPI is distributed as a Compaq layered product. Compaq MPI supports only Memory Channel clusters and shared-memory (SMP) machines.

For more information about Compaq MPI, see:


http://www.compaq.com/hpc/software/dmpi.html 

-hpf_target gmpi

Causes the compiler to target generic Message Passing Interface (MPI), specifically MPICH 1.2.0 or other libraries compatible with that version of MPICH. MPICH is a public-domain implementation of the MPI specification that is available for many platforms. It can be obtained from:


http://www-unix.mcs.anl.gov/mpi/mpich/ 

MPICH supports many interconnection networks, including Ethernet, FDDI, and other hardware. Note: The use of the gmpi target is officially unsupported.

When you use this option, you should set the DECF90_GMPILIB environment variable to specify a path to the MPI library to link against. If you don't set the DECF90_GMPILIB environment variable, then you must specify the MPI library to link against on the command line.

-hpf_target smpi

Causes the compiler to target the Message Passing Interface (MPI) that comes installed on SC-series systems. It is used in conjunction with the SC's "RMS" software, which provides a set of commands for launching MPI jobs, scheduling those jobs on SC clusters, and other miscellaneous tasks.

3.51 -I --- Remove Directory from Include Search Path

Use the -i option to prevent the search for cpp and fpp #include files or to prevent Compaq Fortran from searching for files specified in an INCLUDE statement in the standard directory /usr/include .

This option is not related to the Fortran USE statement.

3.52 -Idir --- Add Directory for Module and Include File Search

Use the -idir option to direct the search for cpp and fpp #include files, files specified in an INCLUDE statement, and module files (USE statement). The file names must not begin with a slash (/).

If you use this option, directories are searched in the following order:

  1. The directory preceding the input file name on the command line
  2. The directory ( dir ) specified by the -idir option (see Section 3.52)
  3. The standard directory /usr/include

You can repeat the -idir option as many times as needed to specify multiple additional search directories.

To prevent the Compaq Fortran compiler from searching for include files in the /usr/include directory, use the -noinclude option.

For More Information:

3.53 -i2, -i4, -i8, -integer_size num --- Integer and Logical Data Size

Use the following options to control the size of INTEGER and LOGICAL declarations (where no kind parameter or size specifier is indicated).

For optimal performance on Alpha systems, use 4- or 8-byte integer or logical values instead of 2-byte values.

The default is -i4 or -integer_size 32 .

The following options apply:

-i2, -noi4, -integer_size 16

Specifying -i2 , -noi4 , or -integer_size 16 (all are synonymous) makes the default integer and logical variables 2 bytes long. That is, INTEGER and LOGICAL declarations are treated as INTEGER*2 (KIND=2) and LOGICAL*2 (KIND=2).

-i4, -integer_size 32

Specifying -i4 or -integer_size 32 makes default integer and logical variables 4 bytes long. That is, INTEGER and LOGICAL declarations are treated as INTEGER*4 (KIND=4) and LOGICAL*4 (KIND=4).

-i8, -integer_size 64

Specifying -i8 or -integer_size 64 makes default integer and logical variables 8 bytes long. That is, INTEGER and LOGICAL declarations are treated as INTEGER*8 (KIND=8) and LOGICAL*8 (KIND=8).

3.54 -inline keyword, -noinline --- Control Procedure Inlining

Specifying -inline keyword or -noinline controls the type of procedure calls that are inlined by the optimizer.

The following options apply:

-inline all

Inlines every call that can be inlined while still generating correct code, including:

-inline speed

Inlines calls that will likely improve run-time performance, even where it might significantly increase the size of the program.

This option is meaningful only at optimization levels -o1 and higher.

This is the default for optimization levels -o4 and -o5 .

-inline size

Inlines calls where inlining will not significantly increase program size, plus any additional calls that the compiler determines will improve run-time performance.

This option was previously called -inline automatic or -inline space .

This option is meaningful only at optimization levels -o1 and higher.

-inline none, -inline manual, -noinline

Suppresses all inlining of routines. However, statement functions are always inlined.

All three options are synonymous.

This is the default for optimization levels -o0 , -o1 , -o2 , and -o3 .

For More Information:

3.55 -intconstant --- Handling of Integer Constants

Specify this option to use Compaq Fortran 77 instead of Fortran 95/90 semantics to determine the kind of integer constants. If you don't specify -intconstant , Fortran 95/90 semantics are used.

With Fortran 77 semantics, all constants are kept internally by the compiler in the highest precision possible. For example, if you specify -intconstant , the compiler stores an integer constant of 14 internally as INTEGER(KIND=8) and converts the constant upon reference to the corresponding proper size. Fortran 95/90 specifies that integer constants with no explicit KIND are kept internally in the default INTEGER kind (KIND=4 by default).

Note that the internal precision for floating-point constants is controlled by the -fpconstant option, described in Section 3.43.

3.56 -K --- Keep Temporary Files

Specifying -k requests that temporary files created by cpp or the Compaq Fortran compiler not be automatically deleted.

This option does not affect the naming of temporary files. To see the names and locations of the temporary files, use the -v option.

Specifying -k also creates, in the current working directory, one temporary file for each input source file specified. This file creation may not be desirable when compiling multiple source files (see Section 2.1.6).

All other temporary files reside in /tmp , unless the environment variable TMPDIR is set to indicate an alternate directory.

3.57 -L --- Remove ld Directory Search Path

Use the -l option to prevent the linker from searching for libraries in the standard directories (see Section 3.58).

3.58 -Ldir --- Add Directory to ld Search Path

Use the -ldir option to specify the directory path dir as a search directory for ld , which is searched before the standard directories.

When you specify the -non_shared option, the following directories are searched:

When searching for shared libraries ( -call_shared or -shared ), the following directories are searched:

3.59 -lstring --- Add Library Name to ld Search

Use the -lstring option to specify additional search libraries for ld , using string as an abbreviation of the library name.

Using this option causes ld to search for unresolved references to run-time object files in the specified libraries, in addition to the appropriate Compaq Fortran libraries and related libraries (see Section 2.5.1).

This option should be placed after the file name(s) at the end of the command line.

You can use -lstring multiple times to specify multiple search libraries. The order in which the multiple libraries are specified determines the search order used by ld .

For example, specifying -lgraph causes ld to search the standard library directories (and any specified using the -ldir option) for the library libgraph .

To view libraries accessed during compile and link operation, use the -v option, described in Section 3.96.

For More Information:

3.60 -machine_code

See Section 3.82, -show keyword, -machine_code --- Control Listing File Content.

3.61 -math_library keyword --- Fast or Accurate Math Library Routines

The -math_library keyword option lets you choose which math library routines to use.

The default is -math_library accurate .

The following options apply:

-math_library accurate

Specifies that the compiler is to select the version of the math library routine that provides the most accurate result for mathematical intrinsic functions.

For certain ranges of input values, the selected routine may execute more slowly than if you used -math_library fast .

The standard math library routines are designed to obtain very accurate "near correctly rounded" results and provide the robustness needed to check for IEEE exceptional argument values, rather than achieve the fastest possible run-time execution speed. Using -math_library accurate allows user control of arithmetic exception handling with the -fpen option and the for_set_fpe routine.

-math_library fast

Specifies that the compiler is to select the version of the math library routine that provides the highest execution performance for certain mathematical intrinsic functions, such as EXP and SQRT.

For certain ranges of input values, the selected routine may not provide a result that is as accurate as -math_library accurate provides.

This option is set by default if you use the -fast option.

Using -math_library fast allows certain math library functions to get significant performance improvements when the applicable intrinsic function is used.

If you specify -math_library fast , the math library routines do not necessarily check for IEEE exceptional values and the -fpen option and calls to the for_set_fpe routine are ignored.

When you use -math_library fast , you should carefully check the calculated output from your program. Check the program's calculated output to verify that it is not relying on the full fractional accuracy of the floating-point data type1 to produce correct results or producing unexpected exceptional values (exception handling is indeterminate).

Programs that do not produce acceptable results with -math_library fast and single-precision data might produce acceptable results with -math_library fast if they are modified (or compiled) to use double-precision data.

The specific intrinsic routines that have special fast math routines depend on the version of the Compaq Tru64 UNIX operating system in use. Allowed error bounds vary with each routine.

For More Information:

Note

1 Single-precision S_float, double-precision T_float, and extended precision X_float data types provide 24, 53, and 113 bits respectively for the normalized fractional part (see Section 9.4.)

3.62 -mixed_str_len_arg --- Specify Length of Character Arguments

Use the -mixed_str_len_arg option to tell the compiler that the hidden length passed for a character argument is to be placed immediately after its corresponding character argument in the argument list.

The default is -nomixed_str_len_arg , which places the hidden lengths in sequential order at the end of the argument list.

3.63 -module directory --- Specify Directory for Creating Modules Files

The -module directory option tells the compiler to create module files in the specified directory instead of the current directory.

3.64 -mp --- Enable Parallel Processing Using Directed Decomposition

Use the -mp option (TU*X ONLY) to enable parallel processing using directed decomposition. Parallel processing is directed by inserting parallel directives using the !$PAR prefix in your source code. The compiler recognizes these directives only if you specify the -mp option. This kind of parallel processing is intended for shared-memory multiprocessor systems.

To enable parallel processing with with !$OMP directives, use the -omp compiler option.

To enable parallel processing across clusters of servers or workstations with !HPF$ directives, use the -hpf compiler option.

The -mp option sets the -automatic option.

The default is -nomp .

For More Information:

3.65 -names keyword --- Case Control of Source and External Names

The -names keyword option controls how the case sensitivity of letters in source code identifiers and external names is handled.

The naming convention applies whether names are being defined or referenced.

The default is -names lowercase .

The following options apply:

-names as_is, -U

Causes the compiler to distinguish case differences in identifiers and to preserve the case of external names.

The -names as_is and -u options are synonymous.

-names lowercase

Causes the compiler to ignore case differences in identifiers and to convert external names to lowercase.

-names uppercase

Causes the compiler to ignore case differences in identifiers and to convert external names to uppercase.

3.66 -noaltparam --- Alternative PARAMETER Syntax

Use the -noaltparam option to disallow the alternate nonstandard syntax for PARAMETER statements.

The nonstandard PARAMETER statement syntax is:


PARAMETER par1=exp1 [, par2=exp2] ... 

This form has no parentheses surrounding the list, and the form of the constant, rather than implicit or explicit typing, determines the data type of the variable.

The default is -altparam , which allows use of the nonstandard syntax.

3.67 -nofor_main --- Allow Non-Fortran Main Program

Use the -nofor_main option when the main program is not written in Fortran. For example, if the main program is written in C and calls a Compaq Fortran subprogram, specify -nofor_main when compiling the program with the f90 command. Specifying -nofor_main prevents linking for_main.o into applications.

If you omit -nofor_main , the main program must be a Fortran program.

The default is -for_main .

3.68 -nohpf_main, -nowsf_main --- Compile HPF Global Routine for Nonparallel Main Program

(TU*X ONLY) Use the -nohpf_main option (the -nowsf_main option is synonymous) to specify that the HPF global routine being compiled will be linked with a main program that was not compiled with the -hpf option. The main program can be a Fortran program compiled without -hpf , or it can be written in an entirely different language.

3.69 -noinclude --- Omit Standard Directory Search for INCLUDE Files

Specifying -noinclude prevents the compiler from searching in the /usr/include directory for files specified in an INCLUDE statement. This option does not apply to the directories searched for module files or preprocessor #include files.

To request that the cpp preprocessor not search for #include files in the /usr/include directory, use the -i option (see Section 3.51).

3.70 -norun --- Do Not Run the Compiler

Specifing the -norun option directs the driver not to execute the compiler and other phases of the process. If you use this option with the -v option, described in Section 3.96, you can see what would have been executed.

The default is for the driver to execute the compiler and other phases of the process.

3.71 -o output --- Name Output File

When you specify -c with -o output, this names the object file output instead of source-file-name.o in the current working directory.

If you omit -c and specify -o output, this names the executable program file output instead of a.out in the current working directory.

An already existing a.out file is unaffected by this command.

For More Information:

3.72 -O0, -O1, -O2, -O3, -O4 or -O, -O5 --- Specify Optimization Level

Use the -o0 , -o1 , -o2 , -o3 , -o4 (same as -o ), and -o5 options to specify the level of optimization performed during compilation.

The default level of optimization is -o4 unless you specify the -g2 , -g , or -gen_feedback option (in which case the default is -o0 ).

At optimization levels lower than -o4 , the compiler issues "uninitialized variable" warnings.

In most cases, the higher the level of optimization you specify, the faster the program will execute. However, the faster execution speeds that result from using -o3 or higher usually produce larger object files and longer compile times.

The following options apply:

-O0

Disables all optimizations. Does not check for unassigned variables.

If you specify -g2 or -g , this is the default.

-O1

Enables local optimizations and recognition of common subexpressions. Optimizations include integer multiplication and division expansion using shifts. The call graph determines the order of compilation of procedures.

-O2

Enables global optimization and all -o1 optimizations. This global optimization includes code motion, strength reduction and test replacement, split-lifetime analysis, code scheduling, and inlining of arithmetic statement functions.

-O3

Enables global optimizations that improve speed (at the cost of increased code size) and all -o2 optimizations. Optimizations include:

-O4, -O

Enables interprocedure analysis and automatic inlining of small procedures (with heuristics limiting the amount of extra code), software pipelining (also set by -pipeline , described in Section 3.76), and all -o3 optimizations.

This is the default. However, if you specify -g2 or -g or -gen_feedback , the default becomes -o0 .

-O5

Enables loop transformation optimizations (also set by -transform_loops , described in Section 3.89), all -o4 optimizations, and other optimizations, including byte vectorization and insertion of additional NOPs (No Operations) for alignment of multi-issue sequences. (See also Section 3.84.)

To determine whether using -o5 benefits your particular program, you should time program execution for the same program (or subprogram) compiled at levels -o4 and -o5 .

For More Information:

3.73 -om --- Request Nonshared Object Optimizations

(TU*X ONLY) Use the -om option with the -non_shared option to request certain code optimizations after linking, including NOP (No Operation) removal, .lita removal, and reallocation of common symbols. This option also positions the global pointer register so the maximum addresses fall in the global-pointer window.

Pass -om options to the linker using the -WL,arg form:

For more information, see your operating system documentation.

3.74 -omp --- Enable OpenMP Parallel Processing Using Directed Decomposition

(UN*X ONLY) Use the -omp option to enable parallel processing using directed decomposition following the OpenMP application program interface (API). Parallel processing is directed by inserting !$OMP directives in your source code. This kind of parallel processing is intended for shared-memory multiprocessor systems.

The !$OMP directives are described in Section 6.1.2, Summary Descriptions of OpenMP Fortran API Compiler Directives.

The -omp option sets the -automatic option.

The default is -noomp .

For More Information:

3.75 -pad_source --- Pad Short Source Records with Spaces

For fixed-form source files, specify the -pad_source option to request that source records shorter than the statement field width are to be padded with spaces on the right, out to the end of the statement field. This affects the interpretation of character and Hollerith literals that are continued across source records.

The default is -nopad_source . This causes a warning message to be displayed if a character or Hollerith literal that ends before the statement field ends is continued onto the next source record. To suppress this warning message, specify the -warn nousage option.

Specifying -pad_source can prevent warning messages associated with -warn usage .

3.76 -pipeline --- Activate Software Pipelining Optimization

Specifying -pipeline (or -o4 or -o5 ) activates the software pipelining optimization. The software pipelining optimization applies instruction scheduling to certain innermost loops, allowing instructions within a loop to "wrap around" and execute in a different iteration of the loop. This can reduce the impact of long-latency operations, resulting in faster loop execution.

Software pipelining is a subset of the optimizations activated by -o4 or -o5 . Instead of specifying both -pipeline and -transform_loops , you can specify -o5 .

This optimization is not performed at optimization levels below -o2 .

You must specify -nopipeline if you want this type of optimization disabled and you are also specifying -o4 or -o5 .

For More Information:

3.77 -p0, -p1 or -p, and -pg --- Profiling Support

Nonparallel programs (with the -hpf option omitted) and (TU*X ONLY) parallel HPF programs ( -hpf option specified) use different profiling tools, which need different profiling options. Profiling information identifies those parts of your program where improving source code efficiency would most likely improve run-time performance.

If you omit the -hpf option, you can use the prof and pixie (TU*X ONLY) tools if you specify the -p0 and -p1 or -p options to control the level of profiling support provided during compilation. When you specify -hpf , omit the -p0 , -p1 , and -p options.

The default is -p0 .

The following options apply:

-p0

Does not permit profiling. If loading occurs, the standard run-time startup routine (crt0.o) is used, and profiling libraries are not searched.

-p1, -p

Sets up profiling by periodically sampling the value of the program counter for use with the postprocessor prof(1).

This option only affects loading. When loading occurs, this option replaces the standard run-time startup routine option with the profiling run-time startup routine (mcrt0.o) and searches the level 1 profiling library ( libprof1 ).

When profiling occurs, the startup routine calls monstartup(3) and produces the file mon.out , which contains execution-profiling data for use with the postprocessor prof(1) command. (See also monitor(3).)

If you specify this option, you should also specify -g1 or higher.

-pg

Sets up profiling for gprof(1), which produces a call graph showing the execution of the program. With this option, the standard run-time startup routine is replaced by the gcrt0.o routine, and ld(1) inserts calls to _mcount at each entry label.

When programs are linked with the -pg option and then run, these files produced:

gmon.out contains a dynamic call graph and profile.
gmon.sum contains a summarized dynamic call graph and profile.

To display the output, run gprof on the gmon.out file.

For More Information:

3.78 -real_size number, -r8, -r16 --- Floating-Point Data Size

Use these options to control the size of REAL and COMPLEX declarations that do not have an explicit KIND parameter or size specifier.

The default is -real_size 32 .

The following options apply:

-real_size 32

Defines:

-real_size 64, -r8

Defines:

-real_size 128, -r16

defines:

If you omit -real_size_64 and -real_size 128 , then:

For More Information:

3.79 -recursive --- Request Recursive Execution

This option compiles all FUNCTION and SUBROUTINE procedures for possible recursive execution.

This option:

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

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 options).

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

The default is -norecursive .

3.80 -reentrancy keyword --- Control Use of Threaded Run-Time Library

(UN*X ONLY) The -reentrancy keyword option specifies whether code generated for the main program and any Fortran procedures it calls will be relying on threaded or asynchronous reentrancy.

To use the threaded libraries, also specify the -threads option (see Section 3.88).

The default is -reentrancy none . (The option -noreentrancy is the same as -reentrancy none .)

The following options apply:

-reentrancy asynch

Tells the Compaq Fortran run-time library (RTL) that the program may contain asynchronous handlers that could call the RTL. This causes the RTL to guard against asynchronous interrupts inside its own critical regions.

-reentrancy none

Tells the Compaq Fortran RTL that the program will not be relying on threaded or asynchronous reentrancy. Therefore, the RTL will not guard against such interrupts inside its own critical regions.

-reentrancy threaded

Tells the Compaq Fortran RTL that the program is multithreaded, such as programs using the POSIX threads library. This causes the RTL to use thread locking to guard its own critical regions.

3.81 -S --- Create Assembler File

Specifying -s creates an assembler file from the compiled source. The name of the assembler file is the base name of the source file with a .s file suffix. Linking does not occur.

3.82 -show keyword, -machine_code --- Control Listing File Content

Use the -show keyword options in conjunction with the -v option to control the amount of information in a listing file.

The following options apply:

-show code, -machine_code

Specifying -show code or -machine_code includes a machine-language representation of the compiled code if a listing file is being generated. This machine language cannot be assembled.

The default is -show nocode or -nomachine_code .

-show hpf

(TU*X ONLY) When used with the -hpf num option, specifying -show hpf shows information about HPF parallelization. For more information, see Section 3.50.4, -show hpf --- Show HPF Parallelization Information.

-show include

Specifying -show include lists the contents of any text file specified with INCLUDE in the source file if a listing is generated.

The default is -show noinclude .

-show nomap

Specifying -show nomap excludes information about the symbols used in the source program if a listing is generated.

The default is -show map .

If you omit these options, the listing file contains the minimum amount of information.

For More Information:

3.83 -source_listing --- Create a Source Listing File

Specifying -source_listing tells the compiler to create a listing file of the source program. The file also contains compiler-generated information such as that specified by the -v option. The name of the listing file is the base name of the source file with a .lis suffix.

The default is -nosource_listing .

3.84 -speculate keyword --- Speculative Execution Optimization

Specifying the -speculate all option (TU*X ONLY) or the -speculate by_routine option (TU*X ONLY) requests the compiler to perform speculative execution optimization on all routines in the application.

Speculation occurs when a conditionally executed instruction is moved to a position before a test instruction so that the moved instruction is then executed unconditionally. This reduces instruction latency stalls to improve run-time performance for certain applications or routines.

Speculative execution affects code most noticeably at optimization level -o3 and higher.

Performance improvements may be reduced because the run-time system must dismiss exceptions caused by speculative instructions. For certain applications, longer execution times may result. To determine whether using -speculate all or -speculate by_routine benefits your particular program, you should time program execution for the same program compiled with -speculate by_routine or -speculate all with -speculate none (default).

Any exception (for example, SIGSEGV, SIGBUS, or SIGFPE), anywhere in the entire program, is assumed to be speculative. All of these exceptions are quietly dismissed without calling any user-mode signal handler. If a module is compiled using -speculate all , it cannot be linked with any other module or library that does its own exception processing.

Since speculation turns off some run-time error checking, this option should not be used while debugging or while testing for errors.

The following options apply:

-speculate all

Perform speculative execution optimization on all routines in the program. All exceptions within the entire program are dismissed without calling any user-mode signal handler or reporting exceptions.

If a compilation unit is compiled with -speculate all , then it may not be linked with any other object or library that does its own exception processing. Do not use -speculate all if your program does any of the following:

-speculate by_routine

Specifies that speculative execution optimization should be performed on all routines in the current compilation unit (set of routines being compiled). However, other compilation units in the application will not be affected.

All exceptions within the routines being compiled with -speculate by_routine are quietly dismissed without calling any user-mode signal handler, but the object files created can be linked with other objects or libraries that perform exception processing. For example, using -speculate by_routine allows the Compaq Fortran Run-Time Library to report exceptions.

-speculate none, -nospeculate

Suppresses all speculative execution optimization.

The -speculate none and -nospeculate options are synonymous.

This is the default.

3.85 -std, -std90, -std95 --- Perform Fortran Standards Checking

Use these options to request that the compiler produce warnings for syntax that is not standard in the language.

If your command line includes any of these options, then the compiler ignores -align dcommons and -align sequence .

The default is -nostd .

The options are:

-std

Produces warnings for things that are not standard.

When -std is specified, the compiler being used determines the standard checked.

For example, on Tru64 UNIX systems, the Compaq Fortran compiler recognizes the following equivalencies:

f95 -std is the same as f90 -std95
f90 -std is the same as f90 -std90

On Linux systems, the Compaq Fortran compiler recognizes the following equivalency:

fort -std is the same as fort -std95

Source statements that do not conform to Fortran 90 or Fortran 95 language standards are detected by the Compaq 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 -std options do 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 Tru64 UNIX systems only, the -std options interact with the -hpf option (requests generation of parallel HPF code) as follows:

You should not specify both -std and -hpf .

-std90

Produces warnings for things that are not standard in the Fortran 90 language. This includes:

-std95

Produces warnings for things that are not standard in the Fortran 95 language. This includes all the checks performed by the -std90 option with the following exceptions:

For More Information:

On the Compaq Fortran language, see the Compaq Fortran Language Reference Manual.

3.86 -synchronous_exceptions --- Report Exceptions More Precisely

This option causes the compiler to generate TRAPB instructions after every floating-point instruction, resulting in precise exception reporting.

To use this option, you must also enable -fpe0 .

This is a very expensive but effective way to synchronize the instruction stream containing floating-point exceptions so the failing instruction can be accurately located by the debugger or a handler. You should use this option only when debugging a specific problem, such as locating the source of an exception.

If you omit the -synchronous_exceptions option and -fpe0 is in effect, exceptions can be reported one or more instructions after the instruction that caused the exception. If you specify -fpe1 , -fpe2 , -fpe3 , or -fpe4 , exceptions are reported precisely (this is the same as specifying -synchronous_exceptions ).

The default is -nosynchronous_exceptions .

3.87 -syntax_only --- Do Not Create Object File

The -syntax_only option specifies that the source file will be checked only for correct syntax. No code is generated, no object file is produced, and some error checking done by the optimizer is bypassed (for example, checking for uninitialized variables).

This option lets you do a quick syntax check of your source file.

The default is -nosyntax_only .

3.88 -threads, -pthread --- Link Using Threaded Run-Time Library

(UN*X ONLY) Specifying the -threads or -pthread option (they are synonymous) requests that the linker use threaded libraries. This is usually used with the -reentrancy threaded option (see Section 3.80).

3.89 -transform_loops --- Activate Loop Transformation Optimizations

Specifying -transform_loops (or -o5 ) activates a group of loop transformation optimizations that apply to array references within loops. These optimizations can improve the performance of the memory system and usually apply to multiply nested loops.

The loop transformation optimizations are a subset of optimizations activated by -o5 . Instead of specifying both -pipeline and -transform_loops , you can specify -o5 .

To determine whether using -transform_loops benefits your particular program, you should time program execution for the same program (or subprogram) compiled with and without loop transformation optimizations (such as with -transform_loops and -notransform_loops ).

For More Information:

3.90 -tune keyword --- Specify Alpha Processor Implementation

Use the -tune keyword option to specify the types of processor-specific instruction tuning for implementations of the Alpha architecture.

Regardless of the setting of -tune keyword option you use, the generated code runs correctly on all implementations of the Alpha architecture. Tuning for a specific implementation can improve run-time performance; it is also possible that code tuned for a specific Alpha processor may run more slowly on another Alpha processor.

If you omit -tune keyword , -tune generic is used.

When -arch name is specified and no -tune is specified, the following occurs: if -fast is specified, then -tune is host and -arch is name; if -fast is not specified, then both -tune and -arch are name.

If you set -tune to an architecture that has fewer features than what -arch specifies, the compiler will reset -tune to the same architecture as -arch .

The following options apply:

-tune generic

Generates and schedules code that will execute well for all implementations of the Alpha architecture. This provides generally efficient code for those cases where different processor generations are likely to be used.

This is the default.

-tune host

Generates and schedules code optimized for the implementation of the Alpha architecture in use on the system being used for compilation.

-tune ev4

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

-tune ev5

Generates and schedules code optimized for the 21164 implementation of the Alpha chip. This implementation of the Alpha architecture is faster and more recent than the implementations of the Alpha architecture associated with -tune ev4 (21064, 21064A, 21066, and 21068).

-tune ev56

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

-tune pca56

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

-tune ev6

Generates and schedules code optimized for the 21264 Alpha architecture implementations that use the byte and word manipulation instruction extensions, multimedia instruction extensions, and square root and floating-point convert extensions.

-tune ev67

Generates and schedules code optimized for the 21264A Alpha architecture implementations that use the byte and word manipulation instruction extensions, multimedia instruction extensions, square root and floating-point convert extensions, and count extensions.

For More Information:

3.91 -U --- Activates Case Sensitivity

This option causes the compiler to distinguish between uppercase and lowercase letters in identifiers and external names.

The -u option and -names as_is option are synonymous.

3.92 -Uname --- Undefine Preprocessor Symbol Name

Specifying -uname tells -cpp to remove the definition of name, such as a predefined symbol. Predefined preprocessor symbols are defined in Section 3.31.

3.93 -u

This option causes the compiler to produce messages about undeclared symbols.

The -u option is the same as -warn declarations .

3.94 -unroll num --- Specify Number for Loop Unroll Optimization

The -unroll num option sets the depth of loop unrolling done by the optimizer to num . num must be an integer in the range 0 through 16.

Specify this option only with -o3 or higher optimization levels, at which loop unrolling occurs.

If you omit -unroll num or specify -unroll 0 , the optimizer determines how many times loops are unrolled. Unless you specify a value, the optimizer will choose an unroll amount that minimizes the overhead of prefetching while also limiting code size expansion.

The option -nounroll is not allowed.

For More Information:

3.95 -V --- Create Listing File

Specifying -v creates a listing of the source file with various compile-time information appended. The name of the listing file is the base name of the file with the .l suffix.

A file name whose suffix is .l may conflict with lex . If you want the listing file to have the suffix .lis , then use the option -source_listing .

If you expect your program to get compilation errors, use -v to request a separate listing file or use the error command to insert the error messages into the appropriate place in your source program.

Using a listing file provides slightly more information and includes the column pointer (1) that indicates the exact part of the line that caused the error. Especially for large files, consider obtaining a printed copy of the listing file you can reference while editing the source file.

If you use -v without other options (such as -show code ), the listing file will not show the code of included source files or machine code and will not include a cross-reference table.

If a source line of length 1 contains a form-feed character, the source code listing begins a new page with the following line; the line containing the form-feed does not appear.

If a source line of length greater than 1 contains a form-feed character, that line is printed but the form-feed character is ignored (does not generate a new page).

Any other nonprinting ASCII characters encountered in source files are replaced by a space character, and a warning message appears.

If you compile several source files together and specify -v , a single listing file (using the name of the first input file) is created.

If you compile several source files one at a time and specify -v , multiple listing files are created.

The default is -nov .

For More Information:

3.96 -v --- Verbose Command Processing Display

Specifying -v displays the preprocessor (if requested), compiler, and linker passes as they execute, with their arguments and their input and output files, as well as final resource usage in the C shell time command format. The Compaq Fortran compiler is decfort90 , the C compiler is cc on Tru64 UNIX systems but ccc on Linux systems, the linker is ld , and so forth.

The default is -nov , which does not display any command processing information.

3.97 -version, -what --- Show Compaq Fortran Version Information

Specifying the -version (or -what ) option prints the version information of the Fortran driver and compiler.

If -version appears alone on the command line, the compiler is not executed.

The default is -noversion .

3.98 -vms --- OpenVMS Fortran Compatibility

Specifying -vms causes the run-time system to behave like Compaq Fortran on OpenVMS Alpha systems and VAX systems (VAX FORTRAN) in the following ways:

The default is -novms .

For More Information:

3.99 -Wl,-xxx --- Pass Specified Option to ld

The -Wl,-xxx option allows you to pass an option (specified by -xxx) directly to the ld linker.

For example, to set the linker -taso option (TU*X ONLY) to help port 32-bit programs that assume addresses can be stored into 32-bit variables, specify:

-wl,-taso

If the -xxx option takes an argument yyy, include yyy after the option separated by a comma.

For example:

-wl,-xxx,yyy

results in the passing of

-xxx yyy

to ld .

For another example, if you want to specify the linker option -VS 3, then a possible command is:


% f90 -Wl,-VS,3 test123.f90

For More Information:

On linker options, see ld(1).

3.100 -warn keyword, -u, -nowarn, -w, -w1 --- Warning Messages and Compiler Checking

You can prevent the display of some or all warning messages and request that additional compile-time checking be performed (can issue additional warning messages):

If you specify -syntax_only , some warning options are ignored (see Section 3.87).

The following options apply:

-warn noalignments

Disables warning messages about data that is not naturally aligned.

The default is -warn alignments .

To control alignment of common blocks, derived-type structures, and record structures, specify the -align keyword options.

-warn argument_checking

Enables warnings about mismatched procedure arguments. Specifying -warn argument_checking applies to calls with an implicit interface (such as routines declared as EXTERNAL).

The default is -warn noargument_checking .

When an explicit interface is present between calling and called procedures, warning messages about argument mismatches are reported whether or not you specify -warn argument_checking .

-warn declarations, -u

Sets the default type of a variable as undefined (IMPLICIT NONE), which enables warnings about any undeclared symbols. This behavior differs from default Fortran 95/90 rules.

The default is -warn nodeclarations .

-warn nogranularity

Disables warnings when the compiler cannot generate code for a requested granularity.

The default is -warn granularity .

-warn hpf

(TU*X ONLY) Tells the compiler to do both syntax and semantics checking on HPF directives.

The default vis -warn nohpf , unless -hpf is specified, in which case -warn hpf is assumed.

-warn ignore_loc

Enables warnings when %loc is stripped from an argument.

The default is -warn noignore_loc .

-warn truncated_source

Enables warnings at compile time about source characters to the right of column 72 (or column 132 if -extend_source is specified) in a non-comment line.

This option has no effect on truncation; lines that exceed the maximum column width are always truncated.

This option does not apply to free-format source files.

The default is -warn notruncated_source .

-warn nouninitialized

Disables warning messages for a variable used before a value could be assigned to it.

The default is -warn uninitialized .

-warn nogeneral, -nowarn, -w

Disables all warning messages.

The default is -warn general , which enables all warning messages.

The options -warn nogeneral , -nowarn , and -w are synonymous.

-warn nouncalled

Disables warning messages about a statement function that is never called.

The default is -warn uncalled .

-warn unused

Requests warning messages for variables that are declared but not used.

The default is -warn nounused or -w1 , which are synonymous.

-warn nousage

Disables warning messages about questionable programming practices which, although allowed, are often the result of programming errors. Examples are a continued character or Hollerith literal whose first part ends before the statement field and appears to end with trailing spaces.

The default is -warn usage .

3.101 -warning_severity keyword --- Elevate Severity of Warning Messages

Use this option to elevate warning-level messages to error-level status.

The default is -warning_severity warning , which leaves all compiler warning messages at warning-level status.

The following options apply:

-warning_severity error

Turns all compiler warning-level messages into error-level messages.

-warning_severity stderror

Turns all standards-checking compiler warning-level messages into error-level messages.

Standards checking is enabled when the -std option is specified.

3.102 -what

-what is the same as -version . See Section 3.97.

3.103 -wsf

-wsf is the nonpreferred spelling of -hpf . See Section 3.50.


Previous Next Contents Index