Next: Usage of the Up: Data Distribution (Stage Previous: Data Distribution (Stage

Distribution functions

A Fortran 90D/HPF program is written in the global name space. Therefore, the arrays and template indices refer to indices in the global name space. Parallelizing the program onto a distributed memory machine requires mapping a global index onto the processor number and local index pair, because on a distributed memory machine, each node has a separate name space. For the above index transformations, we define data-distribution functions , index-conversion functions, as given in Definition 1 below.

Definition 1: A data-distribution function for each dimension of template maps three integers, , where I is the global index, , P is the number of processors, and N is the size of global index. The pair represents the processor , and is the local index of . gives the cardinality (the number of global indices in processor p). The inverse distribution function transforms the local index in processor p back into global index .

The term global index refers to the index of a data item within the global array, global name space, while the term local index denotes the index of a data item within a logical processor.

The choice of these distribution functions is one of the most important design choices in the compiler. We use the following criteria:

The CYCLIC attribute indicates that global indices of the template in the specified dimension should be assigned to the logical processors in a round-robin fashion. The last column of Table shows the CYCLIC distribution functions. This yields an optimal static load balance since the first processors get elements; the rest get elements. In addition, these distribution functions are efficient and simple to compute. Although CYCLIC distribution functions provide a good static load balance, the locality is worse than with block distributions since cyclic distributions scatter data.



Next: Usage of the Up: Data Distribution (Stage Previous: Data Distribution (Stage


zbozkus@
Thu Jul 6 21:09:19 EDT 1995