DIGITAL Fortran 90
User Manual for
DIGITAL UNIX Systems


Previous Contents Index

3.43 -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.44 -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.45 -intconstant --- Handling of Integer Constants

Specify the -intconstant option to use DIGITAL Fortran 77 rather than Fortran 90 semantics to determine the kind of integer constants. If you do not specify -intconstant , Fortran 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 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.46 -K --- Keep Temporary Files

Specifying -k requests that temporary files created by cpp or the DIGITAL Fortran 90 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.47 -L --- Remove ld Directory Search Path

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

3.48 -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.49 -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 DIGITAL Fortran 90 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.50 -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 DIGITAL Fortran 90 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 DIGITAL 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.51 -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.52 -mp --- Enable Parallel Processing Using Directed Decomposition

Use the -mp option 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:

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

For More Information:

About parallel directives, see Chapter 6 and Appendix D.

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

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

-names as_is

Causes DIGITAL Fortran 90 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 DIGITAL Fortran 90 to:

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

-names uppercase

Causes DIGITAL Fortran 90 to:

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

3.54 -nofor_main --- Allow Non-Fortran Main Program

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

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

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

Specifying the -noinclude option directs the Fortran 90 compiler to not search for include files in the /usr/include directory. This option does not apply to the directories searched for module files or cpp files.

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

3.56 -nowsf_main --- Compile HPF Global Routine for Nonparallel Main Program

Use the -nowsf_main option to indicate that the HPF global routine being compiled will be linked with a main program that was not compiled with the -wsf option.

3.57 -o output --- Name Output File

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

When you specify -c with -o output, this names the retained object file output.

For More Information:

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

Specifying -o0 disables nearly all optimizations. If you specify -g2 or -g , this is the default.

-O1

Specifying -o1 enables local optimizations within the source program unit, recognition of common subexpressions, and expansion of integer multiplication and division (using shifts).

-O2

Specifying -o2 enables global optimization. This includes data-flow analysis, code motion, strength reduction and test replacement, split-lifetime analysis, and instruction scheduling. Specifying -o2 includes the optimizations performed by -o1 (implies -o1 ).

-O3

Specifying -o3 enables additional global optimizations that improve speed (at the cost of extra code size). These optimizations include:

Specifying -o3 implies the optimizations performed at levels -o1 and -o2 .

-O4 or -O

Specifying -o4 enables interprocedure analysis and automatic inlining of small procedures (with heuristics limiting the amount of extra code). This is the default unless you also specify -g2 or -g (specifying -g2 or -g changes the default to -o0 ).

Specifying -o4 or -o implies the optimizations performed at levels -o1 , -o2 , and -o3 .

-O5

Specifying -o5 activates the loop transformation optimizations (also set by -transform_loops ) and the software pipelining optimization (also set by -pipeline ):

In addition to loop transformation and software pipelining, specifying -o5 activates certain optimizations that are not activated by -transform_loops and -pipeline , including byte-vectorization, and insertion of additional NOP (No Operation) instructions for alignment of multi-issue sequences.

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 .

Specifying -o5 implies the optimizations performed at levels -o1 , -o2 , -o3 and -o4 .

For More Information:


Previous Next Contents Index