Skip to content

Fix incorrect return value from broker queue enqueue - #1

Open
gosLp wants to merge 1 commit into
ParCoreLab:mainfrom
gosLp:fix/broker-enqueue-return
Open

Fix incorrect return value from broker queue enqueue#1
gosLp wants to merge 1 commit into
ParCoreLab:mainfrom
gosLp:fix/broker-enqueue-return

Conversation

@gosLp

Copy link
Copy Markdown

Return the result of ensureEnqueue() from BrokerWorkDistributorT::enqueue() instead of returning false unconditionally.

Problem

When queue capacity is available, enqueue() reserves a slot successfully, calls putData(), but then returns false. It therefore reports failure even though the item was inserted.

The current state of Mustard ignores this return value so this wouldn't change existing LU or Cholesky results. However, any caller that checks the Boolean result may incorrectly report failure or retry on a previously successful insertion.

Tests

Manually tested with small single-process, single-GPU NVSHMEM reproducer on one NVIDIA A100 (node with 4xA100) using CUDA 12.6 and NVSHMEM from NVHPC 24.11.

The reproducer:

  1. Created an empty two-entry broker queue.
  2. Enqueued 0xC0FFEE.
  3. Recorded the return value and queue size.
  4. Dequeued and verified the inserted value.

Before the change, the item was successfully inserted and dequeued, but enqueue() returned false.

After the change, the same operation returned true, and the inserted value was successfully dequeued.

Sign up for freeto 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

@gosLp