[execnet-dev] Little question

holger krekel holger at merlinux.eu
Thu Feb 17 16:26:32 CET 2011


Hi Paolo,

is the attached example roughly what you need? 
It opens 2 gateways per dual-core machine, conceptually.
That's easier than multiplexing which we could implement
if neccesary, like with a 256 core machine or so :)

cheers,
holger

On Thu, Feb 17, 2011 at 15:56 +0100, Paolo Basso wrote:
> Yes, I looked there but, as far as I can understand, there isn't an example
> which satisfies my question.
> Maybe I'm wrong but what if I'm in a case like this:
> 
> - a cluster of 3 computers (2 cores each)
> - I have to evaluate 8 items
> 
> The most natural thing should be to create 3 different gatways and 2 channel
> for each gatway.
> But if I have to assign "a priori" the items to the channels how can I do
> this?
> I mean, I can see the possibility to create 3 channels for the first two
> gatways and 2 for the last one (so that I have 8 items and 8 channels) and
> get the results with "mch.receive_each()". But who told me that is better to
> subdivide the channels like this?
> I would prefere something like "mch.sandcallback()" which automatically
> sends back a new item to the first free channel till the end of the items,
> independently of the number of channels.
> 
> Thanks,
> 
> Paolo
> 
> 
> 
> 2011/2/17 holger krekel <holger at merlinux.eu>
> 
> > Hi Paolo,
> >
> > have you looked at
> > http://codespeak.net/execnet/example/test_multi.html
> > and the example section in general yet?
> >
> > best,
> > holger
> >
> > On Thu, Feb 17, 2011 at 10:42 +0100, Paolo Basso wrote:
> > > Hi,
> > >
> > > I'm new to the list and to execnet.
> > > I'm trying to figure out if it is possible to send n items to k channels
> > > (where n>k) so that, as soon as the first of the k channels sends back
> > its
> > > result, immediatly takes the next item (k+1) in the list and so on.
> > > Can anybody illuminate me?
> > >
> > > Thanks,
> > >
> > > Paolo
> >
> > > _______________________________________________
> > > execnet-dev mailing list
> > > execnet-dev at codespeak.net
> > > http://codespeak.net/mailman/listinfo/execnet-dev
> >
> >
> > --
> >

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multi_channel.py
Type: text/x-python
Size: 659 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/execnet-dev/attachments/20110217/194767f1/attachment.py>


More information about the execnet-dev mailing list