<div dir="ltr"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">Thank you for the great response.<br class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Unfortunately I'm not able to share the data at this point.<br class="gmail_msg"></div><div class="gmail_msg">I tried switching from using a timeseries to using the path to each output folder as you suggested. <br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg">It seems that even if I strip my code down to the bare essentials where I just load each sim in a for loop and load the field list, it keeps every sim in memory as long as the for loop is still running. It does drop them all at the end of the loop but I would like each to be dropped when the next one loads.<br class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">However, if I try saving a projection plot, for each run through the loop, it does not drop the simulations when the loop finishes.</div><div class="gmail_msg">By saving I mean both saving the plot to disk and keeping the figure object in an array for later use.</div><div class="gmail_msg"><br></div><div class="gmail_msg">Does this help at all?</div><div class="gmail_msg"><br class="gmail_msg"><br></div><div class="gmail_msg">The axis names I was referring to was the axes on the ProfilePlot object, not the ProjectionPlot one. Specifically the 1D profile one with a simple x and y axis. Could you please point me in the right direction?</div><div class="gmail_msg"><br></div><div class="gmail_msg"><br></div><div class="gmail_msg">Best,<br class="gmail_msg"></div><div class="gmail_msg">Andreas Ellewsen<br class="gmail_msg"></div></div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Wed, 14 Dec 2016 at 16:18 Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" class="gmail_msg" target="_blank">nathan12343@gmail.com</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On Wed, Dec 14, 2016 at 5:30 AM, Thor Andreas Seiff Ellewsen <span dir="ltr" class="gmail_msg"><<a href="mailto:tellewsen@gmail.com" class="gmail_msg" target="_blank">tellewsen@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">Hi all,<br class="gmail_msg"><br class="gmail_msg"></div>I'm working on a project where I'm comparing different RAMSES simulations.<br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">However I'm running into a problem with memory.<br class="gmail_msg"></div><div class="gmail_msg">It seems that yt loads the whole simulation into memory even though I'm only interested in a number of dark matter halos which I have the coordinates for.<br class="gmail_msg"></div></div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Yes, this is a limitation of our current approach for octree data, we must build a global octree for indexing purposes. For large simulations this can be a prohibitive memory cost. We have long-term plans to fix this but as far as I know no one is actively working on it.</div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">It also seems like it doesn't drop the first simulation out of memory when I'm done making the figures I want for that one. </div></div></div></div></blockquote><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">This quickly fills up the memory.<br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">You can find the relevant parts of my code at the pastebin at <a href="http://paste.yt/p4946.html" class="gmail_msg" target="_blank">http://paste.yt/p4946.html</a><br class="gmail_msg"></div><div class="gmail_msg">I'm running yt version 3.3.2<br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">What am I doing wrong?<br class="gmail_msg"></div></div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><div class="gmail_msg">In principle this shouldn't happen but it's entirely possible there is a bug somewhere. In the python memory model, an object is retained in memory until no other object have a reference to it, at which point it is garbage collected. I don't see anything in your script that would cause references to old datasets to be retained, so it might be the case that yt is inadvertantly retaining a reference to datasets in a ramses time series when it shouldn't be or if we need the reference that we should be using a weakref. Unfortunately it looks like we don't have any Ramses time series datasets available in our repository of public test datasets (<a href="http://yt-project.org/data/" class="gmail_msg" target="_blank">http://yt-project.org/data/</a>) so I don't have a way of reproducing this behavior. Is there any chance you can make a ramses time series available for testing? You might find the yt curldrop to be useful for sharing a large dataset:</div><div class="gmail_msg"><br class="gmail_msg"></div></div><div class="gmail_msg"><a href="https://docs.hub.yt/services.html#curldrop" class="gmail_msg" target="_blank">https://docs.hub.yt/services.html#curldrop</a><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">A test that this is isolated to the time series object would be to instead use a loop over filenames, loading a single filename in each loop iteration, and then explicitly deleting the dataset object using the `del` statement at the end of the loop. In principle this shouldn't be necessary but it might help reveal where the issue is localized to.</div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Also, is there a way to change the axis names?<br class="gmail_msg"></div><div class="gmail_msg">I'm making some dark matter density profiles using the ('deposit','io_density') field and this gives IO Density on the y axis, but I just want it to say Dark matter density so my readers actually understand what I'm talking about.<br class="gmail_msg"></div></div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">For the ProjectionPlot you can use the set_colorbar_label method:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><a href="http://yt-project.org/doc/reference/api/generated/yt.visualization.plot_window.ProjectionPlot.set_colorbar_label.html#yt.visualization.plot_window.ProjectionPlot.set_colorbar_label" class="gmail_msg" target="_blank">http://yt-project.org/doc/reference/api/generated/yt.visualization.plot_window.ProjectionPlot.set_colorbar_label.html#yt.visualization.plot_window.ProjectionPlot.set_colorbar_label</a></div><div class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks for helping<br class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Best,<br class="gmail_msg"></div><div class="gmail_msg">Andreas Ellewsen<br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg"></div></div></div></div>
<br class="gmail_msg"></blockquote></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">_______________________________________________<br class="gmail_msg">
yt-users mailing list<br class="gmail_msg">
<a href="mailto:yt-users@lists.spacepope.org" class="gmail_msg" target="_blank">yt-users@lists.spacepope.org</a><br class="gmail_msg">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="gmail_msg">
<br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div></div>
_______________________________________________<br class="gmail_msg">
yt-users mailing list<br class="gmail_msg">
<a href="mailto:yt-users@lists.spacepope.org" class="gmail_msg" target="_blank">yt-users@lists.spacepope.org</a><br class="gmail_msg">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="gmail_msg">
</blockquote></div></div>