-
Notifications
You must be signed in to change notification settings - Fork 49
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
bug[next]: Fix codegen in gtfn for unused vertical offset provider #1746
Conversation
Let's add a test, it's not obvious to me how to trigger that bug. |
@@ -229,6 +229,7 @@ def simple_mesh() -> MeshDescriptor: | |||
C2E.value: gtx.NeighborTableOffsetProvider( | |||
c2e_arr, Cell, Edge, 4, has_skip_values=False | |||
), | |||
Koff.value: KDim, |
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.
Why is this change here? I don't understand how this is related. Is it required to make the test below fail before the fix?
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.
This is an easy way to trigger the error.
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.
But not the best I guess. An isolated test would be one that has an Cartesian offset for a dimension that is not in any field?
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.
any updates on this? I would need it for C2SM/icon4py#564
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.
@nfarabullini Let's introduce a new unstructured_case_3d
fixture that starting from the unstructured_case
fixture adds the default size and offset provider for the KDim
.
@jcanton I think we can merge this soon, but this will likely not help you much since icon4py is pinned to an older version of GT4PY until #1738 is merged.
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.
I didn't think about that, thanks!
tests/next_tests/integration_tests/feature_tests/ffront_tests/test_execution.py
Outdated
Show resolved
Hide resolved
tests/next_tests/integration_tests/feature_tests/ffront_tests/test_execution.py
Outdated
Show resolved
Hide resolved
…test_execution.py Co-authored-by: Till Ehrengruber <[email protected]>
…test_execution.py Co-authored-by: Till Ehrengruber <[email protected]>
…into koff_small_fix
Co-authored-by: Till Ehrengruber <[email protected]>
Co-authored-by: Till Ehrengruber <[email protected]>
Providing an offest provider for a vertical dimension without using that dimension in a program, e.g. no arguments are fields defined on K, resulted in erroneous C++ code.