140 points · by federicoponzi · 9y ago · 45 comments
- IPython parallel (https://ipyparallel.readthedocs.io/en/latest/ ) is pretty much the same idea but under active development, supports both local processes, small clusters, cloud computng, an HPC environments (SGE style supercomputing schedulers).
- Joblib is a great tool for common embarrassingly parallel problems - run on many cores with a one liner (https://pythonhosted.org/joblib/index.html)
- Dask provides a graph-based approach to lasily building up task graphs and finding an optimal way to run them in parallel (http://dask.pydata.org/)
EDIT: I was wrong, there is some activity in a different branch of the forum [1]. Last release almost two years ago.
[1] http://www.parallelpython.com/component/option,com_smf/Itemi...
When I ported my stuff, I discovered that some of the libraries I used were unmaintained and I replaced them by a newer library.
Q) What Python versions are supported?
A) PP was tested with Python 2.3 - 2.7 on a variety of platforms.
I also liked this book http://www.parallel-algorithms-book.com/ (free draft copy) it identifies which algorithms are best candidates for running in parallel/divide and conquer strategy, like the analysis on MergeSort vs Quicksort.
Not saying it's a bad idea, but it's a totally different approach.
We never have to leave Python 2, if we do not want to.
There is still the multiprocessing module which can spawn processes, so you can effectively run code in parallel. It's pain to manage though.
I think in the end I am grateful for no parallel threading in Python as it forces me to either do things so that they can be run in naive-parallel, or to use things that have the concurrency solved out of Python.
(but it's a little hacky..)
Python's parallelism options are "share everything (but with only one thread computing at a time)", or "share nothing" in a different process on the same machine. If you're parallelizing to get extra crunch power, neither is efficient.
It's better described as having only explicit sharing (as opposed to classic threading models, which have implicit sharing.)