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

Claw expand directive: jk-1 dependencies not transformed correctly #605

Open
elsagermann opened this issue Apr 15, 2021 · 2 comments
Open

Comments

@elsagermann
Copy link

I have a small part of the ham code which is a loop over 2:klev with one variable then depending on 1:(klev-1). I would expect the compiler to change the code to jk & jk-1 for the 1:(klev-1) array notation but it is just transforming everything to jk, which is wrong.

Original code

!$claw expand
  pxtte(1:kproma,2:klev)=pxtte(1:kproma,2:klev)                           &
                    + (psediflux(1:kproma,1:(klev-1))/pmconv(1:kproma,2:klev))
!$claw end expand

Transformation code

DO claw_induction_18 = 1 , kproma
   DO claw_induction_19 = 2 , klev
    pxtte ( claw_induction_18 , claw_induction_19 ) = pxtte ( claw_induction_18 , claw_induction_19 ) + psediflux (&
     claw_induction_18 , claw_induction_19 ) / pmconv ( claw_induction_18 , claw_induction_19 )
   END DO
END DO

Expected code

DO claw_induction_18 = 1 , kproma
   DO claw_induction_19 = 2 , klev
    pxtte ( claw_induction_18 , claw_induction_19 ) = pxtte ( claw_induction_18 , claw_induction_19 ) + psediflux (&
     claw_induction_18 , claw_induction_19 - 1 ) / pmconv ( claw_induction_18 , claw_induction_19 )
   END DO
END DO

Execution of clawfc

Related issues (if any)

Issue #00

@github-actions
Copy link

Thank you for making us aware of an issue with this repository. We will have a look at it as soon as possible.

@clementval
Copy link
Collaborator

clementval commented Apr 15, 2021

This kind of use case is not currently supported.

Transformation code would need to be expanded here to support it.
src/claw/wani/transformation/ll/loop/ExpandNotation.java

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