Compaq Fortran includes support for High Performance Fortran.
High Performance Fortran (HPF) is an industry consensus on a small set of de facto industry standard extensions to Fortran 90. These extensions augment Fortran 90's support for architecture-independent application development and allow portable, efficient, and scalable application development for a wide variety of parallel and serial hardware architectures. Some of the HPF extensions to Fortran 90 have been included in Fortran 95. HPF features include:
This construct is an element-by-element generalization of data parallel array operations that augments Fortran 90 array constructs. Every data parallel array operation can be represented as a FORALL generalization. The following example, which is not expressible using array syntax, sets diagonal elements of an array to 1:
REAL, DIMENSION(N, N) :: A
FORALL (I=1:N) A(I, I) = 1
For more information on the FORALL construct, see Section 4.2.5.
A pure procedure is restricted from having side effects. References to pure procedures can be optimized in ways that non- pure procedure references cannot. An example of a pure procedure follows:
PURE FUNCTION DOUBLE(X)
REAL, INTENT(IN) :: X
DOUBLE = 2 * X
END FUNCTION DOUBLE
Procedures must be pure to be referenced in FORALL constructs or INDEPENDENT (TU*X only) DO loops. For more information on pure procedures, see Section 8.5.1.2.
The following are new intrinsic functions (or new arguments to Fortran 90 intrinsic functions):
Fortran 90 provides the user view of a global name space and single logical thread of control. However, modern multiprocess computer systems provide different models of execution. The following prefixes can be used to specify alternative models of execution for individual procedures:
Different models can be used in a single source program. For more information on the syntax of procedures using the EXTRINSIC prefixes, see Sections 8.5.2 and 8.5.3.
These directives describe storage allocation for data without changing the meaning or results of the original program. The compiler uses the directives to schedule efficient parallel execution of the computation. For more information on these directives, see Section 15.3.
This directive tells the compiler whether named (or all) data objects in a procedure do (SEQUENCE) or do not (NOSEQUENCE) depend on array element order or storage association. It is available on Tru64 UNIX systems. If SEQUENCE is specified, data objects cannot be mapped by data placement directives, except for certain strictly defined cases. For more information on the [NO]SEQUENCE directive, see Section 15.3.7.
This directive asserts that the statements in a particular DO loop or FORALL construct do not have any dependencies requiring sequential execution. It is available on Tru64 UNIX systems.
When properly used, it does not change the semantics of the construct, but provides information to the compiler that can allow optimization. For example, the iterations of the following loop may be executed in any order:
!HPF$ INDEPENDENT
DO I = 1, N
A(I) = B(I-1) + B(I+1)
END DO
For more information on the INDEPENDENT directive, see Section 15.3.4.
These routines provide some basic operations that are valuable for parallel algorithm design and allow efficient implementation of higher-level computations on Tru64 UNIX systems. They include the following:
For more information on these routines, see Appendix G.