Skip to content

mpi: Patch unnecessary halo updates inserted with functions on subdomains - #2986

Closed
EdCaunt wants to merge 2 commits into
mainfrom
touched-halo
Closed

mpi: Patch unnecessary halo updates inserted with functions on subdomains#2986
EdCaunt wants to merge 2 commits into
mainfrom
touched-halo

Conversation

@EdCaunt

@EdCaunt EdCaunt commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

When constructing an operator with a trivial equation in which a field defined on a subdomain is updated without using any surrounding points (i.e. Eq(u.forward, u)), halo exchanges get inserted as the symbolic subdomain offsets do not get evaluated until runtime, and thus the compiler cannot currently determine that it will not need data from within the halo. These halo exchanges are erroneous as they read and write from the same spatial position and thickness values are populated to avoid indexing into the halo.

Note: currently has a lot of comments as there are aspects here I'm not entirely sure about and which need sanity checking by someone with more experience with MPI data dependence

@EdCaunt
EdCaunt requested a review from FabioLuporini August 3, 2026 09:52
@EdCaunt EdCaunt self-assigned this Aug 3, 2026
@EdCaunt EdCaunt added WIP Still work in progress bug-py-minor MPI mpi-related bug-C-minor bug in the generated code not affecting correctness labels Aug 3, 2026
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.53%. Comparing base (35f711f) to head (06e1fe7).
⚠️ Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
tests/test_mpi.py 14.28% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2986      +/-   ##
==========================================
- Coverage   83.57%   83.53%   -0.05%     
==========================================
  Files         257      257              
  Lines       53783    53917     +134     
  Branches     4608     4614       +6     
==========================================
+ Hits        44951    45038      +87     
- Misses       8035     8078      +43     
- Partials      797      801       +4     
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 68.56% <100.00%> (+0.03%) ⬆️
pytest-gpu-gcc- 78.16% <40.00%> (-0.04%) ⬇️
pytest-gpu-icx- 78.09% <40.00%> (-0.06%) ⬇️
pytest-gpu-nvc-nvidiaX 69.21% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@EdCaunt EdCaunt closed this Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-C-minor bug in the generated code not affecting correctness bug-py-minor MPI mpi-related WIP Still work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant