Skip to content

Fix race condition in coll_han_alltoall.c #13115

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

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ompi/mca/coll/han/coll_han_alltoall.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Copyright (c) 2025 Barcelona Supercomputing Center (BSC-CNS). All Rights Reserved.
*
* Additional copyrights may follow
*
* $HEADER$
Expand Down Expand Up @@ -369,6 +371,13 @@ int mca_coll_han_alltoall_using_smsc(
ompi_request_wait_all(inter_recv_count, inter_recv_reqs, MPI_STATUS_IGNORE);

cleanup:

/* we may still have neighbors reading directly from our buffer, so we must ensure it is not modified */
if (!ii_push_data)
{
low_comm->c_coll->coll_barrier(low_comm, low_comm->c_coll->coll_barrier_module);
}

for (int jlow=0; jlow<low_size; jlow++) {
if (jlow != low_rank ) {
mca_smsc->unmap_peer_region(sbuf_map_ctx[jlow]);
Expand Down