-
Notifications
You must be signed in to change notification settings - Fork 33
#1312 ScalarArray code generation #3101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
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 Furthermore, the stub_gen test is failing because we are currently adding the dimensions array to the psyir layer as an |
You can just update it as part of this PR. In order to get the integration tests to work, it will also need to be added to stfc/lfric_core. Ideally we'll remove this duplication and perhaps have a git submodule pointing to stfc/lfric_core but we're in a transition stage at the moment. |
I think I misread your comment before, so you need me to open a PR in stfc/lfric_core adding GH_SCALAR_ARRAY into |
I just tried to do this and I don't currently have permission to push to stfc/lfric_core
|
Ah! You should have an invitation now. @sergisiso and @LonelyCat124 should we protect |
Imo yes I think so, using our usual controls would be best since we want to link (loosely) PRs there to PRs in PSyclone anyway |
|
I've made a PR for the changes to |
arporter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work - it's getting very close now.
See comments inline.
I'll run the ITs once stfc/lfric_core is updated.
|
Thanks for your comments, I've addressed them and it is now passing CodeCov too. It's now ready for review again |
(For stfc/PSyclone#3101) Add GH_SCALAR_ARRAY to argument_mod
arporter
left a comment
There was a problem hiding this 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.
| create_arg_list = KernCallArgList(kernel) | ||
| with pytest.raises(InternalError) as excinfo: | ||
| create_arg_list.scalar(arg) | ||
| const = LFRicConstants() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've already got a const object but if this is the only thing then I'll do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, you also need to update the name and docstring of the test (now that it does both stub and normal).
|
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. |
Adding code generation for ScalarArrays (towards #1312 ). The metadata support was added in #2173.