<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 14, 2016 at 5:30 AM, Thor Andreas Seiff Ellewsen <span dir="ltr"><<a href="mailto:tellewsen@gmail.com" target="_blank">tellewsen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hi all,<br><br></div>I'm working on a project where I'm comparing different RAMSES simulations.<br></div><div><div><div>However I'm running into a problem with memory.<br></div><div>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></div></div></div></div></blockquote><div><br></div><div>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><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><br></div><div>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" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><br></div><div>This quickly fills up the memory.<br></div><div><br></div><div>You can find the relevant parts of my code at the pastebin at <a href="http://paste.yt/p4946.html" target="_blank">http://paste.yt/p4946.html</a><br></div><div>I'm running yt version 3.3.2<br></div><div><br></div><div>What am I doing wrong?<br></div></div></div></div></blockquote><div><br></div><div><div>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/">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><br></div></div><div><a href="https://docs.hub.yt/services.html#curldrop">https://docs.hub.yt/services.html#curldrop</a><br></div><div><br></div><div>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><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div></div><div><br></div><div>Also, is there a way to change the axis names?<br></div><div>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></div></div></div></div></blockquote><div><br></div><div>For the ProjectionPlot you can use the set_colorbar_label method:</div><div><br></div><div><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">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> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div></div><div><br></div><div>Thanks for helping<br><br></div><div>Best,<br></div><div>Andreas Ellewsen<br></div><div><br><br></div></div></div></div>
<br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div></div>