8000 where statement bug in fparser1 · Issue #430 · stfc/fparser · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

where statement bug in fparser1 #430

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

Closed
rupertford opened this issue Oct 2, 2023 · 1 comment
Closed

where statement bug in fparser1 #430

rupertford opened this issue Oct 2, 2023 · 1 comment
Assignees

Comments

@rupertford
Copy link
Collaborator

There is a bug in the processing of fparser1 for where statements. We get the internal expression on output instead of the value of the external expression. For example, the following input code ...

subroutine columnwise_op_asm_m2v_lumped_inv_kernel_code()
  where (columnwise_matrix(:,:,cell) /= 0.0_r_solver)
     columnwise_matrix(:,:,cell) = 1.0_r_solver/columnwise_matrix(:,:,cell)
  end where
end subroutine columnwise_op_asm_m2v_lumped_inv_kernel_code

gives

!BEGINSOURCE
  SUBROUTINE columnwise_op_asm_m2v_lumped_inv_kernel_code()
    WHERE ( F2PY_EXPR_TUPLE_1 )
      columnwise_matrix(:,:,cell) = 1.0_r_solver/columnwise_matrix(:,:,cell)
    END WHERE
  END SUBROUTINE columnwise_op_asm_m2v_lumped_inv_kernel_code

We are not actively supporting fparser1 anymore, however, PSyclone still uses it for parsing LFRic and this fixes that bug without having to wait for the new fparser2/psyir parsing of LFRic which will take some time to complete.

@rupertford
Copy link
Collaborator Author

Created branch 430_where_bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0