OcamlP3l is a programming environment that allows to write parallel
programs in ocaml
according to the skeleton model
supported by the parallel language P3L.
The skeleton parallel programming model supports structured parallel
programming. The parallel structure/behaviour of any application has
to be expressed by properly nesting some skeletons picked up
out of a set of predefined skeletons.
Each skeleton models a typical pattern of parallel computation and it
is parametric in the computation performed in parallel.
The ocamlp3l skeletons can be understood looking at their sequential semantics as well as
to their informal parallel semantics (pipe, farm, loop, map, reduce).
As an example, we can build an ocamlp3l program whose parallel
structure is the following (in terms of skeletons):
This describes a parallel computation structured as a pipeline built
out of two stages. In turn, these stages can be structured by using
skeletons:
From this schema, we see that the first stage of the pipe is actually
a farm, computing function f while the second stage, in turn,
is another two stage pipe, computing the map of function g in
the first stage and the reduce of function h in the second
one.
Due to the semantics of the skeletons used, and due to the arity
of the pipe skeleton, the application could also have been
structured as follows:
These three "application outlines" correspond to the following
(incomplete) ocamlp3l code:
- let stage1 x = ... ;; let stage2 x = ... ;; let prog =
seq(stage1) ||| seq(stage2);;
- let f x = ... ;; let g x = ... ;; let h x = ... ;; let prog =
seq(farm(seq f),3) ||| (map((seq h),5) ||| reduce(seq g));;
- let f x = ... ;; let g x = ... ;; let h x = ... ;; let prog =
seq(farm(seq f),3) ||| map((seq h),5) ||| reduce(seq g);;
Look here to understand how you can develop
ocamlp3l programs.