1 Introduction
2 ------------
3
4 The pprocess module provides elementary support for parallel programming in
5 Python using a fork-based process creation model in conjunction with a
6 channel-based communications model implemented using socketpair and poll. On
7 systems with multiple CPUs or multicore CPUs, processes should take advantage
8 of as many CPUs or cores as the operating system permits.
9
10 Quick Start
11 -----------
12
13 Try running the simple example:
14
15 PYTHONPATH=. python examples/simple.py
16
17 (A simple example which shows how a limited number of processes can be used to
18 perform a parallel computation.)
19
20 Or studying some elementary tests:
21
22 PYTHONPATH=. python tests/create_loop.py
23 PYTHONPATH=. python tests/start_loop.py
24
25 (Simple loop demonstrations which use two different ways of creating and
26 starting the parallel processes.)
27
28 PYTHONPATH=. python tests/start_indexer.py <directory>
29
30 (A text indexing demonstration, where <directory> should be a directory
31 containing text files to be indexed, although HTML files will also work well
32 enough. After indexing the files, a prompt will appear, words or word
33 fragments can be entered, and matching words and their locations will be
34 shown. Run the program without arguments to see more information.)
35
36 Some examples are also found in the examples directory, notably the PyGmy
37 raytracer modified to use pprocess:
38
39 cd examples/PyGmy
40 PYTHONPATH=../..:. python scene.py
41
42 (This should produce a file called test.tif - a TIFF file containing a
43 raytraced scene image.)
44
45 Contact, Copyright and Licence Information
46 ------------------------------------------
47
48 No Web page has yet been made available for this work, but the author can be
49 contacted at the following e-mail address:
50
51 paul@boddie.org.uk
52
53 Copyright and licence information can be found in the docs directory - see
54 docs/COPYING.txt and docs/LICENCE.txt for more information.
55
56 For the PyGmy raytracer example, different copyright and licence information
57 is provided in the docs directory - see docs/COPYING-PyGmy.txt and
58 docs/LICENCE-PyGmy.txt for more information.
59
60 Dependencies
61 ------------
62
63 This software depends on standard library features which are stated as being
64 available only on "UNIX"; it has only been tested on a GNU/Linux system.
65
66 New in parallel 0.2.3 (Changes since parallel 0.2.2)
67 ----------------------------------------------------
68
69 * Added convenient message exchanges, offering methods handling common
70 situations at the cost of having to define a subclass of Exchange.
71 * Added a simple example of performing a parallel computation.
72 * Improved the PyGmy raytracer example to use the newly added functionality.
73
74 New in parallel 0.2.2 (Changes since parallel 0.2.1)
75 ----------------------------------------------------
76
77 * Changed the status testing in the Exchange class, potentially fixing the
78 premature closure of channels before all data was read.
79 * Fixed the PyGmy raytracer example's process accounting by relying on the
80 possibly more reliable Exchange behaviour, whilst also preventing
81 erroneous creation of "out of bounds" processes.
82 * Added a removed attribute on the Exchange to record which channels were
83 removed in the last call to the ready method.
84
85 New in parallel 0.2.1 (Changes since parallel 0.2)
86 --------------------------------------------------
87
88 * Added a PyGmy raytracer example.
89 * Updated copyright and licensing details (FSF address, additional works).
90
91 New in parallel 0.2 (Changes since parallel 0.1)
92 ------------------------------------------------
93
94 * Changed the name of the included module from parallel to pprocess in order
95 to avoid naming conflicts with PyParallel.
96
97 Release Procedures
98 ------------------
99
100 Update the pprocess __version__ attribute.
101 Change the version number and package filename/directory in the documentation.
102 Update the release notes (see above).
103 Check the release information in the PKG-INFO file.
104 Tag, export.
105 Archive, upload.
106 Update PyPI.
107
108 Making Packages
109 ---------------
110
111 To make Debian-based packages:
112
113 1. Create new package directories under packages if necessary.
114 2. Make a symbolic link in the distribution's root directory to keep the
115 Debian tools happy:
116
117 ln -s packages/ubuntu-hoary/python2.4-parallel-pprocess/debian/
118
119 3. Run the package builder:
120
121 dpkg-buildpackage -rfakeroot
122
123 4. Locate and tidy up the packages in the parent directory of the
124 distribution's root directory.