PSyclone: `OMPTaskTrans` / `InliningTrans` / ? resulting in incorrect data sharing clauses
When running OMPTaskTrans (with manually predone inlining trans) there’s an issue with renamed variables not appearing in data sharing clauses.
When inlining momentum_u_code we get the expected behaviour:
firstprivate(j_out_var,j_el_inner,u_e,depe,u_w,depw,v_sc,v_s,deps,v_nc,**v_n**,depn, (there’s an argument over whether these should be firstprivate or not but thats not really important for now).
When then inlining momentum_v_code, the inlining transformation renames v_n to v_n_1 to prevent collision (makes sense), however the private/firstprivate clauses (and dependency clauses) on this task still use v_n instead of v_n_1.
I think this is happening as the parent parallel clause doesn’t seem to know anything about v_n_1, and thus it is considered to be shared by the tasks, so shouldn’t be declared private or firstprivate, however this doesn’t explain why the task’s clauses contain v_n which is never used in the task, so shouldn’t be inside the clauses unless renaming is happening later than I expect?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 26 (11 by maintainers)
Commits related to this issue
- #2421 add initial failing test [skip ci] — committed to stfc/PSyclone by arporter 3 years ago
Let me see if I can write a test that exercises this…
Doing InlineTrans (after hacking the
validate) and then OMPLoopTrans, the generated code is:so
a_clashis nowsharedwhich is wrong.