3. Example ProgramsΒΆ

To try out the sample applications, run the example/*.py files. For example, running the Monte Carlo pi calculation program results in:

user% python monte_pi.py -t 1000
3.148 0.00640734641021
Number of Workers: 4
Calculation time: 0.470422029495
Total time: 0.471640825272

Use the -h option to see a list of options for each program.

A genetic algorithm program which uses the workers to evaluate individuals.
Monte Carlo style program which estimates the value of pi by randomly selecting points in a square.
A program which performs no computation, but transfers data between the master and workers. This is useful to time pickling and data transmission times for a given environment.
Parameter sweep program which uses the Miller-Rabin primality test to find prime numbers.
Demonstrates use of the simulation interface.

Previous topic

2. Installation

Next topic

4. Writing a Program with PyMW

This Page