HPF is an extension to the new standard Fortran (Fortran 90). It makes use of the fact that the array handling features of Fortran 90 are ideal for expressing parallel array operations. It also provides ways of describing parallel loops. The extensions to Fortran 90 include:
An HPF program should run effectively on a wide range of parallel machines, including distributed memory machines. On these, programmers have become used to writing "message passing" programs; and resigned to the difficulties of doing this. HPF programs contain no message-passing at all (though the compiler will inevitably insert some into the final code). An HPF program is as easy to write as a Fortran 90 program; and as easy to read too. So HPF provides a much more friendly programmming paradigm for users, who want their results fast, without needing to worry about details of the parallelism.
The HPF approach is based on two fundamental observations. First, the overall performance of a program can be increased if operations are performed concurrently by multiple processors. Second, the efficiency of a single processor is highest if the professor performs computations on data elements stored locally. Based on these observations, the HPF extensions to Fortram 90 provide a means for the explicit expression of parallelism and data mapping. An HPF programmer can express parallelism explicitly, and using this information the compiler may be able to tune data distribution accordingly to control load balancing and minimize communication.
An HPF program has essentially the same structure as a Fortran 90 program, but is enhanced with data distribution and alignment directives. When writing a program in HPF, the programmer specifies computations in a global data space. Array objects are aligned to abstract arrays with no data, called "templates". Templates are distributed according to distribution directives in "block" and "cyclic" fashions. All arrays aligned to such templates are implicitly distributed.
Parallelism can be explicitly expressed in HPF using the following language features:
The compiler uses these parallel constructs and distribution information to produce code suitable for parallel execution on each node of a parallel computer.