[IPython-dev] Parallel programming dependencies
Andrew Jaffe
a.h.jaffe at gmail.com
Tue Apr 29 18:56:12 EDT 2014
Hi,
On 29/04/2014 18:48, Matthias Bussonnier wrote:
> Hi,
>
> Not a parallel user myself,
> but there is the following in ipython/exaple/parallel/dependencies.py
>
> ...
> def getpid():
> import os
> return os.getpid()
>
> pid0 = client[0].apply_sync(getpid)
>
> # this will depend on the pid being that of target 0:
> @depend(checkpid, pid0)
> def getpid2():
> import os
> return os.getpid()
> ...
>
> and lots of stuff that look *a lot* like what you are trying to do.
>
Alas, this stuff is NOT really like what I'm trying to do. In
particular, the particular difference is passing the output of the
earlier tasks to the later ones -- this is a use-case that is very
specifically not addressed in those examples or the docs -- each of the
view.apply calls there just use no arguments, where I want to use the
value calculated by a previous view.apply.
Thanks anyway...
Andrew
More information about the IPython-dev
mailing list