LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Tomek (toko_at_[hidden])
Date: 2004-11-26 10:34:37


> Yes. Looks like a pretty straightforward use of MPI_COMM_SPAWN.
Ok - didn't know that - thanks

> However, rather than use the MPI_COMM_SPAWN interface, is there much of
> a difference between these two scenarios:
>
> 1. Launch ./foo, and foo spawns its workers, uses them, and then they
> all die together.
>
> 2. Launch "mpirun -np X foo" (or, if you need MPMD, perhaps "mpiexec -n
> 1 master : -n X slave"). They all launch together, do work, and then
> die together.
>
> If you know you're going to be parallel from the beginning, you can
> save yourself some programming effort by using mpirun instead of
> MPI_COMM_SPAWN. There really isn't much of a difference between the
> two, and if you're looking to save debugging time, mpirun (or mpiexec)
> is certainly an easier way to go. The PVM mindset of having a
> singleton "./foo" spawn off workers is frequently unnecessary with MPI
> and adds extra programming complexity.

The difference is in elegance. Imagine a software that uses a number of third
party libraries utilizing MPI. Let's say that your software is a pretty big
binary. And let's assume that from N 3d party libs some use SPMD ans
other MPMD scheme. So you have to adjust it to be able to run in slave mode
for some of the libraries (how to chose whose slave routine is to be called at
certain times for specific libraries ?) - then you have all the binary
coppied around the cluster nodes, only to call a single slave routine in it;
for the rest of libraries you will have to run workers in a specific order -
so they could use this
order to create groups and then create communicators (I imagine that it would
require some hacking as some libraries assume to be the only ones
int the workspace and they eventually create additional communicators
for internal needs and not for separating itself from the oders)
Or is there possible to distinguish group not accoring to the order but
just nameing it somehow ?

Anyway - the idea of having things transparent for the user seems to be
worth additional programming cost for me.

As I said - I have been dealing with MPI only for the last few days so my
awarenes of it is quite bacis.

Thanks again for your feedback,
Tomek