Repository navigation
ENH: Gather timing summaries through a muGrid communicator directly - #1
Merged
Merged
Conversation
A communicator could gather the per-rank timers only if it was mpi4py's or wrapped one (muGrid's mpi4py_comm). muGrid 1.6 gathers Python objects itself -- gather(obj, root=0) with mpi4py's semantics -- and no longer needs mpi4py, so a communicator whose gather takes root is used as it is. muGrid's earlier gather, an array concatenation without root, is still left alone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
muGrid 1.6 (muSpectre/muGrid#242 + the follow-up PR) gathers Python objects itself —
gather(obj, root=0)with mpi4py's semantics — and no longer imports or needs mpi4py.print_summarytherefore accepts a communicator whosegathertakesrootas it is, instead of requiring mpi4py's interface (Get_rank) or anmpi4py_commbehind it. Detection is byinspect.signature, so muGrid < 1.6, whosegatherconcatenated arrays and took noroot, is still left alone and falls back as before.Verified with muGrid's branch on 2 ranks under
mpirunwithout mpi4py importable: the summary is gathered and printed on rank 0 with mean/min/max across ranks. New unit test for the detection; the existingtest_memory_trackingfailure (psutil not installed) is unrelated.🤖 Generated with Claude Code