Skip to content

assign no partition to master thread - #26

Open
AxelSchneewind wants to merge 1 commit into
open-mpi:mainfrom
AxelSchneewind:fix-threaded-ring-partitioned
Open

assign no partition to master thread#26
AxelSchneewind wants to merge 1 commit into
open-mpi:mainfrom
AxelSchneewind:fix-threaded-ring-partitioned

Conversation

@AxelSchneewind

@AxelSchneewind AxelSchneewind commented May 22, 2026

Copy link
Copy Markdown
Contributor

Previously, the partitions were simply assigned to the threads by their respective thread_num, assuming numbers between 0 and the thread count. However, as the master thread has thread_num of -1, this could result in erroneous assignments, leading to deadlocks in the case of multiple send partitions per receive partition.
More precisely, if two threads waited for the same partition it was possible that one thread continued to wait while the other had already caused the request to be finalized.

For this reason, this PR introduces a check that assigns no partitions to the master thread.

Previously, the partitions were simply assigned to the threads by their
respective `thread_num`, assuming numbers between 0 and the thread
count. However, as the master thread has `thread_num` of -1, this could
result in erroneous assignments, leading to deadlocks in the case of
multiple send partitions per receive partition.

For this reason, this PR introduces a check that assigns no partitions
to the master thread.

Signed-off-by: Axel Schneewind <axel.schneewind@hlrs.de>
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.

1 participant