<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div>Without ipcluster local -n 4, when I just launch an ipython shell and execute these two lines, I get an error:<br>
<br></div></div></blockquote><div><br>What if you do it *with* first doing ipcluster local -n 4 in another terminal window (even if there are all those warnings)?<br><br>Cheeers,<br><br>Brian<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div><br>I[1]: from IPython.kernel.client import MultiEngineClient<div class="im"><br>
/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead<br> import sha<br>/usr/lib/python2.6/site-packages/foolscap-0.4.2-py2.6.egg/foolscap/banana.py:2: DeprecationWarning: the sets module is deprecated<br>
<br></div>I[2]: mec = MultiEngineClient()<br><br>---------------------------------------------------------------------------<br>ConnectionRefusedError Traceback (most recent call last)<br><br>/home/gsever/Desktop/<ipython console> in <module>()<br>
<br>/home/gsever/Desktop/python-repo/ipython/IPython/kernel/client.pyc in get_multiengine_client(furl_or_file)<br> 67 """<br> 68 client = blockingCallFromThread(_client_tub.get_multiengine_client, <br>
---> 69 furl_or_file)<br> 70 return client.adapt_to_blocking_client()<br> 71 <br><br>/home/gsever/Desktop/python-repo/ipython/IPython/kernel/twistedutil.pyc in blockingCallFromThread(f, *a, **kw)<br>
70 @raise: any error raised during the callback chain.<br> 71 """<br>---> 72 return twisted.internet.threads.blockingCallFromThread(reactor, f, *a, **kw)<br> 73 <br>
74 else:<br>
<br>/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/internet/threads.pyc in blockingCallFromThread(reactor, f, *a, **kw)<br> 112 result = queue.get()<br> 113 if isinstance(result, failure.Failure):<br>
--> 114 result.raiseException()<br> 115 return result<br> 116 <br><br>/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/python/failure.pyc in raiseException(self)<br> 324 information if available.<br>
325 """<br>--> 326 raise self.type, self.value, self.tb<br> 327 <br> 328 <br><br>ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.<br><br><br>
I had installed Twisted and other parallel computing requirements following the instructions that were listed on the documentation pages.<br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
mec.get_ids()<br><br>It may all be working...all you see are deprecation warnings related to Python 2.6.<br><br>One more word. The parallel computing stuff is not working in trunk right now (I am fixing it),<br>
so please stick with 0.10.<br></blockquote></div><div><br>I was bitten by the trunk a few times. For over a month I am using the downgraded (0.10) version :)<br> </div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Cheers,<br><br>Brian<br><br><div class="gmail_quote"><div><div></div><div>On Sat, Oct 17, 2009 at 5:41 PM, Gökhan Sever <span dir="ltr"><<a href="mailto:gokhansever@gmail.com" target="_blank">gokhansever@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>Hello,<br><br>I want to experiment IPython's parallel computing functionality. This far I couldn't progress much because ipcluster instantiation stalls giving the following messages without dropping me into the main IPython shell. <br>
<br>My intention is parallelise a small Python script that calls an external set of scripts that process the dataset I have in-hand. It is not a huge computing power demanding task but in my Intel 2.5Ghz Dual Core 2 it takes about 1.5 hours to process the whole dataset. Looking at the system monitor I see that the workload is not equally distributed in between CPUs (one of them usually much lazier than the other.) I am sure parallezing the code run would boost the processing speed. In my dataset I have 17 folders and each folder is independent from each other. My script visits each folder and calls the main external script via subprocess module's call function. Processing starts with the first folder, and doesn't work on the next folder unless the processing finishes with the previous folder. Basically, what I really want is to put externally called scripts into separate threads, so that I don't need to wait the previous job to be done during the processing process.<br>
<br>From the IPython parallel computing documentation, it seems like what I want is doable in IPython. However I need some advice whether my understanding is correct in this aspect. Also for the solution of the below warning messages. <br>
<br>Thanks.<br><br><br>[gsever@ccn Desktop]$ ipcluster local -n 4<br>/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead<br>
import sha<br>/usr/lib/python2.6/site-packages/foolscap-0.4.2-py2.6.egg/foolscap/banana.py:2: DeprecationWarning: the sets module is deprecated<br>2009-10-17 18:59:37-0500 [-] Log opened.<br>2009-10-17 18:59:37-0500 [-] Process ['ipcontroller', '--logfile=/home/gsever/.ipython/log/ipcontroller'] has started with pid=11066<br>
2009-10-17 18:59:37-0500 [-] Waiting for controller to finish starting...<br>2009-10-17 18:59:38-0500 [-] '/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead\n import sha\n'<br>
2009-10-17 18:59:38-0500 [-] '/usr/lib/python2.6/site-packages/foolscap-0.4.2-py2.6.egg/foolscap/banana.py:2: DeprecationWarning: the sets module is deprecated\n'<br>2009-10-17 18:59:39-0500 [-] Controller started<br>
2009-10-17 18:59:39-0500 [-] Process ['ipengine', '--logfile=/home/gsever/.ipython/log/ipengine11066-'] has started with pid=11067<br>2009-10-17 18:59:39-0500 [-] Process ['ipengine', '--logfile=/home/gsever/.ipython/log/ipengine11066-'] has started with pid=11068<br>
2009-10-17 18:59:39-0500 [-] Process ['ipengine', '--logfile=/home/gsever/.ipython/log/ipengine11066-'] has started with pid=11069<br>2009-10-17 18:59:39-0500 [-] Process ['ipengine', '--logfile=/home/gsever/.ipython/log/ipengine11066-'] has started with pid=11070<br>
2009-10-17 18:59:39-0500 [-] Engines started with pids: [11067, 11068, 11069, 11070]<br>2009-10-17 18:59:39-0500 [-] '/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead\n import sha\n'<br>
2009-10-17 18:59:39-0500 [-] '/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead\n import sha\n'<br>
2009-10-17 18:59:39-0500 [-] '/usr/lib/python2.6/site-packages/foolscap-0.4.2-py2.6.egg/foolscap/banana.py:2: DeprecationWarning: the sets module is deprecated\n'<br>2009-10-17 18:59:40-0500 [-] '/usr/lib/python2.6/site-packages/foolscap-0.4.2-py2.6.egg/foolscap/banana.py:2: DeprecationWarning: the sets module is deprecated\n'<br>
2009-10-17 18:59:40-0500 [-] '/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead\n import sha\n'<br>
2009-10-17 18:59:40-0500 [-] '/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead\n import sha\n'<br>
2009-10-17 18:59:40-0500 [-] '/usr/lib/python2.6/site-packages/foolscap-0.4.2-py2.6.egg/foolscap/banana.py:2: DeprecationWarning: the sets module is deprecated\n'<br>2009-10-17 18:59:40-0500 [-] '/usr/lib/python2.6/site-packages/foolscap-0.4.2-py2.6.egg/foolscap/banana.py:2: DeprecationWarning: the sets module is deprecated\n'<br>
<br clear="all"><br>Here is my system info:<br>================================================================================<br>Platform : Linux-2.6.29.6-217.2.3.fc11.i686.PAE-i686-with-fedora-11-Leonidas<br>Python : ('CPython', 'tags/r26', '66714')<br>
IPython : 0.10<br>NumPy : 1.4.0.dev<br>================================================================================<br><br>-- <br><font color="#888888">Gökhan<br>
</font><br></div></div>_______________________________________________<br>
IPython-user mailing list<br>
<a href="mailto:IPython-user@scipy.org" target="_blank">IPython-user@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
<br></blockquote></div><br>
</blockquote></div></div></div><br><br clear="all"><br>-- <br><font color="#888888">Gökhan<br>
</font></blockquote></div><br>