Skip to content
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

Begin work on MPI parallel calculation of pip weights. #5

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tskisner
Copy link
Member

@tskisner tskisner commented Nov 5, 2020

This is a work in progress- it is not working code.

for realization in my_realizations:
# Set the seed based on the realization, so that the result is reproducible
# regardless of which process is working on the realization.
np.random.seed(realization)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about rng = np.random.RandomState(realization) to avoid the global state?

tileselect = None
if args.tiles is not None:
tileselect = list()
with open(args.tiles, "r") as f:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: read on root rank and broadcast.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably also apply to line 99 and 111. Not worth it if there is too much work to make the objects "broadcastable"(e.g. pickling) and also we don't intent to run this with many ranks.

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.

None yet

2 participants