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

fix[next]: Fix size temporary size computation #1584

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

tehrengruber
Copy link
Contributor

This PR fixes a bug where the size of unstructured temporary fields was wrong in certain cases. This bug surfaced while working on #1568. It took me a while to figure out why this never surfaced in validation tests anywhere:
Right now we compute temporaries for unstructured everywhere, e.g. on all vertices, etc.. What everywhere means is derived from the offset provider in _max_domain_sizes_by_location_type. The information is contained either

  • explicitly if we have a connectivity with origin axis being the axis whose size we want to know. E.g. if we have a V2E connectivity then we have table.shape[0] many vertices.
  • or implicitly if we have a connectivity with the neighbor axis whose size we want to know. E.g. if we have a V2E connectivity then we have at least table.max()+1 many edges. This computation was wrong.

So as long as we have also the E2V connectivity for the examples above, the implicit information is not needed / used and everything works fine. For all our test cases this is indeed the case and since computing temporaries everywhere is only a temporary solution anyway I am fine with just fixing this without increasing test coverage.

Copy link
Contributor

@egparedes egparedes left a comment

Choose a reason for hiding this comment

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

LGTM

@edopao
Copy link
Contributor

edopao commented Jul 22, 2024

You need to merge main into this PR in order to skip the CI on Todi.

@edopao
Copy link
Contributor

edopao commented Jul 23, 2024

You need to merge main into this PR in order to skip the CI on Todi.

Done. I would like to get this fix merged so we can merge main into gtir later today.

@tehrengruber tehrengruber merged commit 369a2dc into GridTools:main Jul 23, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants