Skip to content

GEOPY-2910: Reduce chunking of sensitivities for TEM inversions#150

Open
domfournier wants to merge 1 commit into
developfrom
GEOPY-2910
Open

GEOPY-2910: Reduce chunking of sensitivities for TEM inversions#150
domfournier wants to merge 1 commit into
developfrom
GEOPY-2910

Conversation

@domfournier

@domfournier domfournier commented Jun 15, 2026

Copy link
Copy Markdown

GEOPY-2910 - Reduce chunking of sensitivities for TEM inversions

Copilot AI review requested due to automatic review settings June 15, 2026 20:09
@github-actions github-actions Bot changed the title GEOPY-2910 GEOPY-2910: Reduce chunking of sensitivities for TEM inversions Jun 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets GEOPY-2910 by adjusting how TEM sensitivity computations are chunked/assembled in the Dask TDEM simulation path, aiming to reduce excessive chunking overhead during inversions.

Changes:

  • Disables get_parallel_blocks(..., optimize=False) to avoid extra re-splitting of blocks.
  • Refactors get_field_deriv_block to assemble a single per-block matrix of back-solved field derivatives rather than a list of per-chunk arrays.
  • Updates compute_rows to slice the new per-block field-derivative matrix using a running column offset (colm_count).
Comments suppressed due to low confidence (1)

simpeg/dask/electromagnetics/time_domain/simulation.py:480

  • When local_ind is empty you continue without advancing colm_count, so subsequent receiver chunks will slice the wrong columns out of field_derivs[block_ind]. colm_count needs to be incremented even when a chunk has no active (time-masked) entries.
        if len(local_ind) < 1:
            row_block = np.zeros(
                (len(ind_array[1]), simulation.model.size), dtype=np.float32
            )
            rows.append(row_block)
            continue

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread simpeg/dask/electromagnetics/time_domain/simulation.py
Comment thread simpeg/dask/electromagnetics/time_domain/simulation.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants