Up Next
Go up to Large Parallel Applications
Go forward to Methodology

General

Using evaluation strategies, we have written a number of medium-scale parallel programs, and are currently parallelising a large-scale program, Lolita (60,000 lines). This section discusses the use of strategies in three programs, one divide-and-conquer, one pipelined and the third data-oriented. The methodology we are developing out of our experiences is also described. We have built on experience gained with several realistic parallel programs in the FLARE project [Runciman, 1995]. The FLARE project was the first attempt to write large parallel programs in Haskell, and predated the development of strategies.

Until recently parallel programming was most successful in addressing problems with a regular structure and large grain parallelism. However, many large scale applications have a number of distinct stages of execution, and good speedups can only be obtained if each stage is successfully made parallel. The resulting parallelism is highly irregular, and understanding and explicitly controlling it is hard. A major motivation for investigating our predominantly-implicit approach is to address irregular parallelism. Two recent parallel programming models, Bulk Synchronous Processing (BSP) [McColl, 1996], and Single-Program Multiple-Data (SPMD) [Smirni et al., 1995], have gone some way towards addressing this problem by providing a framework in which some irregularity can be supported in an otherwise regular program.

In large applications, evaluation strategies are defined in three kinds of modules. Strategies over Prelude types such as lists, tuples and integers are defined in a Strategies module. Strategies over application-specific types are defined in the application modules. Currently, strategies over library types are defined in private copies of the library modules. Language support for strategies which automatically derived an NFData instance for datatypes would greatly reduce the amount of code to be modified and avoid this problem of reproducing libraries. As an interim measure we have developed a tool that, inter alia, automatically derives an NFData instance for any datatype.


{trinder,hwloidl,simonpj}@dcs.gla.ac.uk, kh@dcs.st-and.ac.uk

Up Next