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

Update gather_data function #226

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

bknight1
Copy link
Member

Changes to code due to updating the gather_data function. Should now work for all dtypes

update gather data fn:
Uses a mask value that will work for most dtypes (except bool?)
Automatically gets dtype from array/value being passed in
update for changes in gather_data fn
Copy link
Member

@julesghub julesghub left a comment

Choose a reason for hiding this comment

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

Happy to discuss more about this.

val_local = np.ascontiguousarray(val.copy())
else:
val_local = np.array([np.nan], dtype=dtype)
# with uw.mpi.call_pattern(pattern="sequential"):
Copy link
Member

Choose a reason for hiding this comment

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

Why comment out the uw.mpi.call_pattern part? This was useful for dealing with sequential or parallel hdf5 implementations on various HPCs.

Copy link
Member Author

Choose a reason for hiding this comment

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

From tests I've done it hasn't made a difference to the order of the array. If anything needed to be sequential it would be the gathering of the data on the root processor not the creation of the array on each processor. I'm not sure how Gatherv gathers the data but from those tests thee array is in the same order each time.

For benchmarking purposes
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.

2 participants