[IPython-User] Parallel: Need at least as many tasks as engines?

John Reid j.reid@mail.cryst.bbk.ac...
Tue Nov 9 08:58:07 CST 2010


Hi,

I'm finding problems when I have more engines than tasks. I'm following 
the example at:
http://ipython.scipy.org/doc/stable/html/parallel/parallel_multiengine.html#quick-and-easy-parallelism

If I start a cluster with 3 engines thus:
ipcluster local -n 3

and then run

from IPython.kernel import client
mec = client.MultiEngineClient()
parallel_result = mec.map(lambda x:x**10, range(2))

I get an error
[2:execute]: TypeError: map() requires at least two args

However if I have just 2 engines running everything is ok. It seems 
strange that the client should have to be aware of the number of engines 
in the cluster. I get a similar problem via the parallel function 
decorator technique.



I'm using
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)

and

IPython 0.10

Cheers,
John.



More information about the IPython-User mailing list