# Make setval_* compute redundantly to the level 1 halo if it
# is in its own loop and only if it has an iteration space that is
# *not* restricted to owned dofs.
for loop in subroutine.loops():
if loop.iteration_space == "dof":
if len(loop.kernels()) == 1:
if loop.kernels()[0].name in ["setval_c", "setval_x"]:
rtrans.apply(loop, options={"depth": 1})
The example script in
https://github.com/stfc/PSyclone/blob/master/examples/lfric/scripts/gpu_offloading.py
contains:
But modifying
setval_xintroduces changes to the KGO. Since this example might be used in 'real' LFRic, we should removesetval_xand only modifysetval_c.