1.1 --- a/README.txt Sat Sep 15 15:46:26 2007 +0000
1.2 +++ b/README.txt Sat Sep 15 15:57:18 2007 +0000
1.3 @@ -10,23 +10,54 @@
1.4 Quick Start
1.5 -----------
1.6
1.7 -Try running the simple examples:
1.8 +Try running the simple examples. For example:
1.9
1.10 -PYTHONPATH=. python examples/simple.py
1.11 PYTHONPATH=. python examples/simple_create.py
1.12 -PYTHONPATH=. python examples/simple_managed.py
1.13 -PYTHONPATH=. python examples/simple_map.py
1.14 -PYTHONPATH=. python examples/simple_pmap.py
1.15 -PYTHONPATH=. python examples/simple_queue.py
1.16 +
1.17 +(These examples show in different ways how limited number of processes can be
1.18 +used to perform a parallel computation. The simple.py and simple_map.py
1.19 +programs are sequential versions of the other programs.)
1.20 +
1.21 +The following table summarises the features used in the programs:
1.22 +
1.23 +Program (.py) pmap MakeParallel manage start create Queue Exchange
1.24 +------------- ---- ------------ ------ ----- ------ ----- --------
1.25 +simple
1.26 +simple_create Yes Yes
1.27 +simple_create_queue Yes Yes
1.28 +simple_managed Yes Yes Yes
1.29 +simple_managed_queue Yes Yes Yes
1.30 +simple_map
1.31 +simple_pmap Yes
1.32 +simple_start Yes Yes
1.33 +simple_start_queue Yes Yes Yes
1.34
1.35 -(A simple example which shows how a limited number of processes can be used to
1.36 -perform a parallel computation. The simple_map.py program is a sequential
1.37 -version of the other programs.)
1.38 +The simplest parallel program is simple_pmap.py which employs the pmap
1.39 +function resembling the built-in map function in Python.
1.40 +
1.41 +Other simple programs are those employing the Queue class, together with those
1.42 +using the manage method which associates functions or callables with Queue or
1.43 +Exchange objects for convenient invocation of those functions and the
1.44 +management of their communications.
1.45 +
1.46 +The most technically involved program is simple_start.py which uses the
1.47 +Exchange class together with a calculation function which is aware of the
1.48 +parallel environment and which communicates over the supplied communications
1.49 +channel directly to the creating process.
1.50 +
1.51 +It should be noted that with the exception of simple_start.py, those examples
1.52 +employing calculation functions (as opposed to doing a calculation inline in a
1.53 +loop body) all use MakeParallel to make those functions parallel-aware, thus
1.54 +permitting the conversion of "normal" functions to a form usable in the
1.55 +parallel environment.
1.56
1.57 The tutorial provides some information about the examples: docs/tutorial.xhtml
1.58
1.59 +Parallel Raytracing with PyGmy
1.60 +------------------------------
1.61 +
1.62 The PyGmy raytracer modified to use pprocess can be run to investigate the
1.63 -potential for speed increases:
1.64 +potential for speed increases in "real world" programs:
1.65
1.66 cd examples/PyGmy
1.67 PYTHONPATH=../..:. python scene.py
1.68 @@ -34,6 +65,9 @@
1.69 (This should produce a file called test.tif - a TIFF file containing a
1.70 raytraced scene image.)
1.71
1.72 +Test Programs
1.73 +-------------
1.74 +
1.75 There are some elementary tests:
1.76
1.77 PYTHONPATH=. python tests/create_loop.py
1.78 @@ -88,7 +122,7 @@
1.79 new processes beyond the process limit: such requests are queued and
1.80 performed as running processes are completed. This permits programs using
1.81 the start method to proceed to consumption of results more quickly.
1.82 - * Extended and updated the examples.
1.83 + * Extended and updated the examples. Added a tutorial.
1.84 * Added Ubuntu Feisty (7.04) package support.
1.85
1.86 New in parallel 0.2.5 (Changes since parallel 0.2.4)