Address Issues with Face Selectors#349
Open
Thomas Bendall (tommbendall) wants to merge 5 commits intoMetOffice:mainfrom
Open
Address Issues with Face Selectors#349Thomas Bendall (tommbendall) wants to merge 5 commits intoMetOffice:mainfrom
Thomas Bendall (tommbendall) wants to merge 5 commits intoMetOffice:mainfrom
Conversation
28 tasks
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 PR revamps the
face_selectorinfrastructure, which ensure that when looping over facse 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.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
components/science/source/kernel/algebra/sci_face_selector_support_mod.F90:face_selectorface_selectorvalues, to be used in kernels that loop over faces within a columncomponents/science/source/kernel/algebra/sci_face_selector_kernel_mod.F90: rewritten to use the new method (from the support module)components/science/source/kernel/algebra/sci_face_selector_halo_kernel_mod.F90: a new kernel to allow calculation offace_selectorfields into halo regionscomponents/science/source/psy/sci_psykal_light_mod.f90: adds a simpledeep_int_setval_croutine, setting the value of an integer field into the halos. This could hypothetically be done as an adjustment toint_setval_cthrough a psyclone optimisation script, but as this is not an optimisation and is necessary scientifically, I chose to add a specific psykal_light routinecomponents/science/source/algorithm/sci_geometric_constants_mod.x90: updated for the new computation of the face selectorsDocumentation
The old and new methods are summarised and illustrated in the attached PDF:
main.pdf
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_core - face_selectors_core/run3
Suite Information
Task Information
✅ succeeded tasks - 384
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