<p dir="ltr">Hi Yuan,</p>
<p dir="ltr">Oh, somehow I completely spaced on this, but BP1D is by default not memory conservative but a_p_s is.</p>
<p dir="ltr">Supply the argument:</p>
<p dir="ltr">lazy_reader=True</p>
<p dir="ltr">when you create the BP1D, and it should fix it.</p>
<p dir="ltr">Sorry about that!</p>
<p dir="ltr">Matt</p>
<div class="gmail_quote">On Jul 19, 2013 3:43 PM, "Yuan Li" <<a href="mailto:bear0980@gmail.com">bear0980@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Hi Matt,<br><br></div>I thought about the first one too. It did not seem to matter whether or not I cut the region.<br><br></div><div>yt instinfo gives me this:<br></div>The current version of the code is:<br>


e3e4f4578504<br><br></div>I have just updated yt again, and I am still getting the same error message. I did manage to make the plots with 64 gb memory, so I guess it really was just a memory issue. It would be great if BinnedProfile1D could be more memory conservative, but for now, I will use add_profile_sphere whenever possible. <br>

<div><br><br></div><div>Thanks!<br></div><div>Yuan<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 19, 2013 at 8:16 AM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@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 Yuan,<br>
<div><br>
On Thu, Jul 18, 2013 at 9:43 PM, Yuan Li <<a href="mailto:bear0980@gmail.com" target="_blank">bear0980@gmail.com</a>> wrote:<br>
> Hi yt users,<br>
><br>
> I have been having trouble using BinnedProfile1D. I am using the same script<br>
> that seemed to be working before. Now it is giving me "MemoryError":<br>
> <a href="http://paste.yt-project.org/show/A67caGKsv6mFqA83MZoZ/" target="_blank">http://paste.yt-project.org/show/A67caGKsv6mFqA83MZoZ/</a><br>
><br>
> I can still use it on a low resolution run without a problem.<br>
><br>
><br>
> I am not sure why it needs so much memory (I am already asking for 30 gb of<br>
> memory). If I do a similar analysis with plotcollection and<br>
> add_profile_sphere for the same data, I do not need to ask for much memory<br>
> at all. I thought BinnedProfile1D would need less memory than<br>
> add_profile_sphere. Please let me know if I was wrong and the job simply<br>
> requires a lot of memory.<br>
><br>
> What I am trying to do is just very basic analysis:<br>
> ...<br>
> sp=pf.h.sphere([0.5, 0.5, 0.5], rmax/pf['kpc'])<br>
> sp_in=sp.cut_region(["grid['Theta']>0.6"])<br>
> prof=BinnedProfile1D(sp_in, 128, "Radiuskpc", 1e-2,rmax)<br>
> r=prof["Radiuskpc"]<br>
> prof.add_fields("Temperature",weight="CellMassMsun")<br>
<br>
</div>Hm, this looks okay to me.  The only two things that I think could be a problem:<br>
<br>
 * Have you tried it on the sp object instead of sp_in?  It may be<br>
that the cut_region is not operating in a memory conservative way.<br>
 * Which version are you on?  (yt instinfo should tell you)  A month<br>
or so ago we identified (thanks to Mike Kuhlen and Nathan Goldbaum) a<br>
way to dramatically reduce memory used in radius fields.  That may be<br>
relevant here.<br>
<br>
-Matt<br>
<div><br>
> ...<br>
><br>
><br>
> It usually fails at the temperature part. Please let me know if you have any<br>
> ideas or suggestions.<br>
><br>
> Thank you!<br>
> Yuan<br>
><br>
</div>> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div>