Parallel Functional Programming with Skeletons:

the OCAMLP3L experiment

Marco Danelutto, Roberto Di Cosmo, Xavier Leroy and Susanna Pelagatti

Abstract

Writing parallel programs is not easy, and debugging them is usually a nightmare. To cope with these difficulties, a structured approach to parallel programs using skeletons and template based compiler techniques has been developed over the past years by several researchers, including the P3L group in Pisa.

q This approach is based on the use of a set of primitive forms that are just functionals implemented via templates exploiting the underlying parallelism, so it is natural to ask whether marrying a real functional language like Ocaml with the P3L skeletons can be the basis of a powerful parallel programming environment. We show that this is the case: our prototype, written entirely in Ocaml using a limited form of closure passing, allows a very simple and clean programming style, shows real speed-up over a network of workstations and, as an added fundamental bonus, allows logical debugging of parallel programs in a sequential framework without changing the user code.