Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amrex::Abort::0:: (-1,0,0,0) is out of bound (0:63,0:63,0:31,0:0) #2051

Closed
wang1202 opened this issue Jan 8, 2025 · 4 comments
Closed

amrex::Abort::0:: (-1,0,0,0) is out of bound (0:63,0:63,0:31,0:0) #2051

wang1202 opened this issue Jan 8, 2025 · 4 comments

Comments

@wang1202
Copy link

wang1202 commented Jan 8, 2025

Hello, I'm testing the FlowInABox case, and I found that when I apply grid refinement, the following error message appears when producing the next level:

amrex::Abort::0:: (-1,0,0,0) is out of bound (0:63,0:63,0:31,0:0) !!!

Using the debug function in VSCode, I noticed that the bounds include 3 ghost points added to the boundaries, but it seems these points are not added to the higher level. Where can I check whether the ghost points are being added to the higher levels? Below are what I tested in the input file:

REFINEMENT / REGRIDDING

amr.max_level = 1 # maximum level number allowed
amr.compute_new_dt_on_regrid = true

erf.coupling_type = "TwoWay"
erf.regrid_int = 1
erf.refinement_indicators = diff_theta

erf.diff_theta.max_level = 1
erf.diff_theta.adjacent_difference_greater = 1.
erf.diff_theta.field_name = theta
erf.diff_theta.start_time = 10.0

@asalmgren
Copy link
Collaborator

Hey @wang1202 -- thanks for pointing this out! Let me take a look at this tonight and get back to you -- I haven't tested this problem recently ...

@asalmgren
Copy link
Collaborator

@wang1202 -- I believe this issue is fixed by PR 2055 -- could you give that a try? Please let me know if it works.

@wang1202
Copy link
Author

wang1202 commented Jan 10, 2025

Hi @asalmgren -- thank you for the quick reply. After updating the code and running again, the out-of-bounds error seems to be gone. However, the segmentation fault still occurs. Below is the output where the run stops:

"""
Coarse STEP 5 starts ...
Based on cfl of 1.0
Compressible dt at level 0 would be: 9.232827232e-05
Anelastic dt at level 0 would be: 172.6188152
Fixed dt at level 0 is: 0.025
Creating new distribution map on level: 1
NEW BA FROM COARSE AT LEVEL 1 (BoxArray maxbox(2)
m_ref->m_hash_sig(0)
((0,0,0) (127,127,1) (0,0,0)) ((0,0,62) (127,127,63) (0,0,0)) )

Segfault
See Backtrace.0 file for details
"""

And below is the content of Backtrace.0:
"""
0: amrex::BLBackTrace::print_backtrace_info(__sFILE*) (in ERF3d.gnu.DEBUG.MPI.ex) (AMReX_BLBackTrace.cpp:203)

1: amrex::BLBackTrace::handler(int) (in ERF3d.gnu.DEBUG.MPI.ex) (AMReX_BLBackTrace.cpp:99)

2: _sigtramp (in libsystem_platform.dylib) + 56

3: amrex::Geometry::isAllPeriodic() const (in ERF3d.gnu.DEBUG.MPI.ex) (AMReX_Geometry.H:340)

4: ERFPhysBCFunct_base::operator()(amrex::MultiFab&, int, int, amrex::IntVectND<3> const&) (in ERF3d.gnu.DEBUG.MPI.ex) (ERF_PhysBCFunct.cpp:315)

5: ERF::initHSE(int) (in ERF3d.gnu.DEBUG.MPI.ex) (ERF_Init1D.cpp:65)

6: ERF::MakeNewLevelFromCoarse(int, double, amrex::BoxArray const&, amrex::DistributionMapping const&) (in ERF3d.gnu.DEBUG.MPI.ex) (ERF_MakeNewLevel.cpp:284)

7: amrex::AmrCore::regrid(int, double, bool) (in ERF3d.gnu.DEBUG.MPI.ex) (AMReX_AmrCore.cpp:121)

8: ERF::timeStep(int, double, int) (in ERF3d.gnu.DEBUG.MPI.ex) (ERF_TimeStep.cpp:55)

9: ERF::Evolve() (in ERF3d.gnu.DEBUG.MPI.ex) (ERF.cpp:398)

10: main (in ERF3d.gnu.DEBUG.MPI.ex) (main.cpp:128)

11: start (in dyld) + 2840
"""

@asalmgren
Copy link
Collaborator

@wang1202 -- sorry not to fix this sooner -- somehow in my head this was resolved but it definitely wasn't. I do believe that PR 2077 fixes this -- I am running with your multilevel inputs and have definitely gotten past the error which occurred when first creating the level 1 grids. I'll close this now but please re-open if there are any more problems!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants