Repository navigation
comm: fix HW_GUIDED split for non-proper subset - #7995
Merged
Merged
Conversation
hzhou
reviewed
Oct 6, 2026
hzhou-muse
force-pushed
the
fix-hw-guided-proper-subset
branch
from
October 6, 2026 03:56
42a75db to
b394ab5
Compare
Collaborator
|
test:mpich/ch3/tcp |
MPI_COMM_TYPE_HW_GUIDED should return the largest subset of processes that match the resource type. Unlike HW_UNGUIDED, it is not required to be a proper subset. Previously, we returned MPI_COMM_NULL whenever the split did not reduce the node comm, e.g. "package" on a single-package node, while "mpi_shared_memory" returned a valid comm. The proper-subset check was a proxy for detecting processes that are not contained in a single instance of the resource (gid falls back to the root gid). Check that per process instead and use MPI_UNDEFINED as the color, so all processes still participate in the split (no hang). "node" and "machine" resolve to the root gid by design, so return the node comm directly for them. This does not depend on hwtopo, so check it before returning MPI_COMM_NULL for an uninitialized hwtopo, e.g. on osx, where the process binding cannot be queried. Fixes pmodels#7160 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hzhou-muse
force-pushed
the
fix-hw-guided-proper-subset
branch
from
October 6, 2026 18:17
b394ab5 to
73f42f9
Compare
Contributor
Author
|
test:mpich/ch3/tcp |
hzhou
approved these changes
Oct 7, 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
Fixes #7160.
MPI_COMM_TYPE_HW_GUIDEDshould return the largest subset of processesthat match the resource type; unlike
HW_UNGUIDEDit does not need to bea proper subset. We returned
MPI_COMM_NULLwhenever the split didn'treduce the node comm, e.g.
packageon a single-package node, whilempi_shared_memoryreturned a valid comm.That proper-subset check (from 7f0f0b8) was really a proxy for
"process is not inside a single instance of the resource", where
MPIR_hwtopo_get_obj_by_namefalls back toMPIR_HWTOPO_GID_ROOT.This PR checks that per process and uses
MPI_UNDEFINEDas the color,so every process still joins the split (keeps the hang fix). Same for
processes without hwtopo.
node/machineresolve to the root gid bydesign, so they return the node comm directly.
Added a
machinecheck totest/mpi/comm/cmsplit_type.c.Tested (single-package i7-7820X, 4 procs, ch4:ofi):
Mixed binding (rank 0 unbound) gives NULL on rank 0 for
core, 1 onothers, no hang.
cmsplit_typepasses bound and unbound.Author Checklist
🤖 Generated with Claude Code