Compaq Fortran
User Manual for
Tru64 UNIX and Linux Alpha Systems


Previous Contents Index

2.6.5 Installing Shared Libraries (TU*X ONLY)

Once the shared library is created, it must be installed for private or system-wide use before you run a program that refers to it:

For complete information on installing shared libraries, see the Compaq Tru64 UNIX Programmer's Guide.


Chapter 3
f90 or fort Command Options

This chapter describes f90 and fort command options in detail.

As you read this chapter, remember that the f90 command invokes the Compaq Fortran compiler on Tru64 UNIX Alpha systems while the fort command invokes the Compaq Fortran compiler on Linux Alpha systems. This chapter uses the f90 command to indicate invoking the Compaq Fortran compiler on both systems, so replace this command with fort if you are working on a Linux Alpha system.

Also, remember that the cc command invokes the Compaq C compiler on Tru64 UNIX Alpha systems while the ccc command invokes the Compaq C compiler on Linux Alpha systems. This chapter uses the cc command to indicate invoking the Compaq C compiler on both systems, so replace this command with ccc if you are working on a Linux Alpha system.

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 4 characters or more).

3.1 f90 and fort Command Options and Categories

Table 3-1 lists the f90 and fort command options, their applicable categories, and the section in which they are described in detail.

Table 3-1 f90 and fort Command Options and Categories
Category Option Name and Section in this Manual
Assembler File -S (see Section 3.72)
Data Size -i2 , -i4 , -i8 , -integer_size num (see Section 3.46)
-r8 , -r16 , -real_size num , (see Section 3.69)
-double_size num , (see Section 3.29)
For a summary of available data types, see Chapter 9.
DEC FUSE Cross-Reference File -fuse_xref , (see Section 3.40) (TU*X ONLY)
Debugging and Symbol Table -d_lines (see Section 3.28)
-g0 , -g1 , -g2 , -g , -g3 , and -ladebug (see Section 3.41)
Also see Chapter 4.
Data Accuracy and Floating-Point Exceptions -assume noaccuracy_sensitive (see Section 3.12)
-check nopower (see Section 3.21)
-double_size num (see Section 3.29)
-fast (see Section 3.33)
-fpe n (see Section 3.37)
-fpconstant (see Section 3.36)
-fp_reorder (see Section 3.12)
-fprm keyword (see Section 3.39)
-intconstant (see Section 3.48)
-math_library keyword (see Section 3.53)
-r8 , -r16 , -real_size num (see Section 3.69)
-speculate keyword (TU*X ONLY) (see Section 3.74)
-synchronous_exceptions (see Section 3.76)
Language and Run-Time Compatibility -1 , -66 , -f66 , -onetrip (see Section 3.32)
-altparam (see Section 3.3)
-assume dummy_aliases (see Section 3.7)
-f77rtl (see Section 3.32.1)
-mixed_str_len_arg (see Section 3.54)
-std, std95 (see Section 3.75)
-vms (see Section 3.87)
Linking, Loading, and Output File Naming -assume nounderscore (see Section 3.13)
-c (see Section 3.15)
-call_shared , -non_shared , -shared (see Section 3.16)
-L (see Section 3.50)
-L dir (see Section 3.51)
-l string (see Section 3.52)
-names keyword (see Section 3.57)
-o output (see Section 3.61)
-U (see Section 3.81)
-v (see Section 3.85)
-Wl, -xxx (see Section 3.88)
Also see Section 2.5.
Listing File -show code , -show include , -machine_code (see Section 3.73)
-source_listing (see Section 3.73.1)
-V (see Section 3.84)
-vms (applies to INCLUDE statements with /LIST or /NOLIST) (see Section 3.87)
Also see Appendix C.
Module and Include File Directory Searching -I dir , -noinclude (see Section 3.45)
-module (see Section 3.55),
Also see Section 2.1.4 (module files) and Section 2.1.5 (include files).
Miscellaneous -hpf_matmul (TU*X ONLY) (see Section 3.43)
-nowsf_main (TU*X ONLY) (see Section 3.60)
-version (see Section 3.86)
-what (see Section 3.91)
Nonnative Unformatted Data File Conversion and Use -assume byterecl (see Section 3.6)
-convert keyword (see Section 3.25)
Also see Chapter 10.
Parallel HPF Execution Performance (TU*X ONLY) -wsf , -wsf n , -assume nozsize , -nearest_neighbor num , -nonearest_neighbor , -show hpf (see Section 3.92)
Parallel Directives Execution (TU*X ONLY) -mp (see Section 3.56)
-omp (see Section 3.64)
Performance Optimization (Nonparallel and Parallel) -align keyword (see Section 3.2)
-arch keyword (see Section 3.4)
-assume noaccuracy_sensitive (see Section 3.12)
-assume dummy_aliases (see Section 3.7)
-fast (see Section 3.33)
-fpe n (see Section 3.37)
-fp_reorder ( -assume noaccuracy_sensitive ) (see Section 3.12)
-fprm keyword (see Section 3.39)
-inline type , -noinline (see Section 3.47)
-math_library keyword (see Section 3.53)
-om (see Section 3.63)
-O0 , -O1 , -O2 , -O3 , -O4 , -O , -O5 (see Section 3.62)
-pipeline (see Section 3.66)
-speculate keyword (TU*X ONLY) (see Section 3.74)
-synchronous_exceptions (see Section 3.76)
-transform_loops (see Section 3.79)
-tune keyword (see Section 3.80)
-unroll num (see Section 3.83)
Also see Section 5.1.2.
Preprocessor -cpp , -D name , -fpp (see Section 3.38), -I , -I dir , -K , -M , -P , -U name (see Section 3.26), -Wp, -xxx (see Section 3.26.8)
Profiling, Feedback Files, and cord -p0 , -p1 or -p , -pg (see Section 3.67)
-pprof method (see Section 3.92.4)
-gen_feedback , -feedback file , -cord (TU*X ONLY) (see Section 3.34)
Record Output -assume buffered_io (see Section 3.5)
-ccdefault keyword (see Section 3.17)
Recursion and Data Storage -automatic , -static (see Section 3.14)
-recursive (see Section 3.70)
Run-Time Messages and Checking -C , -check bounds (see Section 3.18)
-check noformat (see Section 3.19)
-check nooutput_conversion (see Section 3.20)
-check overflow (see Section 3.23)
-check nopower (see Section 3.21)
-check underflow (TU*X ONLY) (see Section 3.24)
-fpe n (see Section 3.37)
-synchronous_exceptions (see Section 3.76)
Also see the options related to "Floating-point exceptions, rounding, and accuracy" in this table.
Shared Access to Data -granularity keyword , (see Section 3.42)
Source Form and Column Use -d_lines (see Section 3.28)
-extend_source (see Section 3.31)
-fixed , -free (see Section 3.35)
-pad_source (see Section 3.65)
Threaded applications -granularity keyword , (see Section 3.42)
-pthread (see Section 3.68)
-reentrancy keyword (see Section 3.71)
-threads (see Section 3.78)
VMS Run-Time -vms (see Section 3.87)
Warning Messages at Compile Time -error_limit num , -noerror_limit (see Section 3.30)
-v (see Section 3.85)
-warn keyword
-w1 (see Section 3.89)
-warning_severity (see Section 3.90)

3.2 -align keyword --- Data Alignment

The -align commons , -align dcommons , and -align norecords options control whether or not the compiler adds padding bytes to ensure the natural alignment of numeric data items in common blocks and 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.3).

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

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

-align all

Specifying -align all has the compiler add padding bytes wherever possible to obtain the natural alignment of numeric data items in common blocks and structures.

-align commons

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

-align dcommons

Specifying -align dcommons aligns the data items of all common blocks on natural boundaries up to 8 bytes, which exceeds the FORTRAN-77 standard. The default is -align nocommons .

-align none

Specifying -align none has the compiler add no padding bytes of numeric data items in common blocks and structures.

-align recNbyte

Specifying -align recNbyte requests that fields of records and components of derived types be aligned on the smaller of:

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

-align norecords

Specifying -align norecords requests that data items in all derived-type (user-defined) data and RECORD data blocks be packed on arbitrary byte 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 nosequence

Specifying -align sequence means that components of derived types with the SEQUENCE attribute will obey whatever alignment rules are currently in use. The default alignment rules align 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 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

For More Information:

3.3 -altparam --- Alternative PARAMETER Syntax

Use the -altparam option to determine how the compiler treats the alternative syntax for PARAMETER statements, which is:


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

This form does not have parentheses around the assignment of the constant to the parameter name. With this form, the type of the parameter is determined by the type of the expression being assigned to it and not by any implicit typing.

To allow use of the alternate, nonstandard syntax for PARAMETER statements, allow the default or specify -altparam . To disallow use of this syntax, specify the -noaltparam option.


Previous Next Contents Index