Place large subhalos on their own chunk #190
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The low-z snapshots of the largest COLIBRE runs are crashing due to memory. I think this is because single objects are so massive that they can't be processed in parallel.
This PR adds a threshold value, above which a subhalo is placed onto its own chunk.I think placing each large halo on its own rank is too inefficient, I've gone for a "hybrid" approach instead. The user can now specify multiple threshold values. They can also specify the number of halos that can be processed in parallel for each threshold value.
Ideally we would do this automatically rather than having the user specify parameters. We would need to estimate the memory required by each halo (which would depend on the number of properties switched on), and then use that (combined with the system memory) to set the threshold values. I don't see myself getting round to doing that anytime soon though.
TODO