forked from pearu/f2py
-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
Description
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.
Reactions are currently unavailable