Skip to content

(towards #3252) improve value range env variable#3355

Open
hiker wants to merge 9 commits intomasterfrom
3252_improve_value_range_env_variable
Open

(towards #3252) improve value range env variable#3355
hiker wants to merge 9 commits intomasterfrom
3252_improve_value_range_env_variable

Conversation

@hiker
Copy link
Collaborator

@hiker hiker commented Feb 27, 2026

Changes the implementation to use a single environment variable PSY_VALUE_RANGE to specify all variables, which adds flexible support for structures etc (field%data=...).

It does not address the fact that now a user needs to know the 'internal' name (after lowering) of a variable that is passed to a kernel.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (df4a4f1) to head (5210d92).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3355   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         386      386           
  Lines       54187    54187           
=======================================
  Hits        54165    54165           
  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.

@hiker
Copy link
Collaborator Author

hiker commented Feb 27, 2026

IT passed, ready for review.

@hiker
Copy link
Collaborator Author

hiker commented Feb 27, 2026

Note that I had a README update after IT, they will obviously not affect the results.

@sergisiso sergisiso changed the title 3252 improve value range env variable (towards #3252) improve value range env variable Feb 27, 2026
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.

Thanks for fixing this @hiker I like the . way more than the __ for navigating modules-regions-varaibles. And getting rid of any ambiguities with valid fortran names. I just have minor comments about documentation and testing.

run: compile
# Note that if the output line is not found, the make will abort with error
./value_range_check 2>&1| grep "PSyData: Variable a_fld has the invalid value"
./value_range_check 2>&1| grep "PSyData: Variable 'a_fld%data' has the invalid value"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great.
Maybe we should update ".github/workflows/compilation.yml" to do
F90=gfortran make -C examples run instead of compile?
(I tried and most succeeded but there are some errors, but I reckon we can bypass those since they are broken also for command line execution, and we need to fix them at some point anyway)

:3.3 A value less than or equal to 3.3
1.1: A value greater than or equal to 1.1

The syntax for the environment variable is one of:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this mention that is ;-separated entries?

The syntax for the environment variable is one of:

``PSYVERIFY__module__kernel__variable``
``PSY_VALUE_RANGE="module.kernel.variable=...``
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that this is domain-agnostic we probably shouldn't use 'kernel'. I see the lib implementation uses "region" which is a better name, but it is also not documented anywhere what this means. I believe is the region_name that any PSyData can give to its application region? Could you add some explanation about this in the lines below.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants