One of the simplest parallel programming paradigm is
"master-slave". The main computation (the master) generates many
subproblems, which are fired off to be executed by "someone else"
(slave). The only interaction between the master and slave
computations is that the master starts the slave computation, and the
slave computation returns the result to the master. There are no
significant dependencies among the slave computations. Although the
parallel paradigm is simple, you still have to write a lot of code to
use this paradigm on, say, a cluster of workstations. We have
developed a library that simplifies development of master-slave
applications.
The library is available as a prt of the Charm distribution.
It provides a call, to be used by the master, for firing off a
subproblem with desired parameters, and another call that allows the
master to wait for the results of the fired computations. You can
either wait in a blocking mode for a specific result, or wait for "any
of the pending" results. The system provides automatic load balancing
of the pending slave tasks among available processors and automates
the communication between master and slaves.
Typical applications of this library include genetic algorithms,
certain Monte Carlo techniques, simple cryptography style applications
(or any application where a SETI-at-home type approach is feasible).
|