It is not possible to arrange interconnected data on a distributed memory machine so that all the pieces of data will reside in the processors that need to use them, because one data item may be used in more than one part of a computation by more than one processor. Thus, interprocessor communication may be required. Computations on data structures have a definite mechanism: first, data elements are brought together, then computations are performed. Once the data elements have been brought together, the computations are local. Even on very complex data structures, it is possible to have most of the interacting elements located in the same processor memory. Typically, only a few data items need to be communicated from another processor's memory.
The compiler must recognize the presence of communication
patterns in computations in order to generate appropriate
communication calls. Specifically, this involves a number of tests
on the relationships among subscripts of various array in a statement.
We designed an algorithm to detect communications and to generate
appropriate collective communication calls to execute array assignments
and statements on distributed memory machines.
This chapter describes the computation partitioning and communication generation phases of the Fortran 90D/HPF compiler. The chapter also describes the run-time support system and storage management used by the Fortran 90D/HPF compiler.