Algorithm + strategy = parallelism

The process of writing large parallel programs is complicated by the need to specify both the parallel behaviour of the program and the algorithm that is to be used to compute its result. This paper introduces evaluation strategies: lazy higher-order functions that control the parallel evaluation of non-strict functional languages. Using evaluation strategies, it is possible to achieve a clean separation between algorithmic and behavioural code. The result is enhanced clarity and shorter parallel programs. Evaluation strategies are a very general concept: this paper shows how they can be used to model a wide range of commonly used programming paradigms, including divide-and-conquer parallelism, pipeline parallelism, producer/consumer parallelism, and data-oriented parallelism. Because they are based on unrestricted higher-order functions, they can also capture irregular parallel structures. Evaluation strategies are not just of theoretical interest: they have evolved out of our experience in parallelising several large-scale parallel applications, where they have proved invaluable in helping to manage the complexities of parallel behaviour. Some of these applications are described in detail here. The largest application we have studied to date, Lolita, is a 40,000 line natural language engineering system. Initial results show that for these programs we can achieve acceptable parallel performance, for relatively little programming effort.

[1]  Paul Hudak Para-Functional Programming , 1986, Computer.

[2]  F. Warren Burton,et al.  Annotations to Control Parallelism and Reduction Order in the Distributed Evaluation of Functional Programs , 1984, TOPL.

[3]  F. Warren Burton,et al.  Encapsulating non-determinacy in an abstract data type with determinate semantics , 1991, Journal of Functional Programming.

[4]  Geoffrey L. Burn,et al.  Assessing the evaluation transformer model of reduction on the spineless G-machine , 1993, FPCA '93.

[5]  John M. Kewley,et al.  Evaluation Annotations for Hope+ , 1989, Functional Programming.

[6]  John Glauert,et al.  SISAL: streams and iteration in a single assignment language. Language reference manual, Version 1. 2. Revision 1 , 1985 .

[7]  Thomas R. Gross,et al.  Exploiting task and data parallelism on a multicomputer , 1993, PPOPP '93.

[8]  Nicholas Carriero,et al.  Coordination languages and their significance , 1992, CACM.

[9]  Simon L. Peyton Jones,et al.  Time and space profiling for non-strict, higher-order functional languages , 1995, POPL '95.

[10]  David E. Culler,et al.  Monsoon: an explicit token-store architecture , 1990, [1990] Proceedings. The 17th Annual International Symposium on Computer Architecture.

[11]  Colin Runciman,et al.  Applications Of Functional Programming , 1995 .

[12]  Simon L. Peyton Jones,et al.  GUM: a portable parallel implementation of Haskell , 1996, PLDI '96.

[13]  Geoffrey L. Burn,et al.  Implementing the evaluation transformer model of reduction on parallel machines , 1991, Journal of Functional Programming.

[14]  Robert H. Halstead,et al.  Lazy task creation: a technique for increasing the granularity of parallel programs , 1990, LISP and Functional Programming.

[15]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[16]  Guy E. Blelloch,et al.  Implementation of a portable nested data-parallel language , 1993, PPOPP '93.

[17]  Kenneth R. Traub Implementation of non-strict functional programming languages , 1991, Research monographs in parallel and distributed computing.

[18]  Keshav Pingali,et al.  I-structures: Data structures for parallel computing , 1986, Graph Reduction.

[19]  Paul Hudak,et al.  Report on the Non-Strict Functional Language , 1997 .

[20]  John H. Reppy,et al.  CML: A Higher-Order Concurrent Language , 1991, PLDI.

[21]  Anne Rogers,et al.  Supporting dynamic data structures on distributed-memory machines , 1995, TOPL.

[22]  Paul Hudak,et al.  Para-functional programming in Haskell , 1991 .

[23]  C. A. R. Hoare,et al.  Communicating sequential processes , 1978, CACM.

[24]  George Horatiu Botorog,et al.  Skil: an imperative language with algorithmic skeletons for efficient distributed programming , 1996, Proceedings of 5th IEEE International Symposium on High Performance Distributed Computing.

[25]  Cormac Flanagan,et al.  pHluid: the design of a parallel functional language implementation on workstations , 1996, ICFP '96.

[26]  Paul Hudak,et al.  Pomset interpretations of parallel functional programs , 1987, FPCA.

[27]  P. Hudak Exploring parafunctional programming: separating the what from the how , 1988, IEEE Software.

[28]  Hans-Wolfgang Loidl,et al.  Solving Systems of Linear Equations Functionally: a Case Study in Parallelisation , 1995 .

[29]  Robert H. Halstead,et al.  Mul-T: a high-performance parallel Lisp , 1989, PLDI '89.

[30]  Hans-Wolfgang Loidl,et al.  Visualising Granularity in Parallel Programs: A Graphical Winnowing System for Haskell , 1995 .

[31]  William F. McColl,et al.  Scalability, portability and predictability: The BSP approach to parallel programming , 1996, Future Gener. Comput. Syst..

[32]  C. J. Date An Introduction to Database Systems, 6th Edition , 1995 .

[33]  Philip Wadler,et al.  Projections for strictness analysis , 1987, FPCA.

[34]  Geoffrey Livingston Burn,et al.  Abstract interpretation and the parallel evaluation of functional languages , 1987 .

[35]  Lawrence A. Crowl,et al.  Parallel programming with control abstraction , 1994, TOPL.

[36]  Fethi A. Rabhi Exploiting parallelism in functional languages: a “paradigm-oriented” approach , 1995 .

[37]  Robin Milner,et al.  Communication and concurrency , 1989, PHI Series in computer science.

[38]  Ian T. Foster,et al.  A compiler approach to scalable concurrent-program design , 1994, TOPL.

[39]  Guy E. Blelloch,et al.  Programming parallel algorithms , 1996, CACM.

[40]  M. Lauer Computing by Homomorphic Images , 1983 .

[41]  Paul Hudak,et al.  First-class schedules and virtual maps , 1995, FPCA '95.

[42]  Paul H. J. Kelly Functional programming for loosely-coupled multiprocessors , 1989, Research monographs in parallel and distributed computing.

[43]  Evgenia Smirni,et al.  Modeling speedup of SPMD applications on the Intel Paragon: a case study , 1995, HPCN Europe.

[44]  Paul Hudak,et al.  Implicit and Explicit Parallel Programming in Haskell , 1993 .

[45]  R. J. M. Hughes,et al.  Design and Implementation of Programming Languages , 1977, Lecture Notes in Computer Science.

[46]  Willem G. Vree,et al.  A toolkit for parallel functional programming , 1995, Concurr. Pract. Exp..

[47]  Arvind,et al.  T: A Multithreaded Massively Parallel Architecture , 1992, [1992] Proceedings the 19th Annual International Symposium on Computer Architecture.

[48]  Yike Guo,et al.  Parallel skeletons for structured composition , 1995, PPOPP '95.

[49]  David E. Culler,et al.  Global analysis for partitioning non-strict programs into sequential threads , 1992, LFP '92.

[50]  Paul Roe Parallel programming using functional languages , 1991 .