ecmwf-ifs / loki

Freely programmable source-to-source translation for Fortran
https://sites.ecmwf.int/docs/loki/
Apache License 2.0
29 stars 12 forks source link

Transformations: SCCRawStackPipeline and SCC config-from-file #314

Closed mlange05 closed 3 months ago

mlange05 commented 5 months ago

The main point of this PR is a re-base-and-replay of PR #201 by @rolfhm . It primarily rebases the main implementation of the TemporariesSCCRawStackTransformation over recent main and squashes the slightly convoluted commit history. I then added the necessary steps to integrate this with the recent addition of SCC "pipeline" classes and added a specific override that we need to integrate this with CLOUDSC regression testing. The latter is then implemented in the CLOUDSC companion PR (https://github.com/ecmwf-ifs/dwarf-p-cloudsc/pull/86).

The small override option needed for CLOUDSC regression testing (driver_horizontal) comes from the horizontal variable name being different in the driver routine (NPROMA) to the kernel routines (KLON). As this new allocator does not remap the horizontal over the calls, I added a hard-override. The idea is to merge this now and then mop up the rest when we consolidate the loki.transformations.temporaries sub-package.

Due to the same reasoning this PR also does not change much in the implementation of the RawStackAllocator itself. The implementation is cleanly isolated and close the stack pool allocator, but there is some overlap where we could reduce redundancy by refactoring common sub-steps. However, I think this is beyond the scope of this PR.

And finally, @rolfhm could you please take a look and indicate here if you are happy with this and if this still works for you?

github-actions[bot] commented 5 months ago

Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/314/index.html

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 99.43182% with 3 lines in your changes missing coverage. Please review.

Project coverage is 95.25%. Comparing base (5300280) to head (26bd8cd). Report is 94 commits behind head on main.

Files Patch % Lines
loki/transformations/raw_stack_allocator.py 99.11% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #314 +/- ## ========================================== + Coverage 95.11% 95.25% +0.14% ========================================== Files 165 170 +5 Lines 35065 36258 +1193 ========================================== + Hits 33351 34539 +1188 - Misses 1714 1719 +5 ``` | [Flag](https://app.codecov.io/gh/ecmwf-ifs/loki/pull/314/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ecmwf-ifs) | Coverage Δ | | |---|---|---| | [lint_rules](https://app.codecov.io/gh/ecmwf-ifs/loki/pull/314/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ecmwf-ifs) | `96.39% <ø> (ø)` | | | [loki](https://app.codecov.io/gh/ecmwf-ifs/loki/pull/314/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ecmwf-ifs) | `95.23% <99.43%> (+0.14%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ecmwf-ifs#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.