<div dir="ltr"><div class="markdown-here-wrapper" id="markdown-here-wrapper-305491" style><p style="margin:1.2em 0px!important">An important thing to note about ipcluster is that it’s a very complicated way to do something that’s not very complicated. All it sets out to do is:</p>


<ol style="margin:1.2em 0px;padding-left:2em">
<li style="margin:0.5em 0px">start a controller with <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);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">ipcontroller</code> </li>


<li style="margin:0.5em 0px">start 0-many engines with <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);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">ipengine</code></li>


</ol>
<p style="margin:1.2em 0px!important">All of the complexity comes from abstracting how processes actually start, including where machines are, batch systems, etc.  But in the end, it’s just doing: </p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1.2em 0px"><code class="language-bash" 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);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248);white-space:pre;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,255)">$> ipcluster
$> <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">for</span> i <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">in</span> {<span class="number" style="color:rgb(0,153,153)">1</span>..n}; <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">do</span> ipengine; <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">done</span>
</code></pre>
<p style="margin:1.2em 0px!important">ipcluster makes some simple cases easier, but if it doesn’t do what you want, you can always start the controller and engines yourself, with no loss of functionality. Plus, a tool that only deploys a cluster on your own system is much simpler than one that tries to work in a wide variety of contexts like ipcluster. </p>


<p style="margin:1.2em 0px!important">The basic steps in getting a cluster up and running:</p>
<ol style="margin:1.2em 0px;padding-left:2em">
<li style="margin:0.5em 0px">configure the controller to listen on an IP visible to the other machines (<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);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">c.HubFactory.ip = '1.2.3.4'</code> in <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);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">ipcontroller_config.py</code> on the controller machine. </li>


<li style="margin:0.5em 0px">start the controller with <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);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">ipcontroller</code></li>


<li style="margin:0.5em 0px">copy <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);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">.ipython/profile_default/security/ipcontroller-*.json</code> to all of the various machines on which you plan to start engines.</li>


<li style="margin:0.5em 0px">start <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);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">ipengine</code> as many times as is appropriate on each machine. </li>


</ol>
<p style="margin:1.2em 0px!important">Step 3. is unnecessary if your systems are on a shared filesystem.</p>
<p style="margin:1.2em 0px!important">For instance, here is a simple version that starts a controller and engines with ssh on Linux or OS X machines, putting processes in the background with screen: </p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1.2em 0px"><code class="language-bash" 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);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248);white-space:pre;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,255)">$> ssh controller_host screen -dmS ipcontroller
$> <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">for</span> host <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">in</span> host1 host2; <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">do</span>
> scp ~/.ipython/profile_default/security/ipcontroller-*.json <span class="variable" style="color:rgb(0,128,128)">$host</span>:.ipython/profile_default/security/ 
> ssh <span class="variable" style="color:rgb(0,128,128)">$host</span> <span class="string" style="color:rgb(221,17,68)">'for n in {1..3}; do screen -dmS ipengine; done'</span>
> <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">done</span>
</code></pre>
<p style="margin:1.2em 0px!important">Which is <em>a lot</em> simpler than the hundreds of lines of ipcluster, and, frankly, better behaved than the SSH launchers that ship with IPython. </p>
<p style="margin:1.2em 0px!important">If you have Windows analogues for ‘tell machine X to run command Y,’ you can make a similar script, tailored to your use.</p>
<p style="margin:1.2em 0px!important">-MinRK</p>
<p style="margin:1.2em 0px!important">On Tue, May 6, 2014 at 11:35 AM, Jason Roberts <<a href="mailto:jason.roberts@duke.edu" target="_blank">jason.roberts@duke.edu</a>> wrote:</p>
<p style="margin:1.2em 0px!important"></p><div class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">I have a situation where I have to use MS Windows for a big parallel processing job, due to Windows dependencies on some steps in the job. I have successfully used iPython on a single 16-processor machine for this purpose. Thank you very much for making this so easy to use! It has saved me a huge amount of time.<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">Now, if possible, I would like to set up a cluster that has multiple Windows servers (Windows Server 2008 R2 Standard). The iPython documentation (<a href="http://ipython.org/ipython-doc/dev/parallel/parallel_process.html" target="_blank">http://ipython.org/ipython-doc/dev/parallel/parallel_process.html</a>) describes several options. The one that seems best oriented for Windows, at least under the assumption that Microsoft technologies are the best choice for Windows, is to use Microsoft HPC Pack 2008 (<a href="http://ipython.org/ipython-doc/dev/parallel/parallel_winhpc.html" target="_blank">http://ipython.org/ipython-doc/dev/parallel/parallel_winhpc.html</a>). I tried this. Unfortunately HPC Pack appears to require Active Directory to be deployed. My shop runs a mixture of different operating systems, and while we have LDAP, we do not have a full-blown deployment of Active Directory. This appears to rule out the HPC Pack option.<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">Are there other alternatives for running an iPython cluster composed of multiple Windows servers, and which is best? Should I look at mpiexec with Open MPI? Is there some way to do it with SSH, despite the iPython documentation saying not?<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">Thanks for any advice you can provide, and thanks again for iPython’s parallel processing infrastructure. It truly is a time saver.<span><font color="#888888"><u></u><u></u></font></span></span></p>


<span><font color="#888888"><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">Jason<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""><u></u> <u></u></span></p></font></span></div></div><br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">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></blockquote><p></p></div><p style="margin:1.2em 0px!important"></p>
</div></div>