Compaq Fortran
User Manual for
OpenVMS Alpha Systems


Previous Contents Index

2.3.22 /INCLUDE --- Add Directory for INCLUDE and Module File Search

The /INCLUDE qualifier specifies one or more additional directories for the Compaq Fortran compiler to search for:

If the INCLUDE statement specifies an explicit device and/or directory, only that directory is searched.

If you omit /INCLUDE, the compiler searches in the current directory for module files and either the current directory or the directory containing the source file specified on the FORTRAN command line for include files or text libraries:

The order of directory searching follows:

  1. The current directory (omit /ASSUME=SOURCE_INCLUDE) or the directory where the source file resides (specify /ASSUME=SOURCE_INCLUDE).
  2. One or more directories specified by the /INCLUDE qualifier.
  3. The location defined by the logical name FORT$INCLUDE (if defined). To prevent searching in this directory, specify /NOINCLUDE.

If you do not specify /INCLUDE or /NOINCLUDE, the compiler searches first in the current directory (or directory where the source file resides) and then the directory specified by FORT$INCLUDE (if defined).

To request that the compiler only search in the current directory (or directory where the source file resides), specify /NOINCLUDE. This prevents the compiler from searching the FORT$INCLUDE directory. If you use /NOINCLUDE, you cannot specify /INCLUDE.

To request that the compiler only search in the directory specified by FORT$INCLUDE, specify /INCLUDE=FORT$INCLUDE.

To control the searching for text libraries (not included files or modules), you can also use the logical name FORT$LIBRARY.

Like other OpenVMS logical names, it can specify the location for your process only or for multiple processes (including system-wide).

To specify the additional directories DISKA:[PROJ_MODULE.F90] and DISKB:[F_COMMON.F90] with the /INCLUDE qualifier, use a single /INCLUDE qualifier, as follows:


$ FORTRAN PROJ_M.F90 /INCLUDE=(DISKA:[PROJ_MODULE.F90],DISKB:[F_COMMON.F90])

If you specify multiple directories, the order of the directories (and their devices) in the /INCLUDE qualifier determines the directory search order.

For More Information:

2.3.23 /INTEGER_SIZE --- Integer and Logical Data Size

The /INTEGER_SIZE qualifier controls how the compiler interprets INTEGER or LOGICAL declarations that do not have a specified length. The default is INTEGER_SIZE=32.

The qualifier has the following form:

/INTEGER_SIZE=
  • 16
  • 32
  • 64

16

Indicates that INTEGER declarations are interpreted as INTEGER (KIND=2) and LOGICAL declarations as LOGICAL (KIND=2). Same as the obsolete /NOI4 qualifier.

32

Indicates that INTEGER declarations are interpreted as INTEGER (KIND=4) and LOGICAL declarations as LOGICAL (KIND=4). Same as the obsolete /I4 qualifier.

64

Indicates that INTEGER declarations are interpreted as INTEGER (KIND=8) and LOGICAL declarations as LOGICAL (KIND=8)

For performance reasons, use INTEGER (KIND=4) data instead of INTEGER (KIND=2) or INTEGER (KIND=1) and whenever possible. You must explicitly declare INTEGER (KIND=1) data.

Note

To improve performance, use /INTEGER_SIZE=32 rather than /INTEGER_SIZE=16 and declare variables as INTEGER (KIND=4) (or INTEGER (KIND=8)) rather than INTEGER (KIND=2) or INTEGER (KIND=1). For logical data, avoid using /INTEGER_SIZE=16 and declare logical variables as LOGICAL (KIND=4) rather than LOGICAL (KIND=2) or LOGICAL (KIND=1).

For More Information:

2.3.24 /LIBRARY --- Specify File as Text Library

The /LIBRARY qualifier specifies that a file is a text library file.

The qualifier has the following form:

text-library-file/LIBRARY

The /LIBRARY qualifier can be specified on one or more text library files in a list of files concatenated by plus signs (+). At least one of the files in the list must be a nonlibrary file. The default file type is TLB.

For More Information:

2.3.25 /LIST --- Request Listing File

The /LIST qualifier requests a source listing file. You can request additional listing information using the /MACHINE_CODE and /SHOW qualifiers.

The qualifier has the following form:

/LIST[=file-spec]

You can include a file specification for the listing file. If you omit the file specification, the listing file has the name of the first source file and a file type of LIS.

The default depth of a page in a listing file is 66 lines. To modify the default, assign the new number to the logical name SYS$LP_LINES, using the DCL command DEFINE. For example, the following DCL command sets the page depth at 88 lines:


$ DEFINE SYS$LP_LINES 88

The valid number of lines per page ranges from 30 to a maximum of 255. The definition can be applied to the entire system by using the command DEFINE/SYSTEM.

In interactive mode, the compiler does not produce a listing file unless you include the /LIST qualifier. In batch mode, the compiler produces a listing file by default. In either case, the listing file is not automatically printed; you must use the PRINT command to obtain a line printer copy of the listing file.

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 Compaq Fortran source files are replaced by a space character, and a warning message appears.

You can request additional information in the listing file using the /MACHINE_CODE and /SHOW qualifiers.

The listing file includes the Compaq Fortran version number.

For More Information:

2.3.26 /MACHINE_CODE --- Request Machine Code in Listing File

Specifying /MACHINE_CODE requests that the listing file include a symbolic representation of the OpenVMS Alpha object code generated by the compiler. Generated code and data are represented in a form similar to a Assembly code listing. The code produced by the /MACHINE_CODE qualifier is for informational purposes only. It is not intended to be assembled and is not supported by the MACRO assembler.

If a listing file is not being generated, the /MACHINE_CODE qualifier is ignored.

The default is /NOMACHINE_CODE.

For More Information:

2.3.27 /MATH_LIBRARY --- Fast or Accurate Math Library Routines

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 (default is /MATH_LIBRARY=ACCURATE).

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 exception checking.

This qualifier applies only to IEEE data types (when you specify /FLOAT=IEEE_FLOAT). The qualifier has the following form:

/MATH_LIBRARY=
  • ACCURATE
  • FAST

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 /IEEE_MODE qualifier.

FAST

Specifying /MATH_LIBRARY=FAST (default if you specify /FAST) use versions 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 /IEEE_MODE qualifier is 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 type (see Section 8.4) 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 OpenVMS Alpha operating system in use. Allowed error bounds vary with each routine.

For More Information:

2.3.28 /MODULE --- Placement of Module Files

The /MODULE qualifier controls where module files (.F90$MOD) are placed. If you omit this qualifier or specify /NOMODULE, the .F90$MOD files are placed in your current default directory.

The qualifier has the following form

/MODULE=directory

If you specify this qualifier as shown, .F90$MOD files are placed in the directory location as indicated.

2.3.29 /NAMES --- Control Case of External Names

The /NAMES qualifier specifies how the Compaq Fortran compiler represents external (global) names to the linker.

The qualifier has the following form:

/NAMES=
  • UPPERCASE
  • LOWERCASE
  • AS_IS

UPPERCASE

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

LOWERCASE

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

AS_IS

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

The default, /NAMES=UPPERCASE, means that Compaq Fortran converts external names to uppercase.

For More Information:

2.3.30 /OBJECT --- Specify Name or Prevent Object File Creation

The /OBJECT qualifier specifies the name of the object file or prevents object file creation.

The qualifier has the following form:

/OBJECT[=file-spec]

The default is /OBJECT. If you omit the file specification, the object file has the name of the first source file and a file type of OBJ.

Use the negative form, /NOOBJECT, to suppress object code (for example, when you want to test only for compilation errors in the source program).

For More Information:

On using the /OBJECT qualifier, see Section 2.2.5.

2.3.31 /OLD_F77 --- Use Old FORTRAN 77 Compiler

To use the Compaq Fortran 77 compiler, specify /OLD_F77 as the first qualifier on the FORTRAN command line. The default is to use the Compaq Fortran (90/95 language) compiler. The default Compaq Fortran compiler supports the FORTRAN 77 language as well as the Fortran 90 and Fortran 95 standards.

If you specify the /OLD_F77 qualifier, certain FORTRAN command qualifiers will be ignored, including qualifiers associated with Fortran 90 and Fortran 95 features, Fortran 90 and 95 standards checking, and certain optimization keywords.

2.3.32 /OPTIMIZE --- Specify Compiler Optimizations

The /OPTIMIZE qualifier requests that the compiler produce optimized code.

The qualifier has the following form:

/OPTIMIZE=
  • LEVEL=n
  • INLINE= NONE
  • MANUAL
  • SIZE
  • SPEED
  • ALL
  • NOINLINE
  • LOOPS
  • PIPELINE
  • TUNE= GENERIC
  • HOST
  • EV4
  • EV5
  • EV56
  • PCA6
  • EV6
  • UNROLL=n
[, ...]

The default is /OPTIMIZE, which is equivalent to /OPTIMIZE=LEVEL=4. Use the negative form, /NOOPTIMIZE or /OPTIMIZE=LEVEL=0, for a debugging session to ensure that the debugger has sufficient information to locate errors in the source program.

In most cases, using /OPTIMIZE will make the program execute faster. As a side effect of getting the fastest execution speeds, using /OPTIMIZE can produce larger object modules and longer compile times than /NOOPTIMIZE.

To allow full interprocedure optimization when compiling multiple source files, consider separating source file specifications with plus signs (+), so the files are concatenated and compiled as one program. Full interprocedure optimization can reduce overall program execution time (see Section 5.1.2). Consider not concatenating source files when the size of the source files is excessively large and the amount of memory or disk space is limited.

The /OPTIMIZE keywords follow:

LEVEL

You can specify the optimization level with /OPTIMIZE=LEVEL=n, where n is from 0 to 5, as follows:

INLINE

You can specify the level of inlining with /OPTIMIZE=INLINE=xxxxx, where xxxx is one of the following keywords:

NOINLINE

Same as INLINE=NONE.

LOOPS

Specifying /OPTIMIZE=LOOPS (or /OPTIMIZE=LEVEL=5) 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 multiple nested loops. The loops chosen for loop transformation optimizations are always counted loops (which include DO or IF loops, but not uncounted DO WHILE loops).

Conditions that typically prevent the loop transformation optimizations from occurring include subprogram references that are not inlined (such as an external function call), complicated exit conditions, and uncounted loops.

The types of optimizations associated with /OPTIMIZE=LOOPS include the following:

The loop transformation optimizations are a subset of optimizations activated by /OPTIMIZE=LEVEL=5. Instead of specifying both LOOPS and PIPELINE, you can specify /OPTIMIZE=LEVEL=5.

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

To determine whether using /OPTIMIZE=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 /OPTIMIZE=LOOPS and /OPTIMIZE=NOLOOPS).

PIPELINE

Specifying /OPTIMIZE=PIPELINE (or /OPTIMIZE=LEVEL=5) 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 Compaq Fortran, 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 /OPTIMIZE=PIPELINE with the appropriate /OPTIMIZE=TUNE=xxxx keyword for the target Alpha processor generation (see the TUNE keyword in this section).

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 /OPTIMIZE=LEVEL=5. Instead of specifying both PIPELINE and LOOPS, you can specify /OPTIMIZE=LEVEL=5.

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

To determine whether using /OPTIMIZE=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 /OPTIMIZE=PIPELINE and /OPTIMIZE=NOPIPELINE).

For programs that contain loops that exhaust available registers, longer execution times may result with /OPTIMIZE=LEVEL=5, requiring use of /OPTIMIZE=UNROLL=n to limit loop unrolling (see the UNROLL keyword in this section).

TUNE

You can specify the types of processor-specific instruction tuning for implementations of the Alpha architecture using the /OPTIMIZE=TUNE=xxxx keywords. Regardless of the setting of /OPTIMIZE=TUNE=xxxx 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 target may run slower on another target.

The /OPTIMIZE=TUNE=xxxx keywords are as follows:

If you omit /OPTIMIZE=TUNE=xxxx, GENERIC is used.

UNROLL

You can specify the number of times loops are unrolled with /OPTIMIZE= UNROLL=n, where n is a number from 0 to 16. If you omit the UNROLL keyword or specify UNROLL=0 (the default), the optimizer determines how many times loops are unrolled. Usually loops are unrolled four times, but code analysis may result in certain loops being unrolled two times (twice).

Compaq Fortran unrolls loops at /OPTIMIZE=LEVEL=3 or higher. When timings using LEVEL=5 show that performance has not improved, consider specifying UNROLL=1 with LEVEL=5, such the following:


$ FORTRAN /OPTIMIZE=(LEVEL=5,UNROLL=1) M_APP.F90+SUB.F90/NOLIST

For More Information:


Previous Next Contents Index