120 likes | 221 Vues
Explore different array allocation methods for distributing data to parallel processes efficiently, including overlap regions, cyclic distributions, and block-cyclic allocations. Discover the LU decomposition algorithm and logical tree representations to optimize computational processes.
E N D
Two allocations of a 16X16 array to 16 processes: (a) 2-dimensional blocks; (b) rows.
Overlap regions • If values from one processor must be communicated to another, then those values are “duplicated” on each processor • It is as if that region exists on both processors • Hence, overlap
Overlap regions (gray) show the non-local values; once the overlay regions are filled, the stencil computation is local.
Cyclic and Block Allocations • Some algorithms will cause some processors to finish before others when using trivial data mappings. • For example, Gaussian Elimination • After first pass, done with first column and row, etc. • Row, column or block assignment will have some processors idle while just a few are working at the end of the process. 5-4
(a) LU decomposition algorithm; (b) 16 processes arranged in a grid; (c) the allocation of the array elements to processes. 5-5
Illustration of a cyclic distribution of an 8 × 8 array onto five processes. 5-6
Block-cyclic allocation of 3 × 2 blocks to a 14 × 14 array distributed to four processes (colors). 5-7
The block-cyclic allocation midway through the computation; the blocks to the right summarize the active values for each process. 5-8
Example of an unstructured grid representing the pressure distribution on two airfoils. Image from http://fun3d.larc.nasa.gov/example-24.html. 5-9
Cap allocation for a binary tree on P = 8 processes. Each process is allocated one of the leaf subtrees, along with a copy of the cap (shaded). 5-10
Logical tree representations: (a) a binary tree where P = 8; (b) a binary tree where P = 6. Useful solution when the tree is known at the beginning of the computation. 5-11
Enumerating the Tic-Tac-Toe game tree; a process is assigned to search the games beginning with each of the four initial move sequences. Symmetric positions are redundant. 5-12