Parallelization with Tree Skeletons
Trees are useful data structures, but to design efficient parallel programs over trees is known to be more difficult than to do over lists. Although several important tree skeletons have been proposed to simplify parallel programming on trees, few studies have been reported on how to systematically use them in solving practical problems; it is neither clear how to make a good combination of skeletons to solve a given problem, nor obvious even how to find suitable operators used in a single skeleton. In this paper, we report our first attempt to resolve these problems, proposing two important transformations, the tree diffusion transformation and the tree context preservation transformation. The tree diffusion transformation allows one to use familiar recursive definitions to develop his parallel programs, while the tree context preservation transformation shows how to derive associative operators that are required when using tree skeletons. We illustrate our approach by deriving an efficient parallel program for solving a nontrivial problem called the party planning problem, the tree version of the famous maximum-weight-sum problem.
KeywordsParallel Skeletons Tree Algorithms Parallelization Program Transformation Algorithm Derivation
Unable to display preview. Download preview PDF.
- 1.Chin, W.N., Takano, A., Hu, Z.: Parallelization via context preservation. IEEE Computer Society International Conference on Computer Languages (ICCL 1998), May 1998, pp. 153–162 (1998)Google Scholar
- 2.Cole, M.: Parallel programming, list homomorphisms and the maximum segment sum problems. Report CSR-25-93, Department of Computing Science, The University of Edinburgh (May 1993)Google Scholar
- 4.Gibbons, J.: Algebras for Tree Algorithms. PhD thesis, Programming Research Group, Oxford University, Available as Technical Monograph PRG-94 (1991)Google Scholar
- 5.Gibbons, J.: Computing downwards accumulations on trees quickly. In: Gupta, G., Mohay, G., Topor, R. (eds.) Proceedings of 16th Australian Computer Science Conference, February 1993. Australian Computer Science Communications, vol. 15 (1), pp. 685–691 (1993)Google Scholar
- 8.Hu, Z., Takeichi, M., Iwasaki, H.: Diffusion: Calculating efficient parallel programs. In: 1999 ACM SIGPLAN Workshop on Partial Evaluation and Semantics- Based Program Manipulation (PEPM 1999), San Antonio, Texas, January 1999. BRICS Notes Series NS-99-1, pp. 85–94 (1999)Google Scholar
- 9.Peyton Jones, S., Hughes, J. (eds.): Haskell 98: A Non-strict, Purely Functional Language (February 1999), Available online: http://www.haskell.org
- 10.Matsuzaki, K., Hu, Z., Takeichi, M.: Implementation of parallel tree skeletons on distributed systems. In: Proceedings of The Third Asian Workshop on Programming Languages And Systems, Shanghai, China, pp. 258–271 (2002)Google Scholar
- 11.Matsuzaki, K., Hu, Z., Takeichi, M.: Parallelization with tree skeletons. Technical Report METR 2003-21, Mathematical Informatics, Graduate School of Information Science and Technology, University of Tokyo (2003)Google Scholar
- 12.Reid-Miller, M., Miller, G.L., Modugno, F.: List ranking and parallel tree contraction. In: Reif, J.H. (ed.) Synthesis of Parallel Algorithms, ch. 3, pp. 115–194. Morgan Kaufmann Publishers, San Francisco (1996)Google Scholar