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

Handle Loki dimension pragmas for modules (and not only routines) for FP #417

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

MichaelSt98
Copy link
Collaborator

Infer shape via Loki dimension pragmas, e.g.,

!$loki dimension(x/2, x**2, (x+y)/x)
real(kind=jprb), dimension(:, :, :), pointer :: v6 

not only for routines but also for modules (FP only).

Copy link

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

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.05%. Comparing base (899f5ac) to head (a460255).
Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #417   +/-   ##
=======================================
  Coverage   93.04%   93.05%           
=======================================
  Files         198      198           
  Lines       39320    39359   +39     
=======================================
+ Hits        36587    36627   +40     
+ Misses       2733     2732    -1     
Flag Coverage Δ
lint_rules 96.39% <ø> (ø)
loki 93.01% <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

@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 and simple and well tested. LGTM. :shipit:

Copy link
Collaborator

@reuterbal reuterbal left a comment

Choose a reason for hiding this comment

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

Fully agreed with @mlange05 's comment. Many thanks!

Comment on lines +2050 to +2051
def to_str(expr):
return str(expr).lower().replace(' ', '')
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like we're missing a StrCompareMixin somewhere?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, but that's an (internally) know issue; we don't force StrCompareMixin on pure operations (Sum, Product, etc.). We could, probably, but beyond this PR I'd argue? Maybe we need a separate (formal) issue on this though?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes fully agreed - I didn't mean to imply this needs to be actioned here. Documenting this in an issue would be a good idea, though.

@reuterbal reuterbal added the ready to merge This PR has been approved and is ready to be merged label Nov 4, 2024
@reuterbal reuterbal merged commit 8d7cc38 into main Nov 4, 2024
13 checks passed
@reuterbal reuterbal deleted the nams-fp-loki-dimension-pragma-modules branch November 4, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to 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