<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Hey Rick,<div><br></div><div>Can we keep this discussion on the mailing list?  Just in case others in the future have similar problems.</div><div><br></div><div>How did you install yt?  If you used the install script, did you remember to activate the yt environment before launching ipcluster?  Is IPython installed into yt's environment?</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 3:31 PM, Rick Sarmento <span dir="ltr"><<a href="mailto:rsarment@asu.edu" target="_blank">rsarment@asu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hum… I used the ipcluster command on the vis node I’m using<div><br></div><div>And I get through all your init steps:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>In [1]:</div><div><br></div><div>from IPython.parallel import Client</div><div>rc = Client()</div><div>In [2]:</div><div><br></div><div>rc.ids</div><div>Out[2]:</div><div>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]</div><div>In [3]:</div><div><br></div><div>%autopx</div><div><div>%autopx enabled</div></div><div><br></div><div>In [4]:</div><div><br></div><div>from mpi4py import MPI</div><div> </div><div>MPI.COMM_WORLD.Get_rank()</div><div> </div><div>Out[0:1]: 8</div><div>Out[1:1]: 1</div><div>Out[2:1]: 14</div><div>Out[3:1]: 7</div><div>Out[4:1]: 9</div><div>Out[5:1]: 15</div><div>Out[6:1]: 6</div><div>Out[7:1]: 12</div><div>Out[8:1]: 4</div><div>Out[9:1]: 0</div><div>Out[10:1]: 5</div><div>Out[11:1]: 10</div><div>Out[12:1]: 2</div><div>Out[13:1]: 11</div><div>Out[14:1]: 3</div><div>Out[15:1]: 13</div><div>In [5]:</div></blockquote><div><br></div>But then it can’t find yt!! <div><br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>import yt</div><div>yt.enable_parallelism()</div><div>import numpy as np</div><div>import os</div><div>import shutil</div><div>import h5py</div><div>import gc</div><div>import glob</div></blockquote><div><br></div><div><pre style="padding:0px;font-size:14px;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;margin-top:0px;margin-bottom:0px;line-height:17.0000591278076px;word-break:break-all;word-wrap:break-word;white-space:pre-wrap;border:0px;vertical-align:baseline;background-color:rgb(255,255,255)"><span style="color:rgb(139,0,0)">AttributeError</span>                            Traceback (most recent call last)<span style="color:rgb(0,100,0)"><ipython-input-3-915313e529f2></span> in <span style="color:rgb(70,130,180)"><module><span style="color:rgb(0,0,139)">()</span>
<span style="color:rgb(0,100,0)">----> 1<span style="color:rgb(165,42,42)"> <span style="color:rgb(0,100,0)">import</span> </span>yt</span><span style="color:rgb(165,42,42)"></span></span>
</pre><pre style="padding:0px;font-size:14px;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;margin-top:0px;margin-bottom:0px;line-height:17.0000591278076px;word-break:break-all;word-wrap:break-word;white-space:pre-wrap;border:0px;vertical-align:baseline;background-color:rgb(255,255,255)"><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)">...</span></span></pre><div><br></div><div><span><span>Weird tho … cuz if I kill the cluster and try again, import YT loads… <b><i>Can you think of anything obvious?</i></b> It’s like my path to yt goes away once I start the cluster … and I’m getting some default version (old) on stampede.</span></span></div><div><span><span><br></span></span></div><div><span><span>Thanks Nathan .. I’m watching the tutorial now … </span></span></div><div><span><span><br></span></span></div><div><span class=""><div>
<div style="text-align:start;text-indent:0px;word-wrap:break-word"><div style="text-align:start;text-indent:0px;word-wrap:break-word"><div style="text-align:start;text-indent:0px;word-wrap:break-word"><div style="text-align:start;text-indent:0px;word-wrap:break-word"><div><i><font size="3">Cheers!</font></i></div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><i><font size="3"><br></font></i></div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><i><font size="3">Rick Sarmento</font></i></div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;font-size:13px">SESE Astronomy/Astrophysics Grad Student</div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;font-size:13px"><a href="mailto:rsarment@asu.edu" target="_blank">rsarment@asu.edu</a></div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><br></div></div><br></div><br></div><br></div><br><br>
</div>
<br></span><div><span class=""><div>On Jan 17, 2015, at 12:54 PM, Rick Sarmento <<a href="mailto:rsarment@asu.edu" target="_blank">rsarment@asu.edu</a>> wrote:</div><br></span><div><div class="h5"><blockquote type="cite"><div style="word-wrap:break-word">Thanks for the info Nathan… <div><br></div><div>I’m trying to use STAMPEDE out at Texas (<a href="http://vis.tacc.xsede.org/" target="_blank">http://vis.tacc.xsede.org/</a>), and they have a way to kick-off access to their 16 core visualization nodes via the web… But that probably doesn’t help given the info below. I’ll try to work with support to see how I can get it to work… </div><div><br></div><div>If I start the cluster using your instructions (via a ssh session), below, I’d have to login — but then I can’t get remote access to the notebook interface because of the firewalls, etc. Although there’s like a way to setup an ssh tunnel, I haven’t figured it out yet.</div><div><br></div><div>Thx!</div><div><br><div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><i><font size="3">Cheers!</font></i></div><div><i><font size="3"><br></font></i></div><div><i><font size="3">Rick Sarmento</font></i></div><div style="font-size:13px">SESE Astronomy/Astrophysics Grad Student</div><div style="font-size:13px"><a href="mailto:rsarment@asu.edu" target="_blank">rsarment@asu.edu</a></div></div></div></div></div></div>
</div>
<br></div><div><span style="font-family:arial,sans-serif;font-size:13px">Hi Rick,</span><br style="font-family:arial,sans-serif;font-size:13px"><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">You need to launch the notebook in parallel using an MPI parallel IPython cluster.  In addition, you will need to configure the notebook to hook into IPython's built-in parallelism.</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I've uploaded a notebook that uses parallel IPython here:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><a href="http://nbviewer.ipython.org/gist/ngoldbaum/32ca07cf4f5b3dd06add" target="_blank">http://nbviewer.ipython.org/gist/ngoldbaum/32ca07cf4f5b3dd06add</a></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Note that all the yt operations aren't really important, but the first few cells where I check to make sure IPython's parallelism works and that MPI parllelism is working are quite important.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Note also that you will need to launch the IPython cluster separately from the notebook server using the "ipcluster" command.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">If you want to learn more about parallel IPython, I'd encourage you to take a look at Min Ranger-Kelley's tutorial from scipy 2014: <a href="http://pyvideo.org/video/2738/interactive-parallel-computing-with-ipython-part" target="_blank">http://pyvideo.org/video/2738/interactive-parallel-computing-with-ipython-part</a></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">All that said, it does add a significant amount of semantic overhead to use the IPython notebook in parallel.  It's generally much more straightforward to work with yt in parallel using regular python scripts.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Hope that helps,</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Nathan<br></div></div><div><br></div></div></blockquote></div></div></div><br></div></div></div></div></blockquote></div><br></div>