carpet bug: assert failure in line 1211 about local_boxes.fine_boundaries being non-empty

Create issue
Issue #1204 closed
Ernazar Abdikamalov created an issue

The latest version of carpet seems to contain a bug that affects AMR+multipatch runs. My stderr and stdout and par file are attached. Found by Roland and Ernazar.


Comments (4)

  1. Roland Haas
    • removed comment

    Ernazar had talked to me about this before a bit but I could not really help. While Ernazar was reverting the commit (4306806ad6d517f4e9b675d3cd541c95db3ea7fa) that introduced the failing assert (line 1211 of, I rooted a bit in the code of It seems as if dh::regrid assumes that local_boxes::fine_boundary is empty when the routine is entered. My suspicion is that this is not true if regrid is entered for a patch that did not actually change (eg level 1 changed which calls regrid on all finer levels that might not have changed or maybe any multipatch patch). A fix would seem to be to do what fast_boxes does and call local_boxes.clear() in lines 287 of might fix it. I don't know how expensive this is though (and if one could re-use some of the apparently expensive content of local_boxes). I have not tested this.

  2. Log in to comment