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

Disallow computations on field operator arguments in program #1180

Open
tehrengruber opened this issue Feb 22, 2023 · 0 comments
Open

Disallow computations on field operator arguments in program #1180

tehrengruber opened this issue Feb 22, 2023 · 0 comments
Labels
gt4py.next Issues concerning the new version with support for non-cartesian grids.

Comments

@tehrengruber
Copy link
Contributor

tehrengruber commented Feb 22, 2023

This currently fails

@program
def program_domain(a: Field[[IDim, JDim], float64], my_scalar: float64):
    fieldop_domain(my_scalar + 1., a, out=a, domain={IDim: (1, 9), JDim: (4, 6)})

program_domain(a_IJ_float, 1.0, offset_provider={})

with the following error

E           TypeError: 'StencilClosure.inputs' must be <class 'gt4py.next.iterator.ir.SymRef'> (got 'my_scalar + 1.0' which is a <class 'gt4py.next.iterator.ir.FunCall'>).

../../src/gt4py/eve/type_validation.py:363: TypeError

We should either allow this (probably tricky) or give an error earlier in the toolchain.

@havogt havogt added the gt4py.next Issues concerning the new version with support for non-cartesian grids. label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gt4py.next Issues concerning the new version with support for non-cartesian grids.
Projects
None yet
Development

No branches or pull requests

2 participants