Update gather_data function#226
Open
bknight1 wants to merge 3 commits intounderworldcode:developmentfrom
Open
Conversation
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
julesghub
reviewed
Aug 21, 2024
Member
julesghub
left a comment
There was a problem hiding this comment.
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"): |
Member
There was a problem hiding this comment.
Why comment out the uw.mpi.call_pattern part? This was useful for dealing with sequential or parallel hdf5 implementations on various HPCs.
Member
Author
There was a problem hiding this comment.
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
This file contains hidden or 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
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.
Changes to code due to updating the gather_data function. Should now work for all dtypes