Copyright 1998-1999, University of Notre Dame.
Authors: Jeffrey M. Squyres, Kinis L. Meyer with M. D. McNally 
         and Andrew Lumsdaine

This file is part of the Notre Dame LAM implementation of MPI.

You should have received a copy of the License Agreement for the Notre
Dame LAM implementation of MPI along with the software; see the file
LICENSE.  If not, contact Office of Research, University of Notre
Dame, Notre Dame, IN 46556.

Permission to modify the code and to distribute modified code is
granted, provided the text of this NOTICE is retained, a notice that
the code was modified is included with the above COPYRIGHT NOTICE and
with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
file is distributed with the modified code.

LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
By way of example, but not limitation, Licensor MAKES NO
REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
OR OTHER RIGHTS.

Additional copyrights may follow.


Mandelbrot is a simple example of the master/slave parallel
programming technique, written in C.  It runs with one master process
and any number of slaves.  Since it is MIMD, it requires an application
schema (see myapp) to run it with mpirun.  The master writes the
computed image into a Sun rasterfile formatted file.  Try viewing
it with X11/xv.

This application contains a measure of fault tolerance.  Slaves can die
and the application will continue with less slaves, as long as one
slave is alive.  This feature relies on the MPI system reporting
errors on MPI functions whose communicator includes a dead slave.
Since the application creates a separate communicator for each slave,
the master will know from a returned error which slave has died.
The application cannot tolerate the untimely death of the master,
although this could be done with mirroring.

Use hcc to compile the programs.

hcc -o master master.c 
hcc -o slave slave.c 
