Address Issues with Face Selectors#458
Open
Thomas Bendall (tommbendall) wants to merge 10 commits intoMetOffice:mainfrom
Open
Address Issues with Face Selectors#458Thomas Bendall (tommbendall) wants to merge 10 commits intoMetOffice:mainfrom
Thomas Bendall (tommbendall) wants to merge 10 commits intoMetOffice:mainfrom
Conversation
Update stable for vn3.1
29 tasks
28 tasks
iboutle
approved these changes
Apr 28, 2026
DanStoneMO
approved these changes
May 1, 2026
Contributor
DanStoneMO
left a comment
There was a problem hiding this comment.
Tested this with JEDI and all is good. No linked lfric-jedi PR will be needed.
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.
PR Summary
Sci/Tech Reviewer:
Code Reviewer: Yaswant Pradhan (@yaswant)
This is the Apps part of work to revamp the
face_selectorinfrastructure, which ensure that when looping over faces within columns, faces are only looped over once. This PR fixes a number of flaws and deficiencies with them. It does this by changing how theface_selectorfields are computed, and changing the values they can take.Kernels with this data access pattern that were previously not using the face selectors now are, which is a modest performance improvement.
In particular:
WandSfaces. Now they can just iterate overN,Eor no faces if necessaryThis fixes a number of problems:
face_selectorfields now take sensible values in halos, which may allow some kernels to used with redundant computationLinked-To
Details
face_selectorsare updated to use their new formface_selectorshave been added to a series of kernels (mainly physics kernels) that have the same access pattern of writing to a face from only one kernelDocumentation
See the linked core PR for documentation
Results
Here are PDFs containing plots from the test suite showing the neutral scientific impact:
gungho:
results_face_selector_gungho.pdf
lfric_atm:
results_face_selector_lfric_atm.pdf
There should be a modest reduction in time by using this scheme in the boundary layer. Here are timings from differnt tests in the lfric_atm_weekly suite (just from a single run, so subject to variability) that demonstrate this:
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - face_selectors_apps/run31
Suite Information
Task Information
✅ succeeded tasks - 1511
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review