Skip to content

Conversation

@mabruzzo
Copy link
Contributor

@mabruzzo mabruzzo commented Jun 27, 2025

PR Summary

This commit improves the heuristic used by GridIndex’s default implementation of the _chunk_io method (with the "auto" chunk-sizing strategy) for determining how many grids to read in a given iteration.

For context, the heuristic was historically hardcoded to a value of 1000 grids. This works well for AMR simulations with small grids (e.g. 16^3, 32^3), but the heuristic is problematic when you have unigrid simulations composed of large grids. For example, Cholla commonly has grids of size 256^3.1

This commit adopts a heuristic that tries to limit the number of grids in order to make sure we don't run out of memory.

Footnotes

  1. With the benefit of hindsight, some difficulties I encountered a few years back with some massive unigrid Enzo-E simulations now make a lot more sense. These improvements made here would have helped out with those difficulties

@mabruzzo mabruzzo force-pushed the GridIndex-chunk_io branch from d3e7ca2 to f31d348 Compare June 27, 2025 02:16
This commit improves the heuristic used by `GridIndex`’s default implementation of the `_chunk_io` method (with the `"auto"` chunk-sizing strategy) for determining how many grids to read in a given iteration.

For context, the heuristic was historically hardcoded to a value of 1000 grids. This works well for AMR simulations with small grids (e.g. 16^3, 32^3), but the heuristic is problematic when you have unified skmulations

This commit adopts a heuristic that tries to limit the number of grids in order to make sure we don't run out of memory.
@mabruzzo mabruzzo force-pushed the GridIndex-chunk_io branch from f31d348 to 5110b82 Compare June 27, 2025 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant