Skip to content

Conversation

@mo-alistairp
Copy link
Collaborator

Adding code generation for ScalarArrays (towards #1312 ). The metadata support was added in #2173.

@mo-alistairp mo-alistairp self-assigned this Aug 19, 2025
@mo-alistairp mo-alistairp added in progress LFRic Issue relates to the LFRic domain labels Aug 19, 2025
@codecov
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (60c3bf6) to head (9422096).
⚠️ Report is 151 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #3101    +/-   ##
========================================
  Coverage   99.95%   99.95%            
========================================
  Files         379      380     +1     
  Lines       53811    53913   +102     
========================================
+ Hits        53789    53891   +102     
  Misses         22       22            

☔ View full report in Codecov by Sentry.
📢 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.

@mo-alistairp
Copy link
Collaborator Author

This still isn't working as intended, but is getting closer to correct. As an example, the code gen is now adding the scalar arrays to the generated code, alongside the arrays containing their dimensions. However, it is not adding these dimensions to the generated code (e.g., no dimensions(...) mention). It is also assigning the field as intent(in) right now, which it shouldn't do either.

Furthermore, the stub_gen test is failing because we are currently adding the dimensions array to the psyir layer as an ArgumentInteraface which isn't there as an argument at the call. Need to find a way around this. I'm wondering if we need a dimensions array at all but I'll have to investigate that further.

@mo-alistairp
Copy link
Collaborator Author

Thanks for your comments, I've addressed them and it is now passing CodeCov too. It's now ready for review again

@mo-alistairp mo-alistairp requested a review from arporter January 23, 2026 16:03
arporter added a commit to stfc/lfric_core that referenced this pull request Jan 23, 2026
(For stfc/PSyclone#3101) Add GH_SCALAR_ARRAY to argument_mod
Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Almost! The modified test needs a bit more work.
I've taken the liberty of updating the lfric_apps hash in the workflow file and have fired off the integration tests.

@arporter
Copy link
Member

arporter commented Jan 23, 2026

Two of the integration tests failed but one seems to be #3297 and the other is because stfc/lfric_apps#1 hasn't been merged yet. i.e. neither failure is the fault of this PR.

@mo-alistairp
Copy link
Collaborator Author

Hopefully all is good now!

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

All good now, thanks Alistair :-)
I'll update the LFRic Apps hash again now that the fix for the change in location of OMPParallelTrans has gone on to that repo.

Updated LFRIC_APPS_HASH to a new commit hash to allow for new location of OMPParallelTrans.
@arporter
Copy link
Member

Now that I've updated the LFRic Apps hash, I'm re-running the ITs for this PR...if they are all fine then this is good to go.

@arporter
Copy link
Member

ITs were all green. This is ready to go once the CI has completed.

@arporter arporter merged commit 2dc3b95 into master Jan 26, 2026
15 checks passed
@arporter arporter deleted the 1312_scalararray_code_gen branch January 26, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants