| 1 | initial version |
If your problem is trivially parallel (independent tasks) then you can just use the @parallel decorator:
sage: @parallel
....: def f(x):
....: return x^2
....:
sage: list(f(range(10)))
[(((0,), {}), 0), (((1,), {}), 1), (((2,), {}), 4), (((3,), {}), 9), (((4,), {}), 16), (((5,), {}), 25), (((6,), {}), 36), (((7,), {}), 49), (((8,), {}), 64), (((9,), {}), 81)]
This will use all cores of your computer to work in parallel. Of course you can use any of the other Python tools you mentioned to distribute your work tasks.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.