Compiling with the P3L compiler

next up previous
Next: Compiler generated files Up: Exploiting parallelism within Previous: Exploiting parallelism within

Compiling with the P3L compiler

The P3L fragment discussed before (see 2) can be used to define a `valid' P3L program, that that is a program that can be compiled by our prototype compiler and run on the parallel target architecture exploiting MAP parallelism. In this example, we will use the Meiko CS1 as a terget.

Currently, a valid P3L program is a pipeline including at least three stages: the first one dealing with data input, the last one dealing with data output and the intermediate stages implementing the actual computation.

A valid program for Mandelbrot computation is built out of three stages: an input stage generating the coordinate values, a second stage computing the mandelbrot set and the third stage outputting the colour matrix. You can see the actual P3L code in mand.p3l

The P3L compiler can be called using a Unix-like command p3l with several options. The logical structure of a P3L program can be automatically generated by calling the P3L compiler with option [-l]. The following command line

  p3l -l mand.p3l
produces the following picture,

in which you can see the three pipeline stages building out our Mandelbrot program. Notice that the second stage has been expanded to depict the actual kind of parallelism exploited. map_emit represents the distribution of the pixel to be computed to the virtual processors, the nodes labelled with |tt pixel represent the virtual processors each one applying the function pixel to a point of the complex plane, and map_coll represents the collection of the produced colours.

An actual compilation for the MEIKO CS1 can be invoked by

  p3l -p mand.p3l
where -p stands for with profiling. This command line results in the following actions taken by the compiler:

The compiler allows the user to explicitely define the value of the parameters of each template using the [-f] option. In this way several different programs using a different number of resources can be easily generated by hand whenever it is needed.

We have used this feature to asses the correctness of the analytic models used within the compiler for the different templates and for testing the strategies adopted for template composition.

Click to get a plot of the results obtained by compiling our mand.p3l program with different amount of resources used and resolution 500.

next up previous
Next: Compiler generated files Up: Exploiting parallelism within Previous: Exploiting parallelism within

The P3l group ( )
Fri Sep 8 17:29:42 METDST 1995