D.1 HPF Directives in Procedure Interfaces

This section describes Digital Fortran 90's differences from the High Performance Fortran Language Specification regarding passing array arguments through the subprogram argument interface. It also discusses how certain procedure interface issues that are incompletely or ambiguously specified in the High Performance Fortran Language Specification are interpreted in Digital Fortran 90.

D.1.1 Language Changes

Digital Fortran 90 includes some changes from the published HPF language definition relating to passing array arguments through the subprogram argument interface. The first two of these changes are restrictions that may be relaxed in a future release of the compiler.

D.1.2 Ambiguous Combinations of Directives

This section does not contain restrictions to the HPF language. Rather, it specifies how certain incomplete or ambiguous specifications are handled by the Digital Fortran 90 compiler.

This section can be considered a replacement for section 3.10 of the High Performance Fortran Language Specification.

D.1.2.1 Incomplete or Ambiguous Specifications

HPF directives can specify four properties of an array:

There are two problems that have to be addressed in finding a consistent way of dealing with possible combinations of these directives:

D.1.2.2 Restating the Problem in Terms of Motion

The High Performance Fortran Language Specification and the High Performance Fortran Handbook consider a number of these possibilities at length.

The discussion can be simplified as follows: Either there is motion or there is none. If motion is needed for alignment, it is generally just as expensive as if it is also needed for distribution, and conversely. Therefore, combinations of directives are considered according to whether they indicate that motion is or is not necessary, without worrying about what kind of motion it is.

A mapping of a data object (a combination of directives pertaining to that object) is "completely specified" if and only if the alignment, distribution, and relevant processor arrangement are all explicitly specified (a separate named template may or may not be specified). If the dummy is not aligned with a template but is instead distributed directly, the alignment is also considered to be explicit; this point is explained in following sections.

If the directives pertaining to a data object are not completely specified, the compiler must use default mappings. There is a default alignment (which is actually specified by the language), a default distribution (determined by the compiler), and a default processor arrangement (also determined by the compiler).

An important restriction is introduced on the use of default layouts:


You may not attempt to explicitly describe a compiler default layout as a way of avoiding motion. This is for purely practical reasons: the only purpose of having a default is to allow the compiler to do something sensible when you have not specified complete information. There is no guarantee that the compiler defaults remain the same from one version of the compiler to the next. This restriction is also consistent with the last proposed language change: descriptive directives are incompatible with unmapped actual arguments.

Distribution directives applied to templates are always syntactically prescriptive. A way of telling whether these directives (and the templates and processor arrangements they mention) should be considered descriptive or not is necessary:

These two items are just matters of clarification, to make the remaining interpretations make sense.

Next, consider the meaning of incompletely specified sets of directives:

D.1.2.3 Specification of Conditions for Data Motion at a Procedure Call

The following is a specification of the conditions under which motion is generated at a procedure call in Digital Fortran 90: