Fix race condition in coll_han_alltoall.c #13115
Merged
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.
Add a barrier in cases where reading memory directly from neighbors to fix an issue where the send buffer is overwritten prematurely in coll_han_alltoall.c. Please see the provided reproducer below to understand the issue a bit more. The problem is that alltoall returns before it is safe to touch the send buffer.
Bug discovered and patched at AccelCom, Barcelona Supercomputing Center.
Here is the reproducer:
To run, use this:
mpirun -np 4 host_one:2,host_two:2 ./program
For me, the ssh launcher was used to do this and it automatically selected the coll_han_alltoall module.