On Fri, 15 Aug 2003, Timothy M Collins wrote:
> I have installed lam-mpi 7.0 which comes with mandelbrot graphical
> example. unfortunately I cant find any 'real' how-to for mandelbrot. Can
> anyone please advice me of how to use that mandelbrot or direct me to
> where I can find a proper how-to for mandelbrot
>
> master and slave compile ok, but I don't know what to do with them after
> compiling.
Looks like the README in that directory is a bit lacking, to say the
least. Oops!
After you compile it, note that it's a MIMD program -- a separate
executable is used for the master (master) and for the workers (slave).
So you'll use mpirun's "application schema" (or "app schema") capabilities
to launch it. This loosely means that you'll make a text file that
specifies which program to run on which CPU/node, and LAM will launch them
all together in one MPI_COMM_WORLD.
App schemas take one program per line (comments begin with #) and can take
many of the same command line options as mpirun itself.
The mandlebrot example ships with a sample application schema -- a file
named "myapp". For example, it has a lot of comments, but boils down to
two important lines:
-----
h $builddir/examples/mandelbrot/master
C -s h $builddir/examples/mandelbrot/slave
-----
where "$builddir" is replaced with the name of the directory where you
built LAM/MPI.
The first line launches one copy of "master" on the "h" (here) node.
The second line launches one copy of "slave" on every CPU in the LAM
universe (C), and sends the executable from the "here" node (-s h). The
"-s h" is not necessary if you have a shared filesystem, but it's the
safest thing that we can do in an example app schema.
You can run this app schema with:
mpirun myapp
And that should run the mandlebrot program.
Hope this helps; I'll go update that README right now.
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|