Skip to content

Notified-COMM: [BUG FIX]: Fixing the failure path check and error handling - #32

Open
joe-explr wants to merge 5 commits into
devreal:notified-rmafrom
joe-explr:notified-rma-sm
Open

Notified-COMM: [BUG FIX]: Fixing the failure path check and error handling#32
joe-explr wants to merge 5 commits into
devreal:notified-rmafrom
joe-explr:notified-rma-sm

Conversation

@joe-explr

@joe-explr joe-explr commented Sep 11, 2026

Copy link
Copy Markdown

Changes are made to address the following

  1. When set num notify is passed a bad arg, its erroneous to return early as it will block and hang other ranks. The changes target returning the error after the synchronizing call.

  2. The failure check for segment creation was weak and erroneous. if ('\0' == new_seg_ds.seg_name[0]) { has a possibility flagging a successful segment creation as a failure. Replaced it with OPAL_SHMEM_DS_IS_VALID(&new_seg_ds)

@github-actions

Copy link
Copy Markdown

Hello! The Git Commit Checker CI bot found a few problems with this PR:

d477d4f: Fix MPI_WIN_SET_NUM_NOTIFY hang on an invalid argu...

  • check_cherry_pick: contains a cherry pick message that refers to a commit that exists, but is in an as-yet unmerged pull request: fe59a33

Please fix these problems and, if necessary, force-push new commits back up to the PR branch. Thanks!

1 similar comment
@github-actions

Copy link
Copy Markdown

Hello! The Git Commit Checker CI bot found a few problems with this PR:

d477d4f: Fix MPI_WIN_SET_NUM_NOTIFY hang on an invalid argu...

  • check_cherry_pick: contains a cherry pick message that refers to a commit that exists, but is in an as-yet unmerged pull request: fe59a33

Please fix these problems and, if necessary, force-push new commits back up to the PR branch. Thanks!

MPI_WIN_SET_NUM_NOTIFY is a blocking, synchronizing collective, but its
num_notifications argument is local: MPI-5.1 section 12.6.1 states that
the number of notification counters "can be different for different MPI
processes".  Both the C binding and osc/sm validated that argument and
returned early, before the osc module's internal allgather.  A single
rank passing a bad value therefore returned an error while every other
rank stayed blocked in that allgather forever, turning an erroneous
argument into a hang.

The binding rejected negative counts, and osc/sm additionally rejected
counts above an mpi_assert_max_num_notify assertion -- a case the
binding never covered, so osc/sm could hang even before this change.

Drop the range check from the binding and carry each rank's verdict
through the collective instead.  osc/sm gathers ULONG_MAX as a sentinel
that no legal count can collide with, since valid counts come from an
int and never exceed INT_MAX; a single-process window has nobody to
agree with and still answers immediately.  All ranks then see the same
gathered array and fail identically, so the window cannot end up
half-reconfigured.

osc/ucx already carried its verdict through the allgather and needed no
change.

Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
The previous fix computed "bad" but never sent the ULONG_MAX sentinel
through the allgather, leaving the agree: label unused.  Only -1 hit the
sentinel, by accident of the cast; -5 became a huge request and crashed
in the grow path, and a request above mpi_assert_max_num_notify grew
instead of failing.  Also correct the comment that called the assertion
not a limit.

Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Test the broadcast descriptor with the shmem framework's validity flag
instead of peeking at seg_name.  segment_create sets the flag only on
success, and the zeroed descriptor rank 0 sends when it cannot create
the segment has it clear, so every rank still fails together.

Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
Removing unecesaary comments

Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
The tests expects the counter to grow past the set max_assert_num_notify
value. This commit fixes the comments and the code to cap the growth at
the flag value.

Signed-off-by: Joseph Antony <jajoseph.antony18@gmail.com>
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