Newsgroups: comp.parallel.mpi
From: Stephen Barnard <steve@megafauna.com>
Reply-To: steve@megafauna.com
Subject: Re: Processor Farm with MPI ??
Organization: megafauna
Date: Fri, 05 Apr 1996 06:47:55 -0800
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <3165329B.6CF9@megafauna.com>

Pascal Legrand wrote:
> 
> --
> 
> Pascal Legrand         )\._.,--....,'``.        Centre Charles Hermite
> Tel. : 83 59 20 67    /,   _.. \   _\  ;`._ ,.  CRIN-CNRS-INRIA Lorraine
> Fax. : 83 27 83 19    `._.-(,_..'--(,_..'`-.;.' BP 101
> Pascal.Legrand@loria.fr                         54602 Villers les Nancy cedex
>                        http://www.loria.fr/~legrand
> 
>     ---------------------------------------------------------------
> 
>                 Dear all,
> 
> I am a new user of MPI and I want to implement a
> parallel program according to the processor farm
> model : a farmer process distributes tasks to
> slave processes. The processing time of each task
> is no constant.  So, the master process can receive
> a message from any slave at any time ; master process
> must submit another task to this slave process.
> 
> Is it possible with MPI, to deal with ``anonymous
> receive'' (blocking or non blocking communication)?
> 
> Tank's for any help,
> 
>         Pascal

You'll need to write a communications server.  Look at MPI_Probe.
Basically, your "farmer" process will continuously probe for messages 
from the slaves and service them appropriately.  The same idea can be 
used to emulate shared memory by running a server on every processor.
It can also be used to redistribute work for dynamic load balancing.

A very useful routine, that MPI_Probe.

	Steve Barnard

