[Beowulf] MPI synchronization problem
gdjacobs at gmail.com
Fri Nov 10 20:42:54 PST 2006
Michel Dierks wrote:
> I'm developing an application to calculate the Mandelbrot fractal.
Hmm... I never did this when I was learning the ropes. There is a pretty
example included with the mpich source code to do Mandelbrot fractals if
you need something to crib from.
> My problem is:
> from the master I will send to each free node for computation a message
> containing the values of one screen line.
I would think you can get away with transmitting just the boundaries of
the section of complex plane which you will be plotting, as well as the
iterative limit, color interpretation, etc. Slaves can determine what
portion they must calculate from their ranks.
> After a time the nodes will send back the results.
> I have see that I can use MPI_Isend and MPI_Irecv for non-blocking
> communication. This give me no problem if we are talking about of one
> send and one receive. But how can I handle the sending from each node to
> the master without data corruption.
> Must I implement a send and a receive buffer for each node (16 nodes
> means 16 buffer in and 16 out) ?
The software I've implemented has tended to be rather dynamic, so it
seemed easier to use discrete sends and receives. In your case, you will
be calculating a vector of fixed size on each slave (one row for your
resultant image per). It would be logical to use a collective
communicator like MPI_Gather to automatically populate the array
representing your raster image.
> Can someone help me? Please
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit
Geoffrey D. Jacobs
Go to the Chinese Restaurant,
Order the Special
More information about the Beowulf