Repository navigation
coll: read algorithm CVARs through a pointer table - #8039
Merged
Merged
Conversation
Contributor
Author
|
Tested locally with a debug build ( The test program changes
Side note, not changed by this PR: MPICH doesn't register an |
4 tasks done
hzhou-muse
force-pushed
the
coll_cvar_ptr
branch
from
October 20, 2026 22:15
282f282 to
f3e9b39
Compare
Contributor
Author
|
test:mpich/ch3/tcp ✔️ |
The scan smp and iscan sched_smp algorithms are restricted to commutative ops, but MPIR_Csel_op_is_commutative had no case for scan, so forcing either algorithm through its CVAR hit MPIR_Assert(0). Co-Authored-By: Claude Opus 5.5 <[email protected]>
MPIR_Coll_cvar_table now holds pointers to the algorithm CVARs, set by a generated constant initializer, so a value written with MPI_T_cvar_write takes effect in the next collective call. MPIR_Coll_cvar_to_algo_id returns the END id for a value that is not one of the collective's algorithms, and MPIR_Coll_json returns an error for it. Previously the table copied the CVAR values at init, so MPI_T writes to algorithm CVARs were ignored, and an invalid value hit MPIR_Assert(0), which in a release build silently ran algorithm id 0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
hzhou
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
MPIR_Coll_cvar_tablecopied the algorithm CVAR values once during init. As a result, writing an algorithm CVAR such asMPIR_CVAR_BCAST_INTRA_ALGORITHMwithMPI_T_cvar_writehad no effect, even though the algorithm's parameter CVARs (TREE_KVAL, etc.) are read on every call. Also, an invalid value reachedMPIR_Assert(0)inMPIR_Coll_cvar_to_algo_id, so a release build silently ran algorithm id 0.The table now holds pointers to the CVARs, set by a constant initializer from
gen_coll.py. A value written through MPI_T takes effect in the next collective call.MPIR_Coll_cvar_to_algo_idreturns the END id for a value that is not one of the collective's algorithms, andMPIR_Coll_jsonreturns an error (**collcvarval) for it.doc/wiki/design/Collective_Selection.mdis updated.Author Checklist
🤖 Generated with Claude Code