Parallel p4est simulation crashes when ranks have zero elements #1973
Labels
bug
Something isn't working
parallelization
Related to MPI, threading, tasks etc.
question
Further information is requested
Apparently this has been around before, see the great analysis in #1096.
However, I am still facing the following issue:
Example to reproduce
Take
https://github.com/trixi-framework/Trixi.jl/blob/main/examples/p4est_3d_dgsem/elixir_advection_amr.jl
and apply the following changes:
initial_refinement_level = 1
tspan = (0.0, 30.0)
Run on 2 MPI ranks.
Error 1
The simulation fails at
Trixi.jl/src/callbacks_step/analysis_dg3d_parallel.jl
Line 17 in fc15c38
because
get_node_vars
tries to access the first element, which does not exist on one of the two ranks.This can be avoided by using something like
Error 2
Next, the simulation fails at
Trixi.jl/src/callbacks_step/analysis_dg3d_parallel.jl
Lines 73 to 77 in fc15c38
because the index of the first element is passed to the anonymous function
Trixi.jl/src/callbacks_step/analysis_dg3d.jl
Lines 259 to 264 in fc15c38
A quick fix was to replace the body by something like
Things then work as expected. But how would I solve this properly?
The text was updated successfully, but these errors were encountered: