HP Fortran
Release Notes for Tru64 UNIX
Systems
Chapter 2
New Features for HP Fortran Versions 4.n, 2.0, and 1.n Releases
This chapter summarizes the new features for HP Fortran Versions
prior to Version 5.0:
2.1 New Features and Corrections in Version 4.1
Version 4.1 is a maintenance release that contains a limited number of
new features and corrections to problems discovered since Version 4.0
was released.
For additional information added to these release notes for Version
4.1, see Section 1.13.3.
The following new features have been added for DIGITAL Fortran 90
Version 4.1:
- This release includes a partial implementation of the proposed
Fortran 95 standard.
The following features of the proposed Fortran
95 standard have been implemented by this version of DIGITAL Fortran 90
and are supported when using the
f90
or
f95
commands:
- FORALL statement and construct (implemented prior to Version 4.1)
- Automatic deallocation of ALLOCATABLE arrays (implemented prior to
Version 4.1)
- Dim argument to MAXLOC and MINLOC (implemented prior to Version 4.1)
- PURE user-defined subprograms (implemented prior to Version 4.1)
- ELEMENTAL user-defined subprograms (a restricted form of a pure
procedure)
- Pointer initialization (initial value)
- The NULL intrinsic to nullify a pointer
- Derived-type structure initialization
- CPU_TIME intrinsic subroutine
- Kind argument to CEILING and FLOOR intriniscs
- Enhanced SIGN intrinsic function
- Nested WHERE constructs, masked ELSEWHERE statement, and named
WHERE constructs
- Comments allowed in namelist input
- Generic identifier in END INTERFACE statements
- Detection of Obsolescent and/or Deleted features listed in the
proposed Fortran 95 standard
For more information on Fortran 95 features, see the Section 1.13.2.
- The
f95
command is now available for use with the
-std
option:
- To perform standards conformance checking against the Fortran 90
standard, use the
f90
command with
-std
. Using
f90
with
-std
will issue messages for features (such as FORALL) that have recently
been added to the proposed Fortran 95 standard (as well as other
extensions to the Fortran 90 standard).
- To perform standards conformance checking against the Fortran 95
standard, use the
f95
command with
-std
. Using
f95
with
-std
will not issue messages for features (such as FORALL) that have been
added to the proposed Fortran 95 standard, but will issue messages for
extensions to the Fortran 95 standard.
For more information on Fortran 95 features, see the Section 1.13.2.
- The
-intconstant
option has been added.
Specify the
-intconstant
option to use DIGITAL Fortran 77 rather than Fortran 90 semantics to
determine 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
, an integer constant of 14 will be stored internally as
INTEGER(KIND=8) and converted by the compiler 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.
- The
-pad_source
option has been added.
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
, which 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
.
- The
-warn usage
option has been added.
Specify the
-warn nousage
option to suppress warning messages about questionable programming
practices which, although allowed, often are the result of programming
errors. For example, a continued character or Hollerith literal whose
first part ends before the statement field ends and appears to end with
trailing spaces is detected and reported by
-warn usage
.
The default is
-warn usage
.
- The
-arch keyword
option has been added.
This option determines the type of Alpha
chip code that will be generated for this program. The
-arch keyword
option uses the same keywords as the
-tune keyword
option.
Whereas the
-tune keyword
option primarily applies to certain higher-level optimizations for
instruction scheduling purposes, the
-arch keyword
option determines the type of code instructions generated for the
program unit being compiled.
DIGITAL UNIX Version 4.0 and
subsequent releases provide an operating system kernel that includes an
instruction emulator. This emulator allows new instructions, not
implemented on the host processor chip, to execute and produce correct
results. Applications using emulated instructions will run correctly,
but may incur significant software emulation overhead at runtime.
All Alpha processors implement a core set of instructions. Certain
Alpha processor versions include additional instruction extensions.
Supported
-arch
keywords are as follows:
-
-arch generic
generates code that is appropriate for all Alpha processor generations.
This is the default.
Running programs compiled with the generic
keyword will run all implementations of the Alpha architecture without
any instruction emulation overhead.
-
-arch host
generates code for the processor generation in use on the system being
used for compilation.
Running programs compiled with this keyword
on other implementations of the Alpha architecture might encounter
instruction emulation overhead.
-
-arch ev4
generates code for the 21064, 21064A, 21066, and 21068 implementations
of the Alpha architecture.
Running programs compiled with the ev4
keyword will run without instruction emulation overhead on all Alpha
processors.
-
-arch ev5
generates code for some 21164 chip implementations of the Alpha
architecture that use only the base set of Alpha instructions (no
extensions).
Running programs compiled with the ev5 keyword will
run without instruction emulation overhead on all Alpha processors.
-
-arch ev56
generates code for some 21164 chip implementations that use the byte
and word manipulation instruction extensions of the Alpha architecture.
Running programs compiled with the ev56 keyword might incur
emulation overhead on ev4 and ev5 processors, but will still run
correctly on DIGITAL UNIX Version 4.0 (or later) systems.
-
-arch pca56
generates code for the 21164PC chip implementation that uses the byte
and word manipulation instruction extensions and multimedia instruction
extensions of the Alpha architecture.
Running programs compiled
with the pca56 keyword might incur emulation overhead on ev4 and ev5
and ev56 processors, but will still run correctly on DIGITAL UNIX
Version 4.0 (or later) systems.
- In addition to ev4, ev5, generic, and host, The ev56 and pca56
keywords are now supported for the
-tune
option.
The following new High Performance Fortran features have been added for
DIGITAL Fortran 90 Version 4.1:
- Transcriptive data distributions are now supported.
- The INHERIT directive can now be used to inherit distributions, as
well as alignments.
- Distributed components of user-defined types are now handled in
parallel. This is not part of standard High Performance Fortran (HPF),
but is an approved extension.
- The GLOBAL_SHAPE and GLOBAL_SIZE HPF Local Library routines are now
supported.
- There is a new compile-time option named
-show hpf
, which replaces the
-show wsfinfo
option. The
-show hpf
option provides performance information at compile time. Information is
given about inter-processor communication, temporaries created at
procedure boundaries, optimized nearest-neighbor computations, and code
that is not handled in parallel. You can choose the level of detail you
wish to see.
- New example programs are available in the following directory:
These new features are described in the DIGITAL High Performance Fortran 90 HPF and PSE Manual.
The corrections made for DIGITAL Fortran 90 Version 4.1 include the
following:
- Fix compiler abort with certain types of pointer assignment.
- Fix incorrect error message for nested STRUCTUREs.
- Fix inconsistent severity for undeclared variable message with
IMPLICIT NONE or command line switch.
- Fix incorrect error about passing LOGICAL*4 to a LOGICAL*1 argument.
- Add standards warning for non-integer expressions in computed GOTO.
- Do not flag NAME= as nonstandard in INQUIRE.
- Add standards warning for AND, OR, XOR intrinsics.
- VOLATILE attribute now honored for COMMON variables.
- Allow COMPLEX expression in variable format expression.
- Allow adjustable array to be declared AUTOMATIC (AUTOMATIC
declaration is ignored.)
- Honor
-automatic
(/RECURSIVE) in main program.
- Fix incorrect parsing error when DO-loop has bounds of -32768,32767.
- Fix compiler abort when extending generic intrinsic.
- Fix SAVEd variable in inlined routine that didn't always get SAVEd.
- Fix compiler abort with initialization of CHARACTER(LEN=0) variable
- Correct values of PRECISION, DIGITS, etc. for floating types.
- Fix incorrect value of INDEX with zero-length strings.
- Correct value for SELECTED_REAL_KIND in PARAMETER statement.
- Correct compile-time result of VERIFY.
- For OpenVMS only, routine using IARGPTR or IARGCOUNT corrupts
address of passed CHARACTER argument.
- Standards warning for CMPLX() in initialization expression.
- Fix compiler abort when %LOC(charvar) used in statement function.
- Fix incorrect initialization of STRUCTURE array.
- Fix compiler abort with large statement function.
- RESHAPE of array with a zero bound aborts at runtime.
- For OpenVMS only, /INTEGER_SIZE now correctly processed.
- SIZEOF(SIZEOF()) is now 8.
- Fix error parsing a derived type definition with a field name
starting with "FILL_".
- With OPTIONS /NOI4, compiler complained of IAND with arguments of
an INTEGER*4 variable and a typeless PARAMETER constant.
- Fix incorrect standards warning for DABS.
- Add error message for ambiguous generic.
- Corrected error parsing field array reference in IF.
- Bit constants in argument lists are typed based on value, not
"default integer".
- Allow module to use itself.
- Fix standards warning for Hollerith constant.
- For OpenVMS only, FOR$RAB is always INTEGER*4.
- For OpenVMS only, wrong values for TINY, HUGE for VAX floating.
- For OpenVMS only, EXPONENT() with /FLOAT=D_FLOAT references
non-existent math routine.
- The Compaq Fortran run-time library incorrectly failed to release
previously allocated memory when padding Fortran 90 input.
- The Compaq Fortran run-time library would incorrectly go into an
infinite loop when an embedded NULL character value was found while
performing a list-directed read operation.
- The Compaq Fortran run-time library would incorrectly treat an
end-of-record marker as a value separator while performing a
list-directed read operation.
- The Compaq Fortran run-time library incorrectly produced a
"recursive I/O operation" error after a user has made a call to flush()
to flush a unit which was not previously opened, then attempted to
perform any I/O operation on the unit
- The Compaq Fortran run-time library would incorrectly fail to
return an end-of-record error for certain non-advancing I/O operations.
This occurred when attempting to read into successive array elements
while running out of data.
- The Compaq Fortran run-time library, when it encountered the ":"
edit descriptor at the end of the input record did not stop reading the
next record, causing errors like "input conversion".
- The Compaq Fortran run-time library did not handle implied DO loops
on I/O lists when non-native file support (
-convert
or equivalent conversion method) was in use.
The following are corrections for HPF users in this version:
- Expanded I/O Support, including support for all features,
including: complicated I/O statements containing function calls,
assumed size arrays, or variables of derived types with pointer
components, and array inquiry intrinsics using the implied DO loop
index.
In addition, non-advancing I/O (except on stdin and stdout)
now works correctly if every PSE peer in the cluster has a recent
version of the Fortran run-time library (fortrtl_371 or higher).
- NUMBER_OF_PROCESSORS and PROCESSORS_SHAPE in EXTRINSIC(HPF_SERIAL)
routines
- Restriction lifted on user-defined types in some FORALLs
- Declarations in the specification part of a module
- EXTRINSIC(SCALAR) changed to EXTRINSIC(HPF_SERIAL)
These new corrections are described in more detail in the Parallel
Software Environment (PSE) release notes.
2.2 New Features in Version 4.0
The following
f90
command options were added for DIGITAL Fortran 90 Version 4.0:
- Specify the
-assume byterecl
option to::
- Indicate that the OPEN statement RECL unit for unformatted files
is in byte units. If you omit
-assume byterecl
, HP Fortran expects the OPEN statement RECL value for unformatted
files to be in longword (four-byte) units.
- Return the record length value for an INQUIRE by output list
(unformatted files) in byte units. If you omit
-assume byterecl
, HP Fortran returns the RECL value for an INQUIRE by output list in
longword (four-byte) units.
- The
-check nopower
option allows arithmetic calculations that result in 0**0 or a negative
number raised to an integer power of type real (such as --3**3.0) to be
calculated, rather than stop the program. If you omit
-check nopower
for such calculations, an exception occurs and the program stops
(default is
-check:power
).
For example, if you specified
-check:nopower
, the calculation of the expression 0**0 results in 1 and the
expression --3**3.0 results in --9.
- Specify
-hpf_matmul
to use matrix multiplication from the HPF library. Omitting the
-hpf_matmul
option uses inlined intrinsic code that is faster for small matrices.
For nonparallel compilations, specifying
-hpf_matmul
to use the HPF library routine is faster for large matrices.
- The
-names keyword
option controls how DIGITAL Fortran 90 handles the case-sensitivity of
letters in source code identifiers and external names:
- Using
-names as_is
requests that HP Fortran distinguish between uppercase and lowercase
letters in source code identifiers (treats uppercase and lowercase
letters as different) and distinguish between uppercase and lowercase
letters in external names.
- Using
-names lowercase
(default) requests that HP Fortran not distinguish between
uppercase and lowercase letters in source code identifiers (treats
lowercase and uppercase letters as equivalent) and force all letters to
be lowercase in external names.
- Using
-names uppercase
requests that HP Fortran not distinguish between uppercase
and lowercase letters in source code identifiers (treats lowercase and
uppercase letters as equivalent) and force all letters to be
uppercase in external names.
- The
-noinclude
option prevents searching for include files in the
/usr/include
directory. This option does not apply to the directories
searched for module files or
cpp
files.
- The
-o5
option activates both the software pipelining optimization (
-pipeline
) and the loop transform optimizations (
-transform_loops
). You can also specify
-notransform_loops
or
-nopipeline
with
-o5
.
If you also specify the
-wsf
option to request parallel processing, you cannot use the
-o5
option.
- The
-pipeline
option activates the only software pipelining optimization (previously
done only by
-o5
). 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.
Software pipelining also enables the prefetching of
data to reduce the impact of cache misses. In certain cases, software
pipelining improves run-time performance (separate timings are
suggested).
- The following
-reentrancy keyword
options specify the level of thread-safe reentrant run-time library
support needed:
Option Name |
Description |
-reentrancy none
|
Informs the Compaq Fortran RTL that the program will not be relying on
threaded or asynchronous reentrancy. Therefore the RTL need not guard
against such interrupts inside the RTL. This is the default.
|
-reentrancy asynch
|
Informs the Compaq Fortran RTL that the program may contain
asynchronous handlers that could call the RTL. Therefore the RTL will
guard against asynchronous interrupts inside its own critical regions.
|
-reentrancy threaded
|
Informs the Compaq Fortran RTL that the program is multithreaded, such
as those using the DECthreads library. Therefore the RTL will use
thread locking to guard its own critical regions. To use the threaded
libraries, also specify
-threads
.
|
-noreentrancy
|
The same as
-reentrancy none
.
|
- The
-s
option generates a .s file, which can be assembled. This option is
intended for systems running Compaq Tru64 UNIX (DIGITAL UNIX) Version
4.0 or later, which has certain new Assembler features.
Certain
complex programs that use modules or common blocks compiled with
-s
may not generate code completely acceptable to the Assembler.
- The
-speculate keyword
option supports the speculative execution optimization:
- Use
-speculate all
to perform the speculative execution optimization on all routines in
the program. All exceptions within the entire program will be quietly
dismissed without calling any user-mode signal handler.
- Use
-speculate by_routine
to perform the speculative execution optimization on all routines in
the current compilation unit (set of routines being compiled), but
speculative execution will not be performed for routines in other
compilation units in the program.
- Use
-speculate none
or
-nospeculate
to suppress the speculative execution optimization. This is the default.
The speculative execution optimization reduces instruction latency
stalls to improve run-time performance for certain programs or
routines. This optimization 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 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, use
-speculate none
(default).
- Specifying
-threads
requests that the linker use threaded libraries. This is usually used
with
-reentrancy threaded
.
- The
-transform_loops
option supports a group of optimizations that improve the performance
of the memory system and can apply to multiple nested loops. The loops
chosen for loop transformation optimizations are always counted
loops (counted loops include DO or IF loops, but not uncounted
DO WHILE loops). In certain cases, loop transformation improves
run-time performance (separate timings are suggested).
- Specify
-nowsf_main
to indicate that the HPF global routine being compiled will be linked
with a main program that was not compiled with
-wsf
.
For more information on
f90
command options, see the Compaq Fortran User Manual for Tru64 UNIX and Linux Alpha Systems, Chapter 3, or f90(1).
In addition to the
f90
command-line options, the following new or changed features were added
for Version 4.0:
- The random_number intrinsic (as of Version 4.0) uses two separate
congruential generators together to produce a period of approximately
10**18, and produces real pseudorandom results with a uniform
distribution in (0,1). It accepts two integer seeds, the first of which
is reduced to the range [1, 2147483562]. The second seed is reduced to
the range [1, 2147483398]. This means that the generator effectively
uses two 31-bit seeds.
The new algorithm behaves differently from
one provided prior to Version 4.0 in the following ways:
- Both seeds are active and contribute to the random number being
produced.
- If the given seeds are not in the ranges given above, they will be
reduced to be in those ranges.
- The sequences of random numbers produced by the new generator will
be different from the sequences produced by the old generator.
For more information on the algorithm, see:
- Communications of the ACM vol 31 num 6 June 1988, entitled
Efficient and Portable Combined Random Number Generators by
Pierre L'ecuyer
- Springer-Verlag New York, N. Y. 2nd ed. 1987, entitled
A Guide to Simulation by Bratley, P., Fox, B. L., and Schrage,
L. E.
For an example program, see Section 1.13.4.
- The implementation of the MATMUL intrinsic procedure was changed
for this release. Previously the compiler called a routine in the
scalar HPF library to perform the operation. As of this release, the
compiler generates optimized inline code for the MATMUL intrinsic with
a significant increase in the performance when the size of the array
arguments are small.
To use previous implementation of the MATMUL
intrinsic (routine in the scalar HPF library), specify
-hpf_matmul
.
- The cDEC$ ALIAS directive
The cDEC$ ALIAS directive is now
supported in the same manner as in Compaq Fortran 77. This directive
provides the ability to specify that the external name of an external
subprogram is different than the name by which it is referenced in the
calling subprogram.
This feature can be useful when porting code
between OpenVMS and UNIX systems where different routine naming
conventions are in use.
For more information on the cDEC$ ALIAS
directive, see the Compaq Fortran User Manual for Tru64 UNIX and Linux Alpha Systems.
- The cDEC$ ATTRIBUTES directive
The cDEC$ ATTRIBUTES directive
lets you specify properties for data objects and procedures. These
properties let you specify how data is passed and the rules for
invoking procedures. This directive is intended to simplify mixed
language calls with HP Fortran routines written in C or Assembler.
For more information on the cDEC$ ATTRIBUTES directive, see
Compaq Fortran User Manual for Tru64 UNIX and Linux Alpha Systems.
- An additional math library allows use of optimizations for a series
of square root calculations.
The library file
libm_4sqrt
ships on the DIGITAL Fortran 90 Version 4.0 kit (and DIGITAL Fortran 77
Version 4.0). These optimizations improve run-time performance when a
series of square root calculations occur within a counted loop.
- Enhanced support for the FORALL statement and construct
The
FORALL construct now allows the following statements in the forall body:
- Pointer assignment statement
- FORALL statement or construct (nested FORALL)
- WHERE statement or construct
Please note that each statement in the FORALL body is executed
completely before execution begins on the next FORALL body statement.
The compiler now correctly defines the scope of a FORALL subscript
name to be the scope of the FORALL construct. That is, the subscript
name is valid only within the scope of the FORALL. Its value is
undefined on completion of the FORALL construct.
- OPTIONS statement options can now be abbreviated (for compatibility
with DIGITAL Fortran 77).
- The
-vms
option now supports use of /LIST or /NOLIST in an INCLUDE statement
(for compatibility with DIGITAL Fortran 77).
- To improve run-time performance, new optimizations are now
available and certain improvements have been made, including:
- Certain intrinsic procedures specific to Fortran 90 (not available
in FORTRAN-77)
- Subprogram calls with array arguments
- New command-line options that activate new optimizations, including
the loop transformation optimizations (
-transform_loops
or
-o5
) and the speculative execution optimization (
-speculate keyword
). The software pipelining optimization is now activated by using
-pipeline
or
-o5
.
- Variable formats expressions (VFEs) are now allowed in quoted
strings.
- Invalid formats in quoted strings are now detected at compile-time
rather than run-time.
For more information on compatibility with DIGITAL Fortran 77, see the
revised Compaq Fortran User Manual for Tru64 UNIX and Linux Alpha Systems, Appendix A.
2.3 New Features in Version 2.0
New features for Version 2.0 include the LOC intrinsic function. LOC
returns the internal address of its argument (same as the built-in
function %LOC).
In addition, the Compaq Ladebug debugger has added support for Compaq
Fortran language features (see Section 1.13.8.1).
2.4 New Features in Version 1.3
New features for Version 1.3 include the f90 command options
that support the Compaq Parallel Software Environment.
To request parallel execution, specify the
-wsf
or
-wsf nn
option . This compiles the program to run in parallel using the
Compaq Parallel Software Environment product. The optional nn parameter specifies the
number of processors on which the program is intended to execute. If
not specified, the program will be compiled to execute on any number of
processors. More efficient code is generated when nn is
specified.
If you specify the
-wsf
or
-wsf nn
option to request parallel execution, you can also use the following
related options:
- The
-assume nozsize
option assumes there are no zero-sized array sections.
- The
-nearest_neighbor
or
-nearest_neighbor nn
option enables or disables the nearest neighbor parallel optimization.
The optional nn parameter specifies the width of the shadow
edge to use. If you omit nn, it is set to 1.
- The
-pprof string
option allows parallel profiling of an application. Valid characters
for string are s for sampling or i for interval. This option
must be used with the
-non_shared
option (as well as
-wsf
or
-wsf nn
). This option must not be used with the
-p1
option.
- The
-show wsfinfo
option includes information about statements which cause interprocessor
communication to be generated or are serialized in the listing file.
Other Version 1.3 new features include the following:
- Support for the DIGITAL Fortran 77 pointers (CRAY® style). This
is an extension to the Fortran 95/90 and FORTRAN-77 standards. For more
information, see the DEC Fortran Language Reference Manual and Section 1.13.5.
- Bit constants with a trailing B or Z or leading X (a Compaq Fortran
extension) are now supported for compatibility with Compaq Fortran 77:
i = '001'B
k = '0ff'Z
j = X'00f'
|
- The SYSTEM_CLOCK intrinsic procedure has been extended to allow
integer arguments of any KIND rather than the default integer KIND .
This allows the use of INTEGER*8 arguments to obtain a higher degree of
magnitude and accuracy in timings (1,000,000 counts per second). For
example:
integer*8 count,count_max,count_rate
call system_clock(count,count_rate,count_max)
|
- When it is passed an INTEGER (KIND=4) value, the SYSTEM_CLOCK
intrinsic procedure now returns a value in terms of 10,000 instead of
1,000,000 counts per second.
- Debugging support has been enhanced to allow breakpoints on
CONTINUE, GOTO, and RETURN statements. Before Version 1.3, breakpoints
could not be set on a CONTINUE statement and only on certain GOTO and
RETURN statements.
- The following DIGITAL Fortran 90 cDEC$ directives are now supported:
- cDEC$ IDENT specifies a string that identifies the object file.
- cDEC$ OPTIONS and cDEC$ END_OPTIONS controls alignment of fields in
common blocks, record structures, and most derived-type structures.
- cDEC$ PSECT modifies certain attributes of a common block,
including the [NO]MULTILANGUAGE attribute for compatibility with
DIGITAL Fortran 77.
- cDEC$ TITLE and cDEC$ SUBTITLE specifies strings for the title and
subtitle of a listing file header.
- Any number raised to a floating point 2.0 (x ** 2.0) is now
transformed to (x ** 2) for compatibility with DIGITAL Fortran 77.
- The Bessel function 3f library (jacket) routines are now supported
(see bessel(3f))
- The following
f90
command options were added for Version 1.3:
- The
-fuse_xref
option requests that DIGITAL Fortran 90 generate a data file that the
Compaq FUSE Database Manager uses to create a cross-reference database
file. This improves the performance of the Compaq FUSE Call Graph
Browser and Cross-Referencer that use the database file for their
operations.
- The
-inline speed
and
-inline size
options have been added in place of
-inline automatic
to provide more control over procedure inlining:
Use
-inline size
(same as
-inline space
) to inline procedures that will likely improve run-time performance
where inlining will not significantly increase program size. This
option is meaningful only at optimization levels
-o1
and higher.
Use
-inline speed
to inline procedures that will likely improve run-time performance
where inlining may significantly increase program size. Using
-inline speed
often results in larger executable program sizes (than
-inline size
). This type of inlining occurs automatically with the
-o4
or
-o5
optimization levels. This option is meaningful only at optimization
levels
-o1
and higher.
Other
-inline xxxx
options include
-inline none
,
-inline manual
, and
-inline all
(see Section 2.5).
- The
-ladebug
option includes additional symbolic information in the object file for
the DIGITAL Ladebug debugger (see ladebug(1). This option enables Ladebug to
print and assign to dynamic arrays using standard Fortran syntax,
including array sections.
- The
-show map
option includes a symbol map in the listing file (also specify
-v
).
- The
-version
option displays DIGITAL Fortran 90 version number information.
For more complete product information, see the Compaq Fortran
documentation and the f90(1) reference
(man) page.
2.5 New Features in Version 1.2
DIGITAL Fortran 90 Version 1.2 contains the following changes since
Version 1.1:
- Support for REAL (KIND=16) (or REAL*16) X_float (extended
precision) data type and its associated intrinsics (a DIGITAL Fortran
extension). For more information see Section 1.13.
- Support for variable format expressions (VFEs), a DIGITAL Fortran
extension (see Section 1.13).
- Support for OPTIONS statements, which allow you to specify
command-line options in your source files. The OPTIONS statement is a
DIGITAL Fortran extension.
- Intrinsic procedures FP_CLASS and IMAG (a DIGITAL Fortran
extension).
- STATIC and AUTOMATIC declaration attributes and statements (a
DIGITAL Fortran extension).
- The following
f90
command options were added for Version 1.2:
- The
-convert fgx
and
-convert fdx
options allow conversion of unformatted OpenVMS Alpha DIGITAL Fortran
77 data files. Similarly, the FDX and FGX keywords are recognized for
the OPEN statement CONVERT keyword and the FORT_CONVERTn
environment variable names.
Specifying
-convert fdx
indicates the data contains::
- Little endian integer format (INTEGER declarations of the
appropriate size)
- REAL*4 and COMPLEX*8 data in VAX F_float format
- REAL*8 and COMPLEX*16 data in VAX D_float format
- REAL*16 data in native X_float format
Specifying
-convert fgx
indicates the data contains:
- Little endian integer format (INTEGER declarations of the
appropriate size)
- REAL*4 and COMPLEX*8 data in VAX F_float format
- REAL*8 and COMPLEX*16 data in VAX G_float format
- REAL*16 data in native X_float format
- The
-double_size 128
option specifies that DOUBLE PRECISION declarations are implemented as
extended precision REAL (KIND=16) data rather than double precision
REAL (KIND=8) data.
- The
-real_size 128
and
-r16
options allow a REAL declaration to be interpreted using the REAL
(KIND=16) data type.
- The
-inline xxxxx
options can be used to specify the type of inlining done independent of
the
-on
option (optimization level) specified:
- To prevent inlining of procedures (except statement functions), use
-inline none
or
-inline manual
.
This is the type of inlining done with
-o0
,
-o1
,
-o2
, or
-o3
.
- The
-inline automatic
option was replaced at Version 1.3 with
-inline size
and
-inline speed
(see Section 2.4), allowing more control over inlining.
- To inline every call that can possibly be inlined while generating
correct code, including: statement functions, procedures that
HP Fortran thinks will improve run-time performance, and any other
procedures that can possibly be inlined while generating correct code
(certain recursive routines cannot be inlined), use
-inline all
. This option is meaningful only at optimization levels
-o1
and higher.
- The
-gen_feedback
option requests additional profiling information needed for feedback
file use. You can use
-gen_feedback
with any optimization level up to
-o3
(to avoid inlining procedures). If you omit a
-on
option, the
-gen_feedback
option changes the default optimization level to
-o0
.
A typical command-line sequence to create a feedback file (
profsample.feedback
) follows:
% f90 -gen_feedback -o profsample -O3 profsample.f90
% pixie profsample
% profsample.pixie
% prof -pixie -feedback profsample.feedback profsample
|
- The
-feedback
option now works with
-cord
or separately without
-cord
to specify a previously-created feedback file. For example:
% f90 -feedback profsample.feedback -o profsample -O3 profsample.f90
|
The feedback file provides the compiler with actual execution
information, which the compiler can use to perform such optimizations
as inlining function calls.
The same optimization level (
-on
option) must be specified for the
f90
command with the
-gen_feedback
option and the
f90
command with the
-feedback name
option.
You can use the feedback file as input to the
f90
compiler and
cord
, as follows:
% f90 -cord -feedback profsample.feedback -o profsample -O3 profsample.f90
|
- The
-tune keyword
option selects processor-specific instruction tuning for
implementations of the Alpha architecture. Regardless of the setting of
-tune keyword
, the generated code will run 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.
Choose one of the
following:
- To generate and schedule code that will execute well for both types
of chips, use
-tune generic
. This provides generally efficient code for those cases where both
types of chips are likely to be used. If you do not specify any
-tune keyword
option,
-tune generic
is used (default).
- To generate and schedule code optimized for the type of chip in use
on the system being used for compilation, use
-tune host
.
- To generate and schedule code optimized for the 21064, 20164A,
21066, and 21068 implementations of the Alpha chip, use
-tune ev4
.
- To generate and schedule code optimized for the 21164
implementation of the Alpha chip, use
-tune ev5
.
- The
-check noformat
option disables the run-time message (number 61) associated with format
mismatches. It also requests that the data item be formatted using the
specified descriptor, unless the length of the item cannot accommodate
the descriptor (for example, it is still an error to pass an INTEGER
(KIND=2) item to an E edit descriptor). Using
-check noformat
allows such format mismatches as a REAL (KIND=4) item formatted with an
I edit descriptor.
If you omit the
-vms
option, the default is
-check noformat
.
If you specify
-vms
and omit
-check noformat
,
-check format
is used.
- The
-check output_conversion
option disables the run-time message (number 63) associated with format
truncation. The data item is printed with asterisks. Error number 63
occurs when a number could not be output in the specified format field
length without loss of significant digits (format truncation).
If
you omit the
-vms
option, the default is
-check nooutput_conversion
.
If you specify
-vms
and omit
-check nooutput_conversion
,
-check output_conversion
is used.
- The
-vms
option now sets defaults for
-check output_conversion
and
-check format
.
For more complete product information, see the Compaq Fortran
documentation and the f90(1) reference
(man) page.
2.6 New Features in Version 1.1
DIGITAL Fortran 90 Version 1.1 contains the following changes since
Version 1.0:
- The following
f90
command options were added for Version 1.1:
- The
-check bounds
option generates additional code to detect out-of-bounds subscripts for
array operations and character substring expressions at run-time. Use
this option for debugging purposes.
- The
-idir
option specifies an additional directory to be searched for files
specified with an INCLUDE statement or module files. For Version 1.0,
this option specified an additional directory searched for module files
only.
- The
-warn argument_checking
option issues a warning message about argument mismatches between the
calling and the called procedure when both program units are compiled
together.
- The
fsplit
command now accepts DIGITAL Fortran 90 free-form source files (see
fsplit(1)). For example:
% fsplit -f90 -free bigfile.f90
|
For more complete product information, see the Compaq Fortran
documentation and the f90(1) reference
(man) page.
Chapter 3
Documentation Information
The sections in this chapter:
- Describe HP Fortran documentation and online information
( Section 3.1)
- Describe the main Compaq Parallel Software Environment documents ( Section 3.2)
- List other sources of information about Fortran 95/90
( Section 3.3)
The HP Fortran Web page provides a wealth of information about HP
Fortran products, including update (patch) kits:
http://www.hp.com/software/fortran
|
3.1 HP Fortran Documentation and Online Information
The HP Fortran documentation set includes the following:
- HP Fortran Installation Guide for Tru64 UNIX Systems (AA--PW82H--TE)
Explains how to install HP
Fortran (HP Fortran and HP Fortran 77) on an HP Tru64 UNIX Alpha
system, including requirements.
The installation guide is included
with the Compaq Fortran (95/90) document kit, QA-MV2AA-GZ, and the
Compaq Fortran 77 kit, QA-MV2AB-GZ. It is also included in ASCII and
PostScript form on the Software Product Library CD-ROM (media CD-ROM).
- Compaq Fortran Language Reference Manual (AA--Q66SD--TK)
Describes the HP Fortran
source language for reference purposes, including the format and use of
statements, intrinsic procedures, and other language elements. It also
provides an overview of new Fortran 95/90 features (not available in
FORTRAN-77).
It identifies extensions to the Fortran 95 standard by
blue-green color in the printed and HTML forms of this document.
The Compaq Fortran Language Reference Manual is included
with the Compaq Fortran (95/90) document kit, QA-MV2AA-GZ and is
available on the Online Documentation Library CD-ROM in HTML form.
The Compaq Fortran Language Reference Manual has been translated into Japanese and is
available (see the HP Fortran Web site).
- Compaq Fortran User Manual for Tru64 UNIX and Linux Alpha Systems (AA--Q66TE--TE)
Describes the HP Fortran
program development and run-time environment on Tru64 UNIX Alpha
systems. It describes compiling, linking, running, and debugging
HP Fortran programs, performance guidelines, run-time I/O and
error-handling support, data types, numeric data conversion, calling
other procedures and library routines, and compatibility with HP
Fortran 77. It provides information common to HP Fortran and the
Compaq Parallel Software Environment as well as information about using directed parallel
processing using OpenMP and HP Fortran directives.
The printed
version of this document is included with the Compaq Fortran (95/90)
document kit, QA-MV2AA-GZ and is on the Online Documentation Library
CD-ROM in HTML form.
- Read Before Installing or Using HP Fortran Version 5.5A for
HP Tru64 UNIX Systems (AV--PW83P--TE)
This cover letter
contains information about installing HP Fortran (HP Fortran and HP
Fortran 77) that may not be included in the installation guide or in
the release notes.
This cover letter is included with the Compaq
Fortran (95/90) document kit, QA-MV2AA-GZ, and the Compaq Fortran 77
kit, QA-MV2AB-GZ. It is also included on the Software Product Library
CD-ROM (media CD-ROM) in ASCII and PostScript form.
The HP Fortran Software Product Description (SPD) is provided as a file
on the Software Product Library CD-ROM (media CD-ROM).
The following HP Fortran online information is available (once
installed on the system):
- HP Fortran online reference pages (man pages)
Describe the
HP Fortran software components, including f90(1), fpr(1),
fsplit(1), intro(3f), numerous Fortran library routines
listed in intro(3f), and numerous
parallel High Performance Fortran library routines listed in intro(3hpf).
- HP Fortran online release notes
Provide more information on
this version of HP Fortran, including known problems and a summary
of the HP Fortran run-time error messages. These release notes are also
provided on the Software Product Library CD-ROM (media CD-ROM).
Once installed, the online release notes are located in:
/usr/lib/cmplrs/fort90/relnotes90
|
To view this file, use the
more
command (or
view
or similar command) on a system where HP Fortran is installed:
% more /usr/lib/cmplrs/fort90/relnotes90
|
To initiate a search within
more
, enter a slash (/) followed by the appropriate topic. For information
about using the
more
command, see more(1).
- HP Fortran online help file
This ASCII file provides online
access to HP Fortran information, which includes error message
descriptions, a summary of the language elements (statements, intrinsic
functions, and so on), a glossary, and other information. The HP
Fortran help file is located in:
/usr/lib/cmplrs/fort90/decfortran90.hlp
|
Use the
more
command or the
view
command to access the information available in this file. This help
file is large and is not usually printed on a printer or read
sequentially.
The HP Fortran Installation Guide for Tru64 UNIX Systems, these online release notes, the "read
first" cover letter, and the SPD are available on the HP Tru64
UNIX Software Product Library CD-ROM (media CD-ROM) in ASCII and
PostScript format.
Most printed HP Fortran documents are available on the HP Tru64 UNIX
Online Documentation Library CD-ROM in HTML format. The printed HP
Fortran documentation is also available on the HP Fortran Web site at:
http://www.hp.com/software/fortran
|
3.2 Compaq HPF and Parallel Software Environment Documentation
The Compaq Parallel Software Environment product is no longer supported. The DIGITAL High
Performance Fortran 90 HPF and PSE Manual (in the Compaq Parallel
Software Environment documentation kit, QA-2ATAA-GZ), however, still
contains important HPF documentation in Chapters 1-8. (The Parallel
Processing on Tru64 UNIX Systems manual that describes NUMA
parallel processing in Compaq Fortran is available after installation
in the following location:
/usr/lib/cmplrs/fort90/fort55_parallel_manual.ps
|
The DIGITAL High Performance Fortran 90 HPF and PSE Manual explains both the (now retired) Parallel Software
Environment (PSE) and the (still current) High Performance Fortran
(HPF) programming language. It contains a tutorial describing how to
write programs using the HPF extensions to Compaq Fortran.
3.3 Other Sources of Information About Fortran 95/90
This section lists sources of information about Fortran 95/90 other
than the HP Fortran documentation.
The following publication is the copywritten standard for Fortran 90
and 95:
- American National Standard Programming Language Fortran 90, ANSI
X3.198-1991, and International Standards Organization Programming
Language standard ISO/IEC 1539:1991. (Simply referred to in
documentation as the "Fortran 90 Standard".)
- American National Standard Programming Language Fortran 95,
X3J3/96-007, and International Standards Organization Programming
Language standard ISO/IEC 1539-1:1996. (Simply referred to in
documentation as the "Fortran 95 Standard".)
Tutorial information about the Fortran 95/90 language is available in
commercially published documents at major book stores or from their
publishers. HP Fortran documentation does not usually provide such
tutorial information. The following commercially published documents
(listed in alphabetical order by title) in English provide reference or
tutorial information about Fortran 90:
- Fortran 90 Explained by M. Metcalf and J. Reid, Published
by Oxford University Press, ISBN 0-19-853772-7.
- Fortran 90/95 Explained by M. Metcalf and J. Reid,
Published by Oxford University Press, ISBN 0-19-851888-9.
- Fortran 90/95 for Scientists and Engineers by S. Chapman,
Published by WCB McGraw-Hill, ISBN 0-07-011938-4.
- Fortran 90 Handbook by J. Adams, W. Brainerd, J. Martin,
B. Smith, and J. Wagener, Published by Intertext Publications
(McGraw-Hill), ISBN 0-07-000406-4.
- Fortran 90 Programming by T. Ellis, I. Philips, and T.
Lahey, Published by Addison/Wesley, ISBN 0201-54446-6.
- Introduction to Fortran 90/95 by S. Chapman, Published by
WCB McGraw-Hill, ISBN 0-07-011969-4.
- Programmer's Guide to Fortran 90, Second Edition by W.
Brainerd, C. Goldberg, and J. Adams, Published by Unicomp, ISBN
0-07-000248-7.
For information on parallel programming using OpenMP, see the following:
- Parallel Programming in OpenMP by Rohit Chandra, Ramesh
Menon, Leo Dagum, David Kohr, Dror Maydan, and Jeff MCDonald, Published
by Morgan Kauffman, ISBN 1-55860-671-8.
For information on High Performance Fortran (HPF), see the following:
- High Performance Fortran Language Specification, Version
2.0. This specifications is available online on the World Wide Web
as follows:
http://www.crpc.rice.edu/HPFF/home.html
|