- attached test.par
TagBoxArray in ErrorEst function has wrong shape
AMReX allows mixing FABs of different shape and currently the CarpetAmrCore::ErrorEst functions assumes that the tags
array it is passed by AMReX has the same shape as the grid functions. This is however not correct as adding a
cerr << grid << " on level " << level << "\n";
cerr << "offset: " << grid.cactus_offset.x << " " << grid.cactus_offset.y << " " << grid.cactus_offset.z << "\n";
cerr << "box: " << tags.get(mfi).box() << "\n"
shows which (for a test case with 3 ghost zones, run on 1 MPI rank and 1 thread) shows:
GridDescBase{gsh:[14,14,14],lbnd:[0,0,0],ubnd:[13,13,13],lsh:[14,14,14],bbox:[1,1,1,1,1,1],nghostzones:[3,3,3],tmin:[0,0,0],tmax:[14,14,14]} on level 0
offset: -3 -3 -3
box: ((-1,-1,-1) (8,8,8) (0,0,0))
This leads to AMReX aborting the run due to an out of bounds access:
terminate called after throwing an instance of 'std::runtime_error'
what(): (-3,-3,-3,0) is out of bound (-1:8,-1:8,-1:8,0:0)
Comments (4)
-
reporter -
repo owner AMReX allows grid functions to have different number of ghost zones. I think that the error grid function is cell centred and has no ghost zones, while the Cactus grid functions have ghost zones. The indexing in the schedule uses AMReX’s indexing functions that take this into account. I’ll run your parameter file to see whether I can reproduce this.
-
reporter You may need to check out rhaas/testprolongate to get the thorn though I would guess that any parfile setting up a similar grid should do.
-
reporter - changed status to resolved
Resolved in git hash e7868c7 "AMReX: Do not set error estimate on boundary" of cactusamrex
- Log in to comment
grid setup to trigger issue (remove TestProlongate thorn is not compiled in).