Distributed memory systems solve the memory bottleneck of vector supercomputers by having separate memory for each processor. However, distributed memory systems demand high locality for good performance. Therefore, the distribution of data across processors is of critical importance to the efficiency of a parallel program in a distributed memory system. Fortran 90D/HPF language provides distribution directives to help the compiler distribute data efficiently on distributed memory machines.
There are three ways to generate the directives: 1) users can insert them, 2) programming tools can help users to insert them, or 3) automatic compilers can generate them. In the first approach, users write programs with explicit distribution and alignment directives. A programming tool can generate useful analysis to help users decide partitioning styles, and measure performance to help users improve program partitioning interactively [45][42][34]. The directives can also be generated automatically by compilers. Promising work has been done along case 2 and 3 [48][41][47][40][46]. However, these ideas have not yet been implemented in a practical general system, so we do not consider automatic partitioning in the Fortran 90D/HPF compiler.
The focus of this chapter is to describe the design and implementation of the data partitioning module. It discusses how to distribute data given data distribution directives and illustrates what the important design considerations are. Specifically, we show how the alignment and distribution directives can be systematically processed to produce efficient code.