DIGITAL Fortran 90
User Manual for
DIGITAL UNIX Systems


Previous Contents Index

3.59 -om --- Request Nonshared Object Optimizations

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.60 -omp --- Enable OpenMP Parallel Processing Using Directed Decomposition

Use the -omp option to enable parallel processing that uses directed decomposition. Parallel processing is directed by inserting OpenMP directives in your source code. This kind of parallel processing is intended for shared memory multiprocessor systems.

Some of the OpenMP directives include:

For more information, see Chapter 6 and Appendix D.

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

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.62 -pipeline --- Activate Software Pipelining Optimization

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

For this version of DIGITAL Fortran 90, loops chosen for software pipelining are always innermost loops and do not contain branches, procedure calls, or COMPLEX floating-point data.

Software pipelining can be more effective when you combine -pipeline with the appropriate -tune keyword for the target Alpha processor generation (see Section 3.76).

Software pipelining also enables the prefetching of data to reduce the impact of cache misses.

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

To specify software pipelining without loop transformation optimizations, do one of the following:

To determine whether using -pipeline benefits your particular program, you should time program execution for the same program (or subprogram) compiled with and without software pipelining (such as with -pipeline and -nopipeline ).

For programs that contain loops that exhaust available registers, longer execution times may result with -o5 , requiring use of -unroll n to limit loop unrolling (see Section 3.78).

For More Information:

3.63 -p0, -p1 or -p, -pg, and -pprof --- Profiling Support

Nonparallel programs ( -wsf option omitted) and parallel HPF programs ( -wsf 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 -wsf option, you can use the prof and pixie tools if you specify the -p0 and -p1 or -p options to control the level of profiling support provided during compilation (the default is -p0 ). When you omit -wsf , the -pprof method option is ignored.

If you specify the -wsf option, you can use the -pprof method option to use the pprof parallel profiler. When you specify -wsf , omit the -p0 , -p1 , and -p options.

Options related to profiling include:

-p0

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

-p1 or -p

Specifying -p1 or -p sets up profiling by periodically sampling the value of the program counter. This option only effects 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 one profiling library ( libprof1 ).

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

If you specify this option, do not also specify -g0 .

-pg

Allows use of the call graph profiling tool gprof .

-pprof method

Prepares a program for subsequent profiling with the pprof profiler. To use the -pprof method option:

For complete information about -pprof , see Section 3.87.4.

For More Information:

3.64 -pthread --- Link Using Threaded Run-Time Library

Use the -pthread option to request that the linker use threaded libraries. This is usually used with the -reentrancy threaded option (see Section 3.67). The -threads option is a synonym for -pthread .

3.65 -r8 or -real_size 64, -real_size 32 --- Floating-Point Data Size

Use the -r8 or -real_size 64 and -real_size 32 options to control the size of REAL and COMPLEX declarations without a kind parameter or size specifier:

-real_size 32

Specifying -real_size 32 defines REAL declarations, constants, functions, and intrinsics as REAL*4 (SINGLE PRECISION or KIND=4) and COMPLEX declarations, constants, functions, and intrinsics as COMPLEX*8 (COMPLEX or KIND=4). This is the default unless you specify -r8 (or -real_size 64 ).

-r8 or -real_size 64

Specifying -real_size 64 or -r8 defines:

If you omit -r8 (and -real_size 64 ), REAL declarations, constants, functions, and intrinsics are defined as REAL*4 (SINGLE PRECISION or KIND=4) and COMPLEX declarations, constants, functions, and intrinsics as COMPLEX*8 (COMPLEX or KIND=4).

Specifying -r8 causes intrinsic functions to produce a REAL*8 or COMPLEX*16 (KIND=8) result instead of a REAL*4 or COMPLEX*8 (KIND=4) result, except if the argument is explicitly typed as REAL*4 or COMPLEX*8.

For instance, references to the CMPLX intrinsic produce DCMPLX results (COMPLEX*16), unless the argument to CMPLX is explicitly typed as REAL*4 or COMPLEX*8 (KIND=4) (results in a data type of COMPLEX*8).

For More Information:

3.66 -recursive --- Request Recursive Execution

Specify the -recursive option to:

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

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

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. The default is -reentrancy none .

-noreentrancy

Same as -reentrancy none .

-reentrancy none

Specifying -reentrancy none informs the DIGITAL Fortran run-time library that the program will not be relying on threaded or asynchronous reentrancy. The run-time library need not guard against such interrupts inside its own critical regions. Same as -noreentrancy .

-reentrancy asynch

Specifying -reentrancy asynch informs the DIGITAL Fortran run-time library that the program may contain asynchronous handlers that could call the RTL. The run-time library will guard against asynchronous interrupts inside its own critical regions.

-reentrancy threaded

Specifying -reentrancy threaded informs the DIGITAL Fortran run-time library that the program is multithreaded, such as programs using the DECthreads library. The run-time library will use thread locking to guard its own critical regions.

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

3.68 -S --- Create Assembler File

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

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

Use the -show code or -machine_code , -show include , and -show map options to control the amount of information in a listing file. To use any of the following options, specify the -v option to request a listing file:

-show code or -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.

-show hpf

When used with the -wsf or -wsf num option, specifying -show hpf shows information about HPF parallelization. For more information, see Section 3.87.5.

-show include

Specifying -show include lists the contents of any included file if a listing is being generated.

-show map

Specifying -show map includes a symbol map in the listing file.

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

For More Information:

3.70 -speculate keyword --- Speculative Execution Optimization

Specifying -speculate all or -speculate by_routine requests the speculative execution optimization.

Speculative execution reduces instruction latency stalls to improve run-time performance for certain programs or routines. Speculative execution evaluates conditional code (including exceptions) and moves instructions that would otherwise be executed conditionally to a position before the test, so they are executed unconditionally.

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

Performance improvements may be reduced because the run-time system must dismiss exceptions caused by speculative instructions. For certain programs, longer execution times may result when using the speculative execution optimization. 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).

Speculative execution does not support some run-time error checking, since exception and signal processing (including SIGSEGV, SIGBUS, and SIGFPE) is conditional. When the program needs debugging or while testing for errors, only use -speculate none .

The default, -speculate none , means that the speculative execution code scheduling optimization is not used and exceptions are reported as expected.

-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

Indicates that all routines in the current compilation unit (set of routines being compiled) can do speculative execution, but speculative execution will not be performed for routines in other compilation units in the program.

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 DIGITAL Fortran Run-Time Library to report exceptions.

-speculate none

Disables all speculative code scheduling. This is the default.

The -speculate none option is equivalent to -nospeculate ; using either option disables speculative execution optimization.

3.71 -std or -std90, -std95 --- Perform Fortran 90/95 Standards Checking

Use the -std , -std90 , and -std95 options to request that the compiler issue informational messages for syntax that can be identified at compile-time as being not standard in the Fortran 90 or Fortran 95 language.

-std, -std90

The -std and -std90 options request that the compiler issue messages for:

-std95

The -std95 option checks for extensions to the Fortran 95 standard. That includes all the checks performed by the -std90 option with the following exceptions:

The DIGITAL Fortran 90 compiler recognizes the following equivalencies:

Source statements that do not conform to Fortran 90 or Fortran 95 language standards are detected by the DIGITAL Fortran 90 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:

The -std options interact with the -wsf option (requests generation of parallel HPF code) as follows:

You should not specify both -std and -wsf .

For More Information:

On the DIGITAL Fortran 90 language, see the DIGITAL Fortran Language Reference Manual.


Previous Next Contents Index