[yt-users] How to efficiently control the memory in yt with large simulation?

Junhwan Choi (최준환) choi.junhwan at gmail.com
Thu Dec 5 19:47:09 PST 2013


Hi all,

I try to make some visualizations (density/temperature project) for
large simulation with yt.
The simulation is 4096^3 unigrid Ramses simulation.

I try to implement the basics density and temperature projection plot
with following script and I got memory problem and yt run is crashed.
=====
from yt.mods import *

ds = load("../output_00048/info_00048.txt", fields =
["Density","x-velocity",
"y-velocity","z-velocity","Pressure","Metallicity","Rad"])
center = [0., 0., 0.]

pw = ProjectionPlot(ds, "x", ("gas", "Density"),
weight_field="Density", center=center)
pw.zoom(1.01)
pw.save("allviewGas")
pw = ProjectionPlot(ds, "y", ("gas", "Density"),
weight_field="Density", center=center)
pw.zoom(1.01)
pw.save("allviewGas")
pw = ProjectionPlot(ds, "z", ("gas", "Density") ,
weight_field="Density", center=center)
pw.zoom(1.01)
pw.save("allviewGas")

pw = ProjectionPlot(ds, "x", "Temperature", weight_field="Density",
center=center)
pw.zoom(1.01)
pw.save("allviewGas")
pw = ProjectionPlot(ds, "y", "Temperature", weight_field="Density",
center=center)
pw.zoom(1.01)
pw.save("allviewGas")
pw = ProjectionPlot(ds, "z", "Temperature" , weight_field="Density",
center=center)
pw.zoom(1.01)
pw.save("allviewGas")
====

Is there any way to reduce the memory usage when I make visualization?
If I use slice instead of projection, can I save the memory?
I saw there is parallelization for yt. Does parallelization distribute
the data at the beginning of the read?
(But, I prefer to do so w/o parallelization at this moment.)

Thank you in advance,
Junhwan



More information about the yt-users mailing list