Anyone experienced yt clump_find crashes with Parthenon files?
Posted by WolfofRom@reddit | Python | View on Reddit | 4 comments
I’m trying to use the clump_find function in yt on my Parthenon .rhdf file, but it crashes immediately when it tries to generate the first contours. Has anyone had this problem? If so, how did you fix it?
To get around it, I regridded the data and it works, but I lose resolution.
Initial-Process-2875@reddit
Hit the same crash with Parthenon files. I think it's the AMR mesh boundaries—clump_find just freaks out on the adaptive refinement. The regrid workaround's the same thing I did, but losing that resolution is annoying. Have you reported it as a bug?
Free-Cheek-9440@reddit
The fact that regridding fixes it makes me think the issue is probably tied to the native mesh structure rather than your actual data. You’re basically simplifying the topology enough for yt to stop choking on it. Annoying tradeoff though if you care about small-scale structure.
powersoffour@reddit
Yeah, regridding: not an amazing solution!
This is pretty strange, and I think it's likely due to some assumption in the clump finding / contour identification routines not applying to this spot.
From the bug you posted on the yt github issue list, it looks like it happens inside the routine
link_node_contours. This routine has a few steps in it, and if it's not a bounds issue (which it could be!) the one that seems the most relevant is probablyconstruct_boundary_relationships.If we could get info on where inside the Cython routines it happens it might help narrow it down -- is there an oversight in the way we compute the number of contours? Is there an indexing error in catching the joins across objects? Etc...
Unfortunately, these routines tend to be optimized with the safety turned off -- but, compiling with
-O0can re-enable that, and may help to track it down.Fantastic_Fly_7548@reddit
havent worked with Parthenon files myself but honestly regridding just to stop crashes sounds kinda frustrating if youre losing detail you actually need. maybe the contour generation step is hitting some memory or indexing issue with the original resolution? i remember seeing people mention yt behaving weirdly with certain datasets depending on field definitions and chunk sizes, but im def not an expert on it. curious if somebody here found a cleaner fix because lowering resolution feels more like a workaround than an actual solution