Elastic-like cross-loop dependencies generate a redundant haloupdate.
Problem in Pseudocode:
for time
haloupd vx[t0]
write to vx[t1] - read from vx[t0]
haloupd vx[t1]
read from vx[t1]
read from vx[t0]
it could be
<(haloup vx[t0])>
for time
---DROP haloupd vx[t0]---since previously written t1 is now t0 and is already updated
write to vx[t1] - read from vx[t0]
haloupd vx[t1]
read from vx[t1]
read from vx[t0]
Elastic-like cross-loop dependencies generate a redundant haloupdate.
Problem in Pseudocode:
it could be
Python script to reproduce: (reduced, starting from https://github.com/devitocodes/devito/blob/master/examples/seismic/tutorials/06_elastic_varying_parameters.ipynb)
elastic_mfe_1d.py
:generated code includes: (where haloupdate1(v_vec,comm,nb,t0); is redundant)