<div dir="ltr"><div class="markdown-here-wrapper" id="markdown-here-wrapper-545271" style><p style="margin:1.2em 0px!important">You can also monitor the progress with simple print statements by <a href="https://gist.github.com/minrk/6171348">viewing <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">ar.stdout</code></a></p>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 4:34 PM, Fernando Perez <span dir="ltr"><<a href="mailto:fperez.net@gmail.com" target="_blank">fperez.net@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
these two notebooks provide examples of monitoring a parallel run (in<br>
this case an MPI one, but you can adapt this to your use case). The<br>
first uses engine-driven data publication, the second uses client-side<br>
polling in a thread; each approach has its pros and cons:<br>
<br>
<a href="http://nbviewer.ipython.org/urls/raw.github.com/ipython/ipython/master/examples/parallel/InteractiveMPI-publish-data.ipynb" target="_blank">http://nbviewer.ipython.org/urls/raw.github.com/ipython/ipython/master/examples/parallel/InteractiveMPI-publish-data.ipynb</a><br>
<br>
<a href="http://nbviewer.ipython.org/urls/raw.github.com/ipython/ipython/master/examples/parallel/InteractiveMPI.ipynb" target="_blank">http://nbviewer.ipython.org/urls/raw.github.com/ipython/ipython/master/examples/parallel/InteractiveMPI.ipynb</a><br>
<br>
And here is a bit more info on the structure of async results that can<br>
be used for timing/monitoring:<br>
<br>
<a href="http://ipython.org/ipython-doc/rel-1.0.0/parallel/asyncresult.html#timing" target="_blank">http://ipython.org/ipython-doc/rel-1.0.0/parallel/asyncresult.html#timing</a><br>
<br>
I seem to recall Min had some more examples of this, but can't seem to<br>
find them right now.<br>
<br>
Cheers,<br>
<br>
f<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Aug 12, 2013 at 1:50 PM, Darlan Cavalcante Moreira<br>
<<a href="mailto:darcamo@gmail.com">darcamo@gmail.com</a>> wrote:<br>
><br>
> Hi list,<br>
><br>
> I'm using the fantastic parallel computing machinery from IPython, which<br>
> works really well. However, the simulations I'm performing take a few<br>
> hours to finish and I'd like to see the progress from each engine. The<br>
> number of tasks is small (usually from five to eight) such that only<br>
> knowing how many tasks have finished is not very useful for me. I need<br>
> to track the progress of each individual task.<br>
><br>
> To give an example, with the multiprocessing module I could create a<br>
> Queue that I can pass as argument to the task that will run in the other<br>
> process. My tasks are basically a for loop running a few lines of code<br>
> in each iteration. Therefore, the task can put the iteration number in<br>
> the Queue indicating its progress, which is then read (every 5 seconds)<br>
> from another process that finally prints the progress in the terminal.<br>
><br>
> However, I have no idea how I can do this with the IPython parallel<br>
> machinery. Is there any way for the engines to send data back (to the<br>
> controller?) that I can use to track their progress?<br>
><br>
><br>
> --<br>
> Darlan Cavalcante<br>
> _______________________________________________<br>
> IPython-dev mailing list<br>
> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Fernando Perez (@fperez_org; <a href="http://fperez.org" target="_blank">http://fperez.org</a>)<br>
fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)<br>
fernando.perez-at-berkeley: contact me here for any direct mail<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</div></div></blockquote></div><br></div>