Repository navigation
feat: Hilbert and knapsack placement with measured costs; markers in one pass - #76
Merged
Merged
Conversation
…d tags from marker counts.
…ed by marker counts.
…, owners by rank table, and regrid(fields=).
…able, halo signatures as arrays.
Owner
Author
|
The pytest jobs fail only in Generated by Claude Code |
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.
Summary
Load balancing:
placement="hilbert"places patches along a Hilbert curve (cunumpy'shilbert_encode). Each rank's run is connected, without the Z curve's jumps.morton_ranksis nowcurve_ranks(..., curve="morton" | "hilbert").placement="balanced"also takescost, cut byknapsack_ranks: the largest cost first, onto the least loaded rank.costmay also map a patch(level, box)to a measured cost.deposit(..., times=...)andinterpolate(..., times=...)collect seconds per patch; a patch without a measurement gets the mean cost per cell.rebalance(cost, placement=...)places by any of these.Per-patch costs:
depositandinterpolateadd the markers of all patches in one pass: onebincountinto a buffer of the blocks, equal to mpifield's kernels to 1e-12 (new test, periodic axes included). Higher B-spline degrees still run the kernels patch by patch.RESULTS.mdcompares againstdevel, together with max-models/mpiarray#74 (one gather and scatter per array inCopyPlan). Serial, median of 3, ms per step:This needs max-models/cunumpy#146 (
hilbert_encode); merge that first. The halo numbers need max-models/mpiarray#74.Checklist
pre-commit runandpytestpass (738 passed locally, the new tests also undermpirun -n 2/3/4)docs/, tutorials orREADME.qmd) are updated where the behaviour changedfeat:,fix:,docs:, ...)