Skip to content
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

Fix representation of array return type in OMNI frontend #391

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

reuterbal
Copy link
Collaborator

The translation of the OMNI AST into the Loki IR dropped the shape information of the return type, representing the return value always as scalar. This PR fixes the behaviour and adds a test.

Small caveat is that with OMNI the dimension information will always be put on the variable, i.e., both

  • real, dimension(n) :: ret_val
  • real :: ret_val(n)
    will always be represented as the latter. But since string-identical parse-unparse cycle is not achievable with OMNI anyway, I consider this not too important. Please shout if you disagree.

This PR should fix the problems that @MichaelSt98 encountered with OMNI in #378.

Copy link

github-actions bot commented Oct 8, 2024

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

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.53%. Comparing base (0c5750b) to head (7d09335).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #391   +/-   ##
=======================================
  Coverage   95.52%   95.53%           
=======================================
  Files         186      186           
  Lines       38956    38974   +18     
=======================================
+ Hits        37214    37233   +19     
+ Misses       1742     1741    -1     
Flag Coverage Δ
lint_rules 96.39% <ø> (ø)
loki 95.51% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@MichaelSt98 MichaelSt98 left a comment

Choose a reason for hiding this comment

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

Perfect, thank you!

Copy link
Collaborator

@mlange05 mlange05 left a comment

Choose a reason for hiding this comment

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

Nice catch! LGTM, GTG. :shipit:

@mlange05 mlange05 added the ready for merge This PR has been approved and is ready to be merged label Oct 9, 2024
@reuterbal reuterbal merged commit 3834903 into main Oct 9, 2024
13 checks passed
@reuterbal reuterbal deleted the nabr-fix-omni-array-function branch October 9, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for merge This PR has been approved and is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants