Multiprocessing on existing iPython 2.7 code

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiprocessing on existing iPython 2.7 code

minotaurs
Hey, is it possible to use multiple cores to do calculations on an existing iPython 2.7 code? And if it is than how?
Reply | Threaded
Open this post in threaded view
|

Re: Multiprocessing on existing iPython 2.7 code

Thomas Kluyver-2
On 25 July 2014 13:22, minotaurs <[hidden email]> wrote:
Hey, is it possible to use multiple cores to do calculations on an existing
iPython 2.7 code? And if it is than how?

There's not really such a thing as 'IPython code', it's just Python code. There are various parallel processing libraries for Python that you can use, like multiprocessing in the standard library. IPython also has a parallel computing framework, which you can learn about here:

http://ipython.org/ipython-doc/stable/parallel/index.html

Thomas

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: Multiprocessing on existing iPython 2.7 code

minotaurs
So can i just type   import multiprocessing on the top of the page and its already going faster? Or maybe i have to do some clever things with it after importing it?
Reply | Threaded
Open this post in threaded view
|

Re: Multiprocessing on existing iPython 2.7 code

Thomas Kluyver-2
On 25 July 2014 16:19, minotaurs <[hidden email]> wrote:
So can i just type   import multiprocessing on the top of the page and its
already going faster? Or maybe i have to do some clever things with it after
importing it?

You have to do things with it after importing it. See:
https://docs.python.org/3/library/multiprocessing.html

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: Multiprocessing on existing iPython 2.7 code

minotaurs
Ok tnx man will check it out :)