[Beowulf] emulating MPI?
srihari at mpi-softtech.com
Mon Jun 28 13:43:37 PDT 2004
MPI specification has been designed with no particular parallel
architecture on mind, AFAIK. One of the goals behind MPI was to alleviate
the parallel application writer from the details of the underlying
parallel plaform. That's why when you write a parallel application using
MPI, your application will run on any platform, ranging from a single
machine, a cluster of workstations, to a large SMP box (the assumption is
you don't have any platform-specific calls in your code, external to MPI),
with just a recompilation of the code on the particular platform with the
platform-specific MPI implementation.
However, on the other hand, using MPI on a single workstation is probably
not the best choice. In order to guarantee portability, MPI is based on
explicit message-passing. So, unless the specific MPI implementation you
are using is smart enough to detect the fact that you are running on a
single box, and somehow take advantage of this fact for doing
communication, you are not gauranteed the best performance out of the box.
Some MPI implementations have this ability to choose the best
communication medium and/or OS facilities available from the underlying
platform (e.g. shared memory as an IPC mechanism on a symmetric
multi-processor machine), and thus offer you the best value for using MPI
(both performance and portability, transparent to you).
If you know that your application will always run on a single box (either
single CPU or multiple CPUs), you should probably think about something
like OpenMP or POSIX threads.
Hope that helps.
On Mon, 28 Jun 2004, Douglas Eadline, Cluster World Magazine wrote:
> On Mon, 28 Jun 2004, John Wohlbier wrote:
> > Hi,
> > I'm wondering if there is a way to emulate MPI,
> > so that MPI software development may be done on a single
> > processor box and run with "virtual nodes."
> > Thanks! (Sorry if this is the wrong list for such a question.)
> Sure. Both LAM and MPICH (P4 device) start processes that represent
> parallel jobs (i.e. usually the -np argument). They also use a "nodes"
> file to map the processes to specific nodes in the cluster. (spawning jobs
> on other nodes can be done in a variety of ways, ssh, rsh, bps, daemons)
> If your nodes file is one node (localhost), they will all start on the
> same node. However, if you program requires a lot of memory, then you will
> quickly swamp the single node. If you just want to play with MPI this is
> an easy way to do so without having to build/find a cluster. This can be
> done for PVM as well.
> > jgw
> > _______________________________________________
> > Beowulf mailing list, Beowulf at beowulf.org
> > To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
> Editor-in-chief ClusterWorld Magazine
> Desk: 610.865.6061
> Fax: 610.865.6618 www.clusterworld.com
> 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