Skip to content

Conversation

@arporter
Copy link
Member

@arporter arporter commented Dec 18, 2025

This is a step towards both #2381 (generalising global reductions) and #2674 (new field_min_max builtin). It attempts to reduce the size of #3222 by only adding the two new access types for reductions as well as the skeletons for the new builtins.

arporter and others added 30 commits October 3, 2025 21:56
@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.91%. Comparing base (97dd02d) to head (abd054f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3263   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files         376      376           
  Lines       53529    53562   +33     
=======================================
+ Hits        53484    53517   +33     
  Misses         45       45           

☔ 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.

@arporter arporter self-assigned this Dec 18, 2025
@arporter arporter added LFRic Issue relates to the LFRic domain LFRic PSyKAl-lite Issue related to removal of PSyKAl-lite code in LFRic labels Dec 18, 2025
@arporter arporter changed the title (Towards #2381 #2674) add min max LFRic builtins (Towards #2381 #2674) add min max access types and new LFRic builtins Dec 18, 2025
@arporter
Copy link
Member Author

Ready for a first look from anyone still working @sergisiso or @hiker ?
It shouldn't affect the IT but I'll fire them off to be on the safe side.

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

@arporter Most of the PR looks good but I am getting confused by the need of these specific access types, these seem regular writes to me. It would be good to clarify if these are really needed before continuing.

access_mapping = gh_read: read, gh_write: write, gh_readwrite: readwrite,
gh_inc: inc, gh_readinc: readinc, gh_sum: sum
gh_inc: inc, gh_readinc: readinc, gh_sum: sum,
gh_min: min, gh_max: max
Copy link
Collaborator

Choose a reason for hiding this comment

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

tab to spaces :)

Comment on lines +2800 to +2801
| GH_SCALAR | GH_REAL | n/a | GH_READ, GH_SUM, |
| | | | GH_MIN, GH_MAX |
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand why do we need GH_SUM, GH_MIN or GH_MAX. These is the output scalar of the built-in which will only be written to, Why not GH_WRITE?

Comment on lines +79 to +82
#: Is the output of a MIN reduction (i.e. global minimum value).
MIN = 11
#: Is the output of a MAX reduction (i.e. global maximum value).
MAX = 12
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again MIN/MAX is not an AccessType (same with the pre-existing SUM). It is even more confusing that this refer to the output scalar, which is just written to. So why do we differentiate them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LFRic PSyKAl-lite Issue related to removal of PSyKAl-lite code in LFRic LFRic Issue relates to the LFRic domain reviewed with actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants