GithubHelp home page GithubHelp logo

Comments (10)

stanmoore1 avatar stanmoore1 commented on May 28, 2024

Hi @azacharos thanks for the bug report. Can you please attach the files needed to reproduce this issue? (The smaller the better).

from sparta.

azacharos avatar azacharos commented on May 28, 2024

Hi,
I attached the zip file that contains a smaller case that appears the same problem after 5000 time steps.
I am using the mpi version of the code with the flag DSPARTA_BIGBIG on 12 cpu cores.

from sparta.

stanmoore1 avatar stanmoore1 commented on May 28, 2024

Thank you, I'll take a look.

from sparta.

stanmoore1 avatar stanmoore1 commented on May 28, 2024

I can reproduce a segfault if I use this in your reproducer:

run                 2000
adapt_grid all refine particle 10 4

write_restart       flow.restart.final

from sparta.

azacharos avatar azacharos commented on May 28, 2024

The error appears also if the value option is used in the adapt_grid.

from sparta.

stanmoore1 avatar stanmoore1 commented on May 28, 2024

Yeah, I am debugging now, should have a fix soon.

from sparta.

stanmoore1 avatar stanmoore1 commented on May 28, 2024

The issue is that childlist here https://github.com/sparta/sparta/blob/master/src/adapt_grid.cpp#L503 is too small. The nx ny and nz default to 2x2x1 unless you use the cells keyword, but you need 20x20x1. I may need help from @sjplimp to get the logic right.

from sparta.

stanmoore1 avatar stanmoore1 commented on May 28, 2024

As a workaround, you can set childlist bigger. You need a factor of 100 (since 20x20x1 divided by 2x2x1 = 100).

$ git diff adapt_grid.cpp
diff --git a/src/adapt_grid.cpp b/src/adapt_grid.cpp
index 961c993..b72a43c 100644
--- a/src/adapt_grid.cpp
+++ b/src/adapt_grid.cpp
@@ -500,7 +500,7 @@ void AdaptGrid::setup(int iter)
 
   // list of new cell indices for one refined cell
 
-  childlist = new int[nx*ny*nz];
+  childlist = new int[nx*ny*nz*100];
 
   // rlist and clist for refine/coarsen

from sparta.

stanmoore1 avatar stanmoore1 commented on May 28, 2024

adapt_bug.zip

Here is a more minimal reproducer.

from sparta.

stanmoore1 avatar stanmoore1 commented on May 28, 2024

Fixed by #224, closing #215.

from sparta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.