GEOPY-3042: Investigate low CPU usage for MVI-PDE - #168
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR investigates low CPU usage in the Dask-based MVI-PDE magnetic simulation by restructuring how distance-based weighting work is partitioned and distributed across workers.
Changes:
- Refactors
distance_weightsusage to submit index blocks (and scatter shared arrays once) instead of shipping location blocks per task. - Introduces per-call reuse of the computed
G.T @ W.T @ W @ Gdiagonal via_gtg_diagonalcaching. - Adds support for incorporating per-datum weights (
W) into the distance-weight accumulation.
Suppressed comments (1)
simpeg/dask/potential_fields/magnetics/simulation_pde.py:99
- If the cache is bypassed for
W is not None, avoid overwriting the cached_gtg_diagonal(otherwise a weighted call will poison the cached unweighted diagonal).
dtype=np.float32,
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
benk-mira
reviewed
Aug 12, 2026
benk-mira
approved these changes
Aug 13, 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.
GEOPY-3042 - Investigate low CPU usage for MVI-PDE