Figure 3 illustrates how a 2-dimensional grid is distributed over a 2-dimensional process grid: The original (undistributed) 8-by-8 array is partitioned into contiguous subarrays (called local sections) and distributed among a 4-by-2 grid of processes.
Figure 3: Distributing data by blocks.
Observe that now each element in the array has two sets of indices --- its global indices (reflecting its position in the original undistributed array) and its local indices (reflecting its position in the local section). For example, using the Fortran convention of starting array indices at 1, the shaded square has global indices (3,6) and local indices (1,2) in grid process (3,2).
Figure 4 illustrates two different distributions of a 8-by-8 array, one by rows and one by columns. The two shaded squares (global indices (2,7) and (7,4)) illustrate the different positions of the same data-grid element in different distributions.
Figure 4: Distributing data by rows or columns.