My project was to do some parallel algos in C using OpenMP. Now I would like to do the same project in Python. Is there anything available similar to openmp for python?
Asked
Active
Viewed 1.3k times
15
-
4You might find this list useful: http://wiki.python.org/moin/ParallelProcessing – Shawn Chin Oct 25 '12 at 16:18
-
It won't be parallel in CPython, unless the code you're invoking has big chunks of C code in it. Python is not a very good platform for doing anything parallel. – Dietrich Epp Oct 25 '12 at 16:18
-
1See also: http://stackoverflow.com/questions/11368486/openmp-and-python – Shawn Chin Oct 25 '12 at 16:20
-
My opinion is to look at IPython (http://ipython.org) and examples of how they use zeromq to do parallel processing (http://ipython.org/ipython-doc/dev/parallel/parallel_intro.html). You could stick with iPython or try zeromq (or another messaging system) + multiple python interpreters yourself. – jeff.vanvoorst Oct 25 '12 at 20:18
-
I'd suggest using Ray https://github.com/ray-project/ray, which is a library for parallel and distributed Python. It let's you run the same code on a single machine and a large cluster and also provides a clean way to parallelize both functions and classes (using "tasks" and "actors"). – Robert Nishihara Feb 06 '19 at 22:00