Skip to content

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
@bknight1 bknight1 requested a review from julesghub August 20, 2024 01:47
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