Mistake in RT task creation over MPI?
I think there is something not quite right in the creation of RT tasks over MPI, in particular in the creation of the dt-collection tasks in a foreign cell.
The rt_advance_cell_time
task seems to be created at every level:
https://gitlab.cosma.dur.ac.uk/swift/swiftsim/-/blob/master/src/engine_maketasks.c#L635
but ends up assigned only at the super level. Likely overwriting the pointer each time.
The task dependencies are then set on each of these copies.
When activating the tasks via unskip
the copy of the task that is actually attached gets run and it works.
When activating tasks via marktasks
all the copies get activated.
That is what triggers the bug in !1595 (merged).
My impression is that t_rt_advance_cell_time
should only be created if c->super->t_rt_advance_cell_time
is not already set.
The dependency on tend
and on rt_collect_times
should also then only be set once.