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

Vector notation not removed when assignments moved into KLON loop #200

Open
rolfhm opened this issue Dec 15, 2023 · 2 comments
Open

Vector notation not removed when assignments moved into KLON loop #200

rolfhm opened this issue Dec 15, 2023 · 2 comments

Comments

@rolfhm
Copy link
Contributor

rolfhm commented Dec 15, 2023

If you have something like

PZ(1:KLON, 1) = 0.

DO JLON = 1, KLON
  DO JLEV = 1, KLEV
    ....
  ENDDO
ENDDO

Running the pool_allocator transformation will give you something like

DO JLON = 1, KLON
  PZ(1:KLON, 1) = 0.
  DO JLEV = 1, KLEV
    ....
  ENDDO
ENDDO

I assume this has nothing to do with the pool_allocator and is due to the transformation that tries to merge jlon loops failing to replace the range index with a jlon?
Small example can be found in ac_cloud_model2.F90 here:
https://github.com/rolfhm/minimal_test/tree/pool_infinite_recursion

@reuterbal
Copy link
Collaborator

Hi Rolf,
thanks for this, I share your assessment. I think what you need here is to apply the resolve_vector_notation utility as part of the housekeeping in the beginning:

def resolve_vector_notation(routine):

That should replace the vector notation by an explicit horizontal loop, and, as a consequence, then be handled correctly in the de- and re-vectorizing during SCC.

@rolfhm
Copy link
Contributor Author

rolfhm commented Dec 15, 2023

Should that routine be called by the transformation script for all transformations?

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

No branches or pull requests

2 participants