Closed christophermaynard closed 7 years ago
Yes I confirm that this is a bug in PSyclone.
The discontinuous function was returning false no matter what input it received.
This has been fixed as part of the redundant computation transformation issue #50. Therefore I am closing this issue.
Note, we might be able to remove all halo exchange calls when iterating over owned dofs i.e .for continuous fields as well as discontinuous (as long as there is no stencil access of course). I am currently checking whether that is the case with Mike Hobson and @christophermaynard.
PSyclone is unnecessarily generating halo exchanges when reading from a W3 (discontinuous field) as shown in the example below from advection_alg_mod.x90 First halo exchange on mf field is correct. The writes to W3 field r_rho and loops to last edge, not last halo cell. The calls set_dirty() on W3 field, which is correct because the field is dirty then into the second loop which reads and writes to a W3 field, but no halo exchange is required as the loop is only to last edge because we are reading from W3 field.