APSET



The original APSET project has now finished, it ran from February 1998 to March 1999. A brief summary of what was achieved is available in the final report.


The acronym APSET stands for A Parallel Software Engineering Tool, and is a one year project funded by The Open University and carried out by:

David King
Jon Hall
Research Fellow
Lecturer
} The Open University
Phil Trinder Lecturer Heriot-Watt University

Background

The main goal of our work is to provide better runtime profiling information for a parallel functional programming language, namely GpH which stands for Glasgow Parallel Haskell. GpH is Haskell with some extra primitives for expressing parallelism. The most commonly used primitives being the binary operators par and seq that suggest what the user would like to be executed in parallel and what the user would like to be executed sequentially. Semantically, the combinators have the following behaviour:

seq x y = _|_if x = _|_
=yotherwise
par x y=y

Adding par and seq to programs can mix up the algorithmic structure with the description of how it should be evaluated in parallel. Because of this higher-order functions were introduced that allow the original algorithm to remain unchanged, but with a suffix called a strategy that describes its parallel behaviour. For example, mapping the function f over the list [x0, x1, ...,xn] may be parallelised by using:

map f [x0, x1, ...,xn] `using` strategy
where strategy is a function that describes how to parallelise map f [x0, x1, ...,xn].

The compiler for GpH that we are working with is an extension of GHC, i.e. the Glasgow Haskell compiler with two extra components in the runtime system, namely:

The portability of the GpH compiler comes from using abstract C as an intermediate language, and from GUM using the highly ported PVM - Parallel Virtual Machine - for communicating between processes.

Objective

Our objective is to provide tools that give better runtime profiling information for GpH. We hope to do this by providing a primitive that appends labels to strategies, for example:
map f [x0, x1, ...,xn] `using` markStrat "map strategy" strategy
will attribute the cost of evaluating map f [x0, x1, ...,xn] in parallel with the strategy strategy to the label "map strategy". This will allow us to annotate runtime profile graphs which strategy names.

As well as adding markStrat to GpH, we are also interested in better way of visually displaying profiles.

Motivating examples for a strategic profiler

Some of these examples have been produced by using the parallel cost centre profiling implementation grancc (see [3] in the related work section).

Some example strategic profiles



Papers

Talks

Code

Related work

[1] Cost centre profiling
Patrick Sansom provided an execution profiler for the sequential Glasgow Haskell compiler. This provided a primitive scc that allowed costs to be attributed to labels.

[2] Cost centre stack profiling
Stephen Jarvis's work extended Sansom's to record not just the immediate enclosing cost centre but all enclosing cost centres.

[3] Parallel cost centre profiling
Kevin Hammond, Hans-Wolfgang Loidl, and Phil Trinder's work combines cost centre profiling with GpH.

[4] GranSim & GUM
Kevin Hammond, Hans-Wolfgang Loidl, Simon Peyton Jones, and Phil Trinder have written several papers about the GranSim and GUM projects.

[5] An interactive approach to profiling parallel functional programs
Nathan Charles and Colin Runciman are working on a graphical user interface that allows a log-file in a database format to be queried and graphically displayed interactively.

[6] A grammar for self-describing documents
Stephen Jarvis, Simon Marlow, Simon Peyton Jones, and Eric Wilcox have been working on a log file format which is self defining.


David J. King
d.j.king@open.ac.uk