Repository navigation
test: convert remaining coll, pt2pt, and rma tests to test functions - #8042
Conversation
6d4904d to
53a3614
Compare
53a3614 to
733b464
Compare
|
test:mpich/ch3/most |
CI timing comparisonAll Jenkins jobs pass on 733b464. I compared each test cell against the median of every other successful build Jenkins still keeps for that job (10–17 builds per job, Oct 7–20). Test counts are the same as before (e.g. 3216 per ch4 cell). Overall (21 cells): the test phase dropped from 742 to 681 min (−8.2%), and cell wall time dropped from 1104 to 1021 min (−7.5%).
Test phase per cell (JUnit total, minutes; in parentheses, the range of past runs):
In the ch4-ofi default cell, the savings come from the converted directories: rma 9.0 → 6.8 min, pt2pt 6.7 → 5.9, and coll 6.2 → 5.5. All other directories take the same time as before. On ch4 the improvement is clear: in 12 of 14 cells, the PR's test time is below the fastest past run. The ch3 gains are small and within the normal run-to-run spread. This is a single PR build. JUnit totals may slightly undercount the startup cost of the batched 🤖 Generated with Claude Code |
run_mpitests calls the new MTest_Cleanup after each test. It frees the communicators from MTestCommRandomize and the window keyval from MTestGetWin, which MTest_Finalize also frees through it. Previously only MTest_Finalize freed them, and run_mpitests never calls MTest_Finalize, so converted tests that use these helpers leaked a keyval or communicators, and a second MTestCommRandomize in the same process overwrote the communicators of the first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
runtests starts a run_mpitests job for each process count that the listed tests use, instead of only the counts 1 to 10. Previously a test in all_mpitests.txt with a testlist line of more than 10 processes, such as allred2 12 in coll/testlist.gpu, was silently not run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
runtests runs a test listed in all_mpitests.txt individually when its testlist line has an mpiexecarg= or a resultTest= option, as it already did for init-time CVARs. Previously such a line ran in run_mpitests, which silently dropped the mpiexec arguments and checked only the error count instead of the resultTest. Co-Authored-By: Claude Opus 5.5 <[email protected]>
These tests were compiled several times with different macros defined in the make rules. Each is now one test function that takes the variant as an argument, and rma_test_op.h holds the shared op and type selection. - atomic_get, fetch_and_op and get_accumulate take -type= (and get_accumulate -derived). - wrma_flush_get, win_shared_rma_flush_load, overlap_wins_rma and win_dynamic_rma_flush_get take -op=. - win_dynamic_acc, window_attach, aint and win_dynamic_rma_flush_get take -collattach.
Merge mcs_mutex.c and mcs_mutex.h into mutex_bench.c, and replace the USE_WIN_SHARED, USE_WIN_ALLOC_SHM and USE_CONTIGUOUS_RANK build variants with the -use-win-shared, -use-alloc-shm and -use-contig-rank arguments.
733b464 to
bf158c5
Compare
…functions Convert the remaining tests in attr, coll, comm, datatype, group, info, part, pt2pt, rma and topo, including the dtp tests, and the errhan, init and mpi_t tests that don't depend on initialization or finalization, to test functions linked into run_mpitests. Tests that were built several times with different macros (the *_shm, *_allocation and similar variants, and the part -DTEST_* variants) are now built once and take the variant as an argument, e.g. arg=-use-win-allocate or -pready=list, and positional arguments become -key=value options. Testlist entries that passed flags without arg=, which runtests ignores, now use arg=. Helper functions and file-scope variables are made static. The tests that stay standalone are the GPU tests, those that allocate large buffers (coll_large, gather_big, pt2pt_large, large_type_sendrec, large_vec), those that test MPI_Init, MPI_Finalize or MPI_Info before initialization, the datatype tests built only without strict MPI or with the Fortran library, and uoplong, which is also built with -DOP_LARGE. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nctions Writing_Tests.md describes both forms of a test in test/mpi: test functions run inside run_mpitests, and standalone programs. It covers registering a test in all_mpitests.txt, MTestArgList arguments, the rules a test function must follow, which tests must run individually, the testlist options, and how runtests runs the tests. Previously the page described only standalone programs, pointed to Makefile.sm and test/util/mtest.c, which no longer exist, and did not mention run_mpitests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Convert the io tests to test functions run by run_mpitests. File names given on the command line become the -fname= argument (-f= for i_aggregation1), rdwrord reads -large-count through MTestArgList, and simple_collective takes -fname= instead of a positional file name. The testlist entry for rdwrord with -large-count now uses arg=, so that variant runs. Not converted: bigtype and i_bigtype, which need large memory, and tst_fileview and zero_count, which call MPI_Init themselves. Co-Authored-By: Claude Opus 5.5 <[email protected]>
bf158c5 to
40dc64d
Compare
|
test:mpich/ch3/most |
CI timing comparison (update)All Jenkins jobs pass on 40dc64d. I compared each cell's test phase (JUnit total) with the earlier run on 733b464 and with the past median from the previous comment. Every one of the 21 cells is faster than on 733b464. Overall (21 cells, minutes):
Test phase per cell (minutes):
ch4-ucx gained the most this round, 1–2.6 min per cell. ch4-ofi gained 0.2–2.1 min per cell. The ch3 changes (0.3–0.8 min per cell) are within the normal run-to-run spread. This is still a single build per job. 🤖 Generated with Claude Code |
TODO: tests that still run individuallyAfter this PR (40dc64d), 869 of the 3202 tests in a ch4-ofi default cell still launch individually instead of running in Method
Status
Between 733b464 and 40dc64d, these moved into Remaining groups (lines in the ch4-ofi default cell)
The remaining launch overhead is about 869 x 0.3 s = 4.3 min per cell. Conversion Suggested order
Separately, part/pingping (3.7 min) and the threads tests (2.0 min) are 🤖 Generated with Claude Code |
Pull Request Description
#5725 added the
run_mpitestsframework, which runs many tests inside oneMPI_Init/MPI_Finalize, but main has only the attr tests and some of the coll tests converted. This PR converts the rest of the C tests in attr, coll, comm, datatype, group, info, io, part, pt2pt, rma and topo, plus the errhan, init and mpi_t tests that don't depend on init/finalize. Converting coll, pt2pt and rma alone cut the test phase of a CI run by about 8%.run_mpitests, replacing the*_shm,*_allocation, part-DTEST_*and similar build variants with test arguments (e.g.arg=-use-win-allocate). Tests that need large memory, GPUs, or to test init/finalize stay standalone.make cleanintest/mpiremoves the files they leave behind.runtestsnow runs tests of any process count inrun_mpitests(it ran only 1 to 10 and silently skipped the rest), and runs individually the testlist lines thatrun_mpitestscannot handle (mpiexecarg=,resultTest=).arg=, which runtests ignores.Writing_New_Tests.mdtoWriting_Tests.mdand documents writing and maintaining both test functions and standalone tests.Author Checklist
🤖 Generated with Claude Code