Dependency issue: Particle ghost executed after feedback force loop
Background: I've been adding a call to the feedback force loop to gather some data for RT injection. To make sure everything works as expected, I've been counting neighbours during the feedback force loop and the subsequent injection loop.
I have found a case where a particle gets called in a ghost task after it has been called in the stellar feedback force loop.
I have prepared a branch and an example where this issue occurs.
To reproduce this error:
- Use the
dependency-issue-feedback-ghost-debugging
branch (it's branched off of one of my RT development branches) - Compile swift with
--with-rt=debug --with-rt-riemann-solver=GLF --with-hydro-dimension=3 --with-hydro=gizmo-mfv --with-riemann-solver=hllc --with-stars=GEAR --with-feedback=none --enable-debug --enable-debugging-checks
- run the example in
examples/RadiativeTransferTests/dependency-issue-test
. Therun.sh
is set up to repeat the run up to 100 times. If the error is caught, swift will crash. The error happens for me at the second step:
# Step Time Scale-factor Redshift Time-step Time-bins Updates g-Updates s-Updates sink-Updates b-Updates Wall-clock time [ms] Props
0 0.000000e+00 1.0000000 0.0000000 0.000000e+00 1 56 18000 31000 13000 0 0 709.344 281
[00000.8] engine_drift_all: Drifting all to t=9.765625e-05
[00000.8] space_rebuild: (re)building space
[00000.9] rt_debugging_end_of_step_hydro_mapper: Resetting debug_iact_stars_inject_prep for pID 8780
[00000.9] rt_debugging_checks_end_of_step: This step: 201 201 201 201
[00000.9] rt_debugging_checks_end_of_step: Over lifetime: 651492 651492 651492 651492
1 9.765625e-05 1.0000000 0.0000000 9.765625e-05 46 46 4 8 4 0 0 76.806 1
[00000.9] runner_do_sym_pair_stars_feedback: Caught pID 8780 in cell 269 in Feedback Loop:
[00000.9] runner_do_ghost: Resetting_1 part pID 8780 in ghost
[00000.9] rt_reset_part: Resetting debug_iact_stars_inject_prep for pID 8780
[00000.9] DO_SYM_PAIR1_RT: Caught pID 8780 in cell 269 in RT injection loop
[00000.9] ./rt/debug/rt_iact.h:runner_iact_rt_inject():81: Injecting energy into part that wasn't called during injection prep: sID 26391 pID 8780 r/H_s 0.779732
If you want to look for where the messages in runner_doiact_functions_stars.h
, runner_doiact_functions_hydro.h
, and runner_ghost.h
are printed from, it might speed things up to look for the particle ID 8780
that causes the problem and is currently hardcoded.