Compaq Fortran
User Manual for
Tru64 UNIX and Linux Alpha Systems


Previous Contents Index

3.38 -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 value is -nofpp which means that neither the Fortran preprocessor nor the C preprocessor runs on the Fortran source files in the command line.

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

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

-fprm nearest

This is the normal rounding mode, where results are rounded to the nearest representable value. If you omit other -fprm options, -fprm nearest is used.

-fprm chopped

Results are rounded toward zero (representative value).

-fprm minus_infinity

Results are rounded toward the next smallest representative value.

-fprm dynamic

(TU*X ONLY) Lets you set the rounding mode at run-time. 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 initial rounding mode is round toward nearest ( -fprm nearest ).

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

The rounding mode applies to each program unit being compiled.

For More Information:

3.40 -fuse_xref --- Cross-Reference Information for DEC FUSE

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

For More Information:

On DEC FUSE components, see the DEC Fuse Handbook.

3.41 -g0, -g1, -g2 or -g, -g3, -ladebug --- 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 (the default is -g1 ).

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

The following options apply (the default is -g1 ):

-g0

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

Specifying -g1 (the default) 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.

-g2 or -g

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

-g3

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

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

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

For More Information:

3.42 -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 declared as VOLATILE (so it is not held in registers) and naturally aligned. To ensure alignment in common blocks, derived-type structures, and record structures, use the -align keyword option.

-granularity byte

Requests 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. Accessing data items of three bytes or less and unaligned data may result in data items written from multiple threads being inconsistently updated.

-granularity quadword

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

For More Information:

3.43 -hpf_matmul --- Use Prior Version of MATMUL Intrinsic

Use the -hpf_matmul option (TU*X ONLY) to use matrix multiplication from an HPF library routine rather than the regular Compaq Fortran intrinsic code. The HPF library matrix multiplication routine is used only for nonparallel compilations.

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

Specifying -I prevents compiler from searching for #include files in the standard directory /usr/include . This option has no effect on the Fortran 95/90 USE statement but does affect the INCLUDE statement.

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

Use the -Idir option to specify an additional directory in which to search for module files (USE statement) and include (INCLUDE statement) files.

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.

This option also specifies additional directories for the cpp preprocessor to search for #include files.

For More Information:

3.46 -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):

-i2, -noi4, or -integer_size 16

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

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

-i4 or -integer_size 32

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

-i8 or -integer_size 64

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

The default is -i4 or -integer_size 32 .

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

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

-inline all

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

-inline space

The -inline space option is a synonym for -inline size .

-inline speed

Inlines procedures that improve run-time performance even where a significant increase in program size is likely. This type of inlining in the default when you specify -O4 (or -O ) or -O5 This option is meaningful only at optimization levels -O1 and higher.

-inline size

Inlines procedures that improve run-time performance in instances where inlining will not significantly increase program size. This option is meaningful only at optimization levels -O1 and higher.

-inline manual

Inlines statement functions but not other procedures (statement functions are always inlined). This type of inlining occurs when you specify -O2 or -O3 and omit -inline keyword options.

-inline none

Inlines statement functions but not other procedures (statement functions are always inlined). This type of inlining occurs when you specify -O0 or -O1 and omit -inline keyword options (same as -noinline ).

For More Information:

3.48 -intconstant --- Handling of Integer Constants

Specify the -intconstant option to use Compaq Fortran 77 rather than Fortran 95/90 semantics to determine the kind of integer constants. If you do not specify -intconstant , Fortran 95/90 semantics are used.

Fortran 77 semantics require that 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 not explicit KIND are kept internally in the default INTEGER kind (KIND=4 by default).

Similarly, the internal precision for floating-point constants is controlled by the -fpconstant option.

3.49 -K --- Keep Temporary Files

Specifying -K requests that temporary files created by cpp or the Compaq Fortran compiler not be automatically deleted. Temporary files reside in /tmp , unless the environment variable TMPDIR is set to indicate an alternate directory. Specifying -K also creates one temporary file for each input source file specified, which may not be desirable when compiling multiple source files (see Section 2.1.7).

3.50 -L --- Remove ld Directory Search Path

Use the -L option to prevent the linker from searching in the standard directories (see Section 3.51).

3.51 -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.52 -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 is usually placed after the file name(s) at the end of the command line.

You can use the -lstring option 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.

For More Information:

3.53 -math_library accurate or -math_library fast --- Fast or Accurate Math Library Routines

Specify -math_library fast to use a special version of certain math library routines that produce faster results, but with a slight loss of precision and less robust exception checking.

If you omit -math_library fast (and -fast ), the compiler uses the standard, very accurate math library routines for each Compaq Fortran intrinsic function, such as SQRT, EXP, LOG, LOG10, SIN, and COS.

-math_library accurate

Using -math_library accurate (default if you omit -fast ) produces the very accurate results and error checking expected of quality compiler products. It uses the standard set of math library routines for the applicable intrinsics.

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

Specifying -math_library fast (default if you specify -fast ) uses a version of certain math library routines that perform faster computations than the standard, more accurate math library routines, but with slightly less fractional accuracy and less reliable arithmetic exception handling.

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.54 -mixed_str_len_arg --- Specify Length of Character Arguments

Tells the compiler that the hidden length, passed for each character argument, be placed immediately after its corresponding character argument in the argument list. The default value of -nomixed_str_len_arg tells the compiler to place the hidden lengths of character arguments, in sequential order, at the end of the argument list.

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

Requests that the compiler create module files in the specified directory instead of the current directory.

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

Use the -mp option (TU*X ONLY) to enable parallel processing that uses directed decomposition. Parallel processing is directed by inserting !$PAR directives in your source code. This kind of parallel processing is intended for shared memory multiprocessor systems.

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

The -mp parallel directives use the !$PAR prefix. The compiler recognizes these directives only if you specify the -mp option. This kind of parallel processing is intended for shared-memory multiprocessor systems.

Some of the parallel !$PAR directives include:

BARRIER
CHUNK
COPYIN
CRITICAL SECTION and END CRITICAL SECTION
INSTANCE SINGLE and INSTANCE PARALLEL
MP_SCHEDTYPE
PARALLEL and END PARALLEL
PARALLEL DO
PARALLEL SECTIONS, SECTIONS, and END PARALLEL SECTIONS
PSECTION[S], SECTION, and END PSECTION[S]
PDO, END PDO, and PDONE
SINGLE PROCESS and END SINGLE PROCESS
TASKCOMMON

Environment variables control the run-time behavior. For example, MP_THREAD_COUNT specifies how many threads to create (see Table 6-5).

The default is -nomp .

For More Information:

About parallel directives, see Chapter 6 and Appendix D and the Compaq Fortran Language Reference Manual.

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

Controls how Compaq Fortran handles the case-sensitivity of letters in source code identifiers and external names. The default is -names lowercase .

-names as_is

Causes Compaq Fortran to handle source code identifiers and external names as case sensitive:

This naming convention applies whether names are being defined or referenced. The -U option is a synonym for -names as_is .

-names lowercase

Causes Compaq Fortran to:

This naming convention applies whether names are being defined or referenced. This is the default.

-names uppercase

Causes Compaq Fortran to:

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


Previous Next Contents Index