Fix PR#377 Enable Transmute script for bl imp and exp kernels - over i#534
Conversation
Matthew Hambley (MatthewHambley)
left a comment
There was a problem hiding this comment.
Code owner (build system) no change to build system itself, just extension of list in line with usage.
Hacka Fett (christophermaynard)
left a comment
There was a problem hiding this comment.
I have checked with the developer and developer tests have been run. I have the the CCE openMP tests and the OpenMP scaling looks good for these changes. The scripts are simpler and generate a consistent openMP parallelisation, with reasonable performance.
Joerg Henrichs (hiker)
left a comment
There was a problem hiding this comment.
I realise I am a bit late, and I am ok with this PR, given that it is consistent with the other existing transmute script.
As a
I do wonder though if it wouldn't be easier to understand if we had individual python files for each of the new files. In these files the trans function would just set the equivalent of SCRIPT_OPTIONS_DICT for this specific file only, and then call a common helper PSyclone function (which is the current local.py), which takes this SCRIPT_OPTIONS_DICT as argument? While that would be more files (atm 2 files, independent on how many source files it applies to; with the change we would have n+1 files, one for each of the n files plus one helper), but it feels easier to see how the flow works?
Consider that a philosophical pondering and just ignore, I am happy enough to get this merged in :)
It's a good suggestion for the future of Transmute, we can look at that when we have more of an aligned strategy for now to do the scripts. We certainty could lift the core of this file into a callable function, which other scripts could use more readily. I'll link Joe who is looking into this for us. |
|
svadams (@svadams), this PR is ready for review. |
Create or enable a Transformation script for the boundary layer kernels which affect the domain to add OMP directives.
Introduced is a
local.pyscript for kernels, which if the loop variable is anior anl, then the OMP directive is added, instead of the top loop like the Transmute global script.interfaces/physics_schemes_interface/source/kernel/bl_exp_kernel_mod.F90- Local kernel script with Overrideinterfaces/physics_schemes_interface/source/kernel/bl_imp_kernel_mod.F90- Local kernel script with Overrideinterfaces/physics_schemes_interface/source/kernel/bl_imp2_kernel_mod.F90- Local kernel script with OverridePerformance of all kernels improves as a result of the original changes in PR #377 , see #106. Combined with #416, the implicit umbrella of imp_kernel and imp2_kernel is much greater.
NOTE, these changes have not been explicitly tested, and may be marginally different than #377, though the same loops are still parallelised, but over a different index.
Sci/Tech Reviewer: Hacka Fett (Hacka Fett (@christophermaynard))](https://github.com/christophermaynard)
Code Reviewer: svadams (svadams (@svadams))](https://github.com/svadams)
Umbrella Issue: #106
Issue: #361
PR Summary
Sci/Tech Reviewer:
Code Reviewer:
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - transmute_bl_exp_imp_kernels_2/run7
Suite Information
Task Information
❌ failed tasks - 2
Test Suite Results - lfric_apps - transmute_bl_exp_imp_kernels_2/run6
Suite Information
Task Information
✅ succeeded tasks - 51
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