Repository navigation
Conversation
hzhou
requested changes
Nov 8, 2026
| /* Off by default. Set MPIR_PMIX_USE_GET_LOCAL_PEERS=1 to read each node's peers from the | ||
| * local PMIx data store, as PMIx_Resolve_peers did before openpmix PR 3529. */ | ||
| int use_local_get = 0; | ||
| MPL_env2int("MPIR_PMIX_USE_GET_LOCAL_PEERS", &use_local_get); |
Collaborator
There was a problem hiding this comment.
Use a CVAR, e.g. MPIR_CVAR_PMIX_RESOLVE_PEERS_WORKAROUND. Reference the CVAR block at the top of src/util/mpir_pmi.c for examples.
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
On Aurora, we noticed that after an upgrade from PMIx 4.2.9 to PMIx 5.0.8, the time for MPI_Init at large scales increased. Most of the extra time was spent in
PMIx_Resolve_peers. All credit to @anguyen-intel for tracking this down.From comparing PMIx 4.2.9 and 5.0.8 we found that how the ranks-per-node were discovered changed. PMIx 4.2.9 did a lookup with PMIx_Get based on what PMIx_Init found. PMIx 5.0.8 queries a server if the client is connected. mpich calls
PMIx_Resolve_peersonce per node, so the cost increases with number of nodes.To work around this temporarily, this adds an env
MPIR_PMIX_USE_GET_LOCAL_PEERSwhich when set usespmix_get_local_peersto look up the ranks on a node based on the PMIx 4.2.9 way (see the 4.2.9 way: https://github.com/openpmix/openpmix/blob/eebd966ae14a47b2298d678734015761306c3bd3/src/client/pmix_client.c#L1654-L1689 and https://github.com/openpmix/openpmix/blob/eebd966ae14a47b2298d678734015761306c3bd3/src/client/pmix_client.c#L1563-L1567, this code mirrors it but adds aPMIX_OPTIONALto ensure it's only a local lookup). If the env is not set or the local lookup fails,PMIx_Resolve_peersis called as it currently is and there's no change to behavior.As an example of timings, at 1024 nodes with 96 ppn, MPI_Init takes ~35s with the PMIx 5.0.8, and ~8s with this PR.
I went with an env to toggle on since this is a workaround, but definitely open to other suggestions. If this should just be for the aurora_test branch that works too. Thanks!
Author Checklist
Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
Commits are self-contained and do not do two things at once.
Commit message is of the form:
module: short descriptionCommit message explains what's in the commit.
Whitespace checker. Warnings test. Additional tests via comments.
For non-Argonne authors, check contribution agreement.
If necessary, request an explicit comment from your companies PR approval manager.
Welcome, New Contributors!
Thank you for contributing to MPICH. If this is your first contribution, please consider: