Repository navigation
test(rccl): RMA MPI tests: report payload mismatch details and surface rank-1 failures - #13680
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
There was a problem hiding this comment.
🟡 Changes recommended
The fatal flush assertion can skip rank 0's barrier and hang the MPI suite on flush failure.
1 open issue
What changed in this PR
This test-only PR adds visibility flushes before verifying RMA IGet payloads and improves diagnostics for nightly data mismatches.
Changes:
- Flush each relevant context before payload verification.
- Add a test-only switch to compare behavior without flushing.
- Report mismatch patterns, byte ranges, and delayed re-read results.
| File | Description |
|---|---|
| projects/rccl/test/transport/RmaMPI/RmaMPITests.cpp | Adds flush calls before IGet payload checks. |
| projects/rccl/test/transport/RmaMPI/RmaMPITestBase.hpp | Adds the flush helper, skip switch, and detailed mismatch diagnostics. |
Review effort: Balanced
99b220a to
979c318
Compare
979c318 to
51ce2bb
Compare
There was a problem hiding this comment.
ARGUS
Findings
1 more finding(s), not posted inline
projects/rccl/test/transport/RmaMPI/RmaMPITestBase.hpp:139(Low) ForwardPeerFailures is a third copy of the CastTests failure-forwarding handshake; could live in test/common as a shared helper
Bottom line: LGTM.
Comment @argus review to re-run, or @argus re-review after pushing.
VerifyBuf returned a bare false, so an RMA payload failure said only "block N mismatched". Return an AssertionResult giving the mismatch count, the first mismatching offset, a 16-byte expected/actual hex window, whether every mismatching byte is 0x00, and the rank, context count and registration mode. Existing EXPECT_TRUE(VerifyBuf(...)) call sites are unchanged. Co-authored-by: ilia.kosarev <ilia.kosarev@amd.com>
51ce2bb to
c460b49
Compare
main_mpi.cpp detaches gtest's printer and XML writer on non-zero ranks, so the IPut tests, which verify on rank 1, reported a failure only through the job exit code while rank 0 showed them passing. In RmaMPITestBase::TearDown, send each non-zero rank's failed test parts to rank 0, using the same MPI send/recv scheme as CastTests, and re-raise each one there with ADD_FAILURE_AT at its original file and line, tagged with the peer rank. Rank 0 waits for each peer with the same RCCL_TEST_TEARDOWN_TIMEOUT_SEC deadline (default 60 s) as MPIEnvironment::TearDown and aborts the job if a peer never arrives, so a rank-local early exit cannot hang the suite here. Co-authored-by: ilia.kosarev <ilia.kosarev@amd.com>
c460b49 to
1dfe4b1
Compare
VadimKutovoi
left a comment
There was a problem hiding this comment.
ForwardPeerFailures() only runs once rank 0 reaches fixture teardown. A fatal failure on rank 1 before a subsequent test-body barrier can still strand rank 0 in that barrier, so the original rank-1 failure is not forwarded or represented in rank 0’s XML. The global teardown timeout only aborts later. I think this is fine for the non-fatal VerifyBuf failures targeted here.
TheRock Submodule Bump ActivityNewest first
|


Motivation
On a 2-node MI300X + ConnectX-7 setup, the RMA MPI tests (
RmaMPITest) read back a wrong payload. These failures were hard to diagnose, and some were invisible:VerifyBufreturned a barefalse, so a failure read only "block N mismatched", with nothing to show whether the data never landed, landed late, or was wrong.main_mpi.cppdetaches gtest's printer and XML writer on non-zero ranks. TheIPut*tests (and parts ofMixedIPutIGetIPutSignal) verify on rank 1, so their failures showed up only in the job's exit code, while rank 0's report said they passed.This PR fixes both. It doesn't change what the tests check or any product code.
Technical Details
Both changes are in
test/transport/RmaMPI/RmaMPITestBase.hpp:VerifyBufnow returns::testing::AssertionResult. ExistingEXPECT_TRUE(VerifyBuf(...)) << ...call sites are unchanged. On a mismatch it reports:0x00(AllocBufzero-fills, so this means the payload never landed)Rank-1 failure forwarding.
RmaMPITestBase::TearDownfirst sends each non-zero rank's failed test parts (file, line, summary) to rank 0. Rank 0 re-raises each one withADD_FAILURE_AT(file, line) << "[rank N] " << summary, so its console and XML show the originalRmaMPITests.cpp:NNlocation.MPI_Send/MPI_Recvscheme asCastTests, with its own tags (9640–9642).MPIEnvironment::TearDown:RCCL_TEST_TEARDOWN_TIMEOUT_SEC, default 60 s.TearDown, for example after a rank-localASSERTskips aBarrier(), rank 0 reports "rank N did not reach TearDown … (ranks out of sync)" and callsMPI_Abortinstead of hanging.Why there's no iget flush. An earlier revision of this PR added an
iflushafter every IGet, on the theory that the failure was a visibility race. Hardware experiments ruled that out:0x00.ibandib-cast.The corruption needs one GPU buffer object to go through this sequence:
ibv_reg_mr).After that, RDMA misses the memory the GPU reads. The ROCr fragment allocator amplifies this, because a small
hipFree/hipMallocpair reuses the same block at the same virtual address, so aDmaBuftest case poisons the nextRegMrcase.HSA_DISABLE_FRAGMENT_ALLOCATOR=1avoids that pattern. The root cause is below RCCL, in amdgpu/amdkfd. A flush would only have changed the test's contract without fixing anything, so it was dropped. The diagnostics in this PR are what showed the real shape of the failure.Issue Tracking
JIRA ID: AICOMRCCL-2327, AICOMRCCL-3005, AICOMRCCL-2652
Test Plan
rcclwith MPI tests (-DENABLE_MPI_TESTS=ON -DBUILD_TESTS=ON, ROCm 7.2.4, gfx942). CompileRmaMPITests.cpp.owith the generatedrccl-UnitTestsMPIcompile command (MPI_TESTS_ENABLED,RCCL_HAS_RMA_IB_PROXY) at each commit, with-Wall -Wextra -Wshadow -Wformat=2.ForwardPeerFailuresandVerifyBuf(hipMemcpystubbed out), removing rank 1's gtest listeners exactly asmain_mpi.cppdoes. Cases:RCCL_TEST_TEARDOWN_TIMEOUT_SEC=2*RmaMPITest.*(108 cases), 3 iterations per configuration,NCCL_NET=ibandib-cast, once with defaults and once withHSA_DISABLE_FRAGMENT_ALLOCATOR=1.Test Result
kBlockSize.[rank 1], in both console and XML. Multi-line messages arrive intact, and the passing case prints nothing.VerifyBufmessages carry the all-0x00 note.HSA_DISABLE_FRAGMENT_ALLOCATOR=1: all 108RmaMPITestcases pass on both transports, with no spurious forwarding.Submission Checklist