New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add parallel iterators for analysis #112
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brittonsmith
changed the title
[WIP] add parallel iterators for analysis
add parallel iterators for analysis
Aug 24, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Summary
This adds three new functions for parallel iteration over trees and/or nodes using the yt parallel_objects function.
These are to be used either with analysis fields or simply for iterating over halos. All analysis fields set in the process are copied back to the root processor so they can be saved. In the cases of
parallel_trees
andparallel_nodes
, results will be saved automatically either at the end of the loop or after a designated number of trees have completed. Because they use yt'sparallel_objects
underneath, the parallel loops can be configured to customize the size of process groups and to toggle on/off a task queue for each level of parallelism (trees and nodes).See the API reference in the docs built for this PR for more information.
PR Checklist
I have added docstrings, but do not have time at the moment to update narrative docs or add tests. This will stay as a work in progress until I do. Nonetheless, I thought these useful enough to put here for others to use for the time being.