Skip to content

perf(npf): count exchange edges per cell from the lookup table - #3239

Open
mjr-deltares wants to merge 1 commit into
MODFLOW-ORG:developfrom
mjr-deltares:perf-npf-calc-max-conns
Open

mjr-deltares wants to merge 1 commit into
MODFLOW-ORG:developfrom
mjr-deltares:perf-npf-calc-max-conns

Conversation

@mjr-deltares

@mjr-deltares mjr-deltares commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

calc_max_conns looped over all exchange edges for every cell, which is O(cells x edges) and took about an hour per rank for a 55 M cell model on two ranks. Build the edge lookup table first and take the counts from it. This is mostly an issue for really large (continental) models that calculate spdis. The fix will not change any behavior.

Checklist of items for pull request

  • Replaced section above with description of pull request
  • Formatted new and modified Fortran source files with fprettify
  • Removed checklist items not relevant to this pull request

For additional information see instructions for contributing and instructions for developing.

calc_max_conns looped over all exchange edges for every cell, which is
O(cells x edges) and took about an hour per rank for a 55 M cell model
on two ranks. Build the edge lookup table first and take the counts
from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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