Hi Ankit,

Unfortunately, there is no way at the moment to read in parallel RAMSES snapshots. There isn't easy solution to this problem at the moment as the entire AMR structures has to be in-memory for yt to be able to perform its operations.

If memory/read time is an issue, you can indeed use the bbox argument. Note that this will only limit the number of AMR domains that will be read from disk. In more details, any domain that may have at least one cell in the box will be read entirely, so you may still find cells and particles lying outside of the bbox. You can further filter them out by selecting a subregion of your simulation using e.g. ds.region(left_edge, right_edge).

You could also split your simulation domain in different subboxes and iterate over them with a code like

import yt
from itertools import product
import numpy as np
Nsplit = 10  # 
controls how many chunks to use in each direction

yt.enable_parallelism()

xx = np.linspace(0, 1, Nsplit+1)
for i, j, k in yt.parallel_objects(list(product(range(Nsplit), range(Nsplit), range(Nsplit))), barrier=False):
    bbox = np.asarray([xx[[i,j,k]], xx[[i+1,j+1,k+1]]])
    ds = yt.load("path/to/simu/output_01234", bbox=bbox)
    reg = ds.box(bbox[0], bbox[1])
    
    # Perform operation on sub-region
    reg["gas", "density"]  # for example

Corentin


On 23/03/2021 06:49, Ankit Singh wrote:
Hi,

I am trying to read a RAMSES snapshot which has a size of a few TB. Please let me know what are methods I can use to read this using yt. I have good computation available but I can see from here: (https://yt-project.org/doc/analyzing/parallel_computation.html) that yt can't perform the reading operation in parallel. I tried using bbox argument to get a smaller region but that didn't help. I would really appreciate any help in this regard.

Thanks,
Ankit Singh


_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: contact@cphyc.me