We aim to provide a flexible hybrid of the data parallel and low-level SPMD approaches. To this end HPF-like distributed arrays appear as language primitives. A design decision is made that all access to non-local array elements should go through library functions--for example, calls to a collective communication library, or simply get and put functions for access to remote blocks of a distributed array. This puts an extra onus on the programmer; but making communication explicit encourages the programmer to write algorithms that exploit locality, and simplifies the task of the compiler writer.
For the newcomer to HPF, one of its advantages lies in the fact that the effect of a particular operation is logically identical to its effect in the corresponding sequential program. This means that, assuming the programmer understands conventional Fortran, it is very easy for him or her to understand the behaviour of a program at the level of what values are held in program variables, and the final results of procedures and programs. Unfortunately, the ease of understanding this ``value semantics'' of a program is counterbalanced by the difficulty in knowing exactly how the compiler translated the program. Understanding the performance of an HPF program may require the programmer to have very detailed knowledge of how arrays are distributed over processor memories, and what strategy the compiler adopts for distributing computations across processors.
The language model we discuss has various similarities to the HPF model, but the HPF-style semantic equivalence between the data-parallel program and a sequential program is abandoned in favour of a literal equivalence between the data-parallel program and an SPMD program. Because understanding an SPMD program is presumably more difficult than understanding a sequential program, our language may be slightly harder to learn and use than HPF. But understanding performance of programs should be much easier.
The distributed arrays of the new languages will be kept strictly separate from ordinary arrays. They are a different kind of object, not type-compatible with ordinary arrays. An important property of the languages we describe is that if a section of program text looks like program text from the unenhanced base language (Java or Fortran 90 for example), it is translated exactly as for the base language--as local sequential code. Only statements involving the extended syntax behave specially. This makes preprocessor-based implementation of the new languages very straightforward, allows sequential library code to be called directly, and gives the programmer good control over the generated code--he or she can be confident no unexpected overhead have been introduced in code that looks like ordinary Fortran (for example).
In the baseline language we adopt a distributed array model semantically equivalent to to the HPF data model in terms of how elements are stored, the options for distribution and alignment, and facilities for describing regular sections of arrays. Distributed arrays may be subscripted with global subscripts, as in HPF. But a subscripting operation must not imply access to an element on a different processor. We will sometimes be refer to this restriction as the SPMD constraint. To simplify the task of the programmer, who must ensure an accessed element is held locally, the languages will typically add distributed control constructs. These play a role something like the ON HOME directives of HPF 2.0 and earlier data parallel languages . A further special control construct will facilitate access to all elements in the locally held section of a particular array (or group of aligned arrays). This is the distributed loop or overall construct.