By the way
The recently contributed pypar_balancer.py from Felix Richter implements a
general master-slave framework and you can see how pypar.any_source is used
in conjunction with status.source.
You can see that code at
http://pypar.svn.sourceforge.net/viewvc/pypar/source/pypar_balancer.py?view=markup
Cheers
Ole
On Fri, Jul 25, 2008 at 6:34 PM, Ole Nielsen
<ole...@gm...>wrote:
> Hi Magnar
>
> Thanks for your interest in pypar.
>
> It is possible to receive messages from any source in the MPI standard and
> this is also the case in pypar as in this snippet taken from the bundled
> mandel brot example mandel_parallel_dynamic.py
>
> R, status = pypar.receive(pypar.any_source,
> tag=result_tag,
> return_status=True)
>
> The status object contains various information and in particular you can
> get the source for the message just received through
>
> status.source
>
>
> Hope this helps
> Cheers
> Ole
>
> On Mon, Jul 21, 2008 at 6:12 PM, <mag...@st...> wrote:
>
>> Hi,
>>
>> Is it possible to receive a message without having specified a source in
>> pypar, but with just specifying e.g. a tag? This would come in handy when
>> a master node distributes jobs and waits for results, to send out a new
>> job each time a slave is done. The master would like to first receive the
>> results from the first slave who finishes his job, but we cannot know
>> beforehand which slave that will be.
>>
>> Magnar K. Bugge
>>
>>
>>
>
|