In Proc. 2nd Symp. Frontiers Massively Parallel Computation (1988), pp. 195–198. Portable Parallel Algorithms for Geometric Problems (Preliminary Version) Russ Miller Quentin F. Stout Department of Computer Science Electrical Engineering and Computer Science State University of New York at Buffalo University of Michigan Buffalo, NY 14260 USA Ann Arbor, MI 48109-2122 USA Abstract Because the interconnection scheme among processors (or between processors and memory) significantly affects the running time, efficient parallel algorithms must take the in- terconnection scheme into account. This in turn entails trade- offs between efficiency and portability among different archi- tectures. Our goal is to develop algorithms that are portable among massively parallel fine grain architectures such as hy- percubes, meshes, and pyramids, while yielding a fairly ef- ficient implementation on each. Our approach is to utilize standardized operations such as prefix, broadcast, sort, com- pression, and crossproduct calculations. This paper describes an approach for designing efficient, portable algorithms and gives sample algorithms to solve some fundamental geomet- ric problems. The difficulties of portability and efficiency for these geometric problems have been redirected into similar difficulties for the standardized operations. However, the cost of developing efficient implementations of them on the vari- ous target architectures can be amortized over numerous al- gorithms. Keywords Portable parallel algorithms, computational ge- ometry, data movement operations, distributed memory parallel computers. 1 Introduction Massively parallel computers consisting of perhaps millions of processors are now becoming available. While such ma- chines offer significantly faster solutions to many problems, they also impose severe programming requirements to utilize their potential. Old “dusty decks” do not typically work on such machines, and hence new algorithms and programs need to be developed. Since each processor contains only a small Partially supported by NSF grants DCR-8608640 and IRI-8800514. Partially supported by NSF grant DCR-8507851 and an Incentives for Excellence Award from Digital Equipment Corporation. fraction of the total data, for most problems there must be extensive communication among processors. This communi- cation often dominates the total running time of the program, and efficient programs must be developed with this in mind. If the introduction of massive parallelism only brought about a one-time need to reprogram, then the reprogramming costs would at least be fairly well understood and for a vari- ety of applications would be affordable. However, extensive additional costs are introduced due to the significant differ- ences among massively parallel architectures. Different mas- sively parallel architectures have significantly different com- munication characteristics, and hence have significantly dif- ferent running times on the same programs. For example, on a square two-dimensional mesh with processors, it takes time on average for two processors to exchange infor- mation, while on a hypercube or pyramid it takes . For processors to exchange data takes time on the mesh and pyramid, or time (worst-case) on the hy- percube. Notice that in one case the pyramid is similar to the hypercube, while in the other case it is similar to the mesh. Due to such differences, for a single problem one may have two programs and with the property that on one massively parallel machine is significantly faster than , while on another massively parallel machine is signifi- cantly faster than . This paper is concerned with developing algorithms which can be ported among different fine grain, massively parallel architectures and yield reasonably good implementations on each. Our approach is to write algorithms in terms of gen- eral data movement operations, and then implement the data movement operations on the target architecture. Efficient im- plementation of the data movement operations requires care- ful programming, but since the data movement operations form the foundation of many programs the cost of implement- ing them can be amortized. The use of data movement oper- ations also helps programmers think in terms of higher-level programming units, in the same way the use of standard data structures helps programmers of serial computers. 1