[Beowulf] What now?

Mark Hahn hahn at physics.mcmaster.ca
Wed Aug 18 09:58:38 EDT 2004

> to MPI, it just runs the same code on all the nodes. How might I split it up? 
> Ie, have one node that comes up with numbers and keeps track, and others that 
> test if it's prime? 

you bet, that's the first and most obvious approach.  books on parallel
programming often call this the master-worker model.  it has obvious
shortcomings, such as what if the master is too busy, or not busy enough?
the model can also involve too much communication, if a single work unit
doesn't take the worker long enough to solve.  so it's common to pass out
work units containing a whole range of candidates.  further, consider
factorization when implemented by division by primes - workers need to know
all primes up to sqrt(candidate), so you might have to pass along any 
new-found primes to workers, as well.

for extra credit, figure out a way to use only peers, rather than
master-worker.  this is usually very easy if you map an MPI process's 
rank onto a regular grid.  notice that regular grids become a problem 
if the work is not uniform for each grid cell - BANG!  you've reached
adaptive grids, which is pretty close to the state of the art, and now 
know everthing there is to know about parallel programming ;)

> I don't really expect an answer to that question, I was simply wondering if 
> anyone might know of some articles/tutorial/etc that deal with this.

a trip to a library or bookstore will be very rewarding, really.  books on
MPI and parallel programming will cover this stuff.

regards, mark hahn.

Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf

More information about the Beowulf mailing list