Skip to content

tests: Add fix and test for regression with compiler-generated buffers - #3108

Open
EdCaunt wants to merge 1 commit into
mainfrom
hotfix-buffering-override
Open

EdCaunt wants to merge 1 commit into
mainfrom
hotfix-buffering-override

Conversation

@EdCaunt

@EdCaunt EdCaunt commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Previous merge broke some decoupler tests in PRO due to compiler-generated arrays taking their neighbouring ranks from the Grid with which they were built rather than the one supplied at apply time. This specifically appeared in diag2/overlap2/full mode.

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 8.00000% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.41%. Comparing base (448e7da) to head (af1484d).

Files with missing lines Patch % Lines
tests/test_mpi.py 10.52% 17 Missing ⚠️
devito/mpi/routines.py 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3108      +/-   ##
==========================================
- Coverage   84.44%   84.41%   -0.03%     
==========================================
  Files         260      260              
  Lines       58782    58806      +24     
  Branches     4989     4989              
==========================================
+ Hits        49640    49644       +4     
- Misses       8314     8335      +21     
+ Partials      828      827       -1     
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 68.39% <0.00%> (-0.01%) ⬇️
pytest-gpu-gcc- 79.13% <8.00%> (-0.04%) ⬇️
pytest-gpu-icx- 79.07% <8.00%> (-0.04%) ⬇️
pytest-gpu-nvc-nvidiaX 69.25% <0.00%> (-0.01%) ⬇️

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.

Comment thread devito/mpi/routines.py
f = alias or self.target.c0
neighborhood = f.grid.distributor.neighborhood

# The ranks are taken from the `nb` provided at runtime by the (possibly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are u sure that the proper fix ain't in _arg_values? _arg_values is where u should pull the override

see for example MPIMsg._arg_values

Comment thread devito/mpi/routines.py
# The ranks are taken from the `nb` provided at runtime by the (possibly
# overriding) Grid or SubDomain, as `f` may be a compiler-generated Array
# still attached to the Grid the Operator was built with
nb = f.grid.distributor._obj_neighborhood

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I still don't get why not args.grid, the grid is supposed to be unique to the operator.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seconded

Comment thread devito/mpi/routines.py
# The ranks are taken from the `nb` provided at runtime by the (possibly
# overriding) Grid or SubDomain, as `f` may be a compiler-generated Array
# still attached to the Grid the Operator was built with
nb = f.grid.distributor._obj_neighborhood

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this whole thing looks like it's doing what nb._arg_defaults should be doing by hand

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seconded (related to what I wrote above)

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