geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
217 stars 232 forks source link

seg fault on 2D shell restart with different velocity boundary condition #4029

Open elodie-kendall opened 3 years ago

elodie-kendall commented 3 years ago

Hi,

I'm struggling to get my models to converge with a free surface and it would take to long to go to the small time steps needed for convergence and so I would like to run my 2D viscoplastic shell models with free slip and then restart with a free surface when equilibrium is reached. I can restart a model with free slip or restart a model with a free surface however I cannot switch from free slip to the free surface. My error is not the same as Max's though. It is a segmentation fault: 29 [node031:140850] Signal: Segmentation fault (11) 30 [node031:140850] Signal code: Address not mapped (1)

and in debug mode: free(): invalid pointer: 0x000000000425f050 munmap_chunk(): invalid pointer: 0x0000000003c0cf70

Do you think you could have a look at this please? I attach a simple test that fails below. Thanks a lot.

gassmoeller commented 3 years ago

Hi Elodie, While switching many parameters during a restart will work, it is not something we support in general for all parameters, and some changes are impossible and will not be supported for the foreseeable future (such as changing the number of compositional fields). Your case is somewhere in between. While switching to a free surface looks simple from the parameter file, internally a lot works differently if there is any mesh deformation during the run. For example we use a different mapping from unit cell to real cell in the finite element method. This different mapping requires a stored vector with the so far accumulated mesh deformations. This vector will not be stored in a checkpoint if no mesh deformation is active and is therefore not available when restarting. My guess is that during restart ASPECT tries to read this vector, does not find it, and that is when the segfault happens (did you try this is in debug mode? maybe there is a better error message there). Now it may not be impossible to fix this so that ASPECT assumes the vector is simply 0 if none is present in the restart file, but it will likely require a closer look by one of us, some time for the implementation, and a lot of testing afterwards. Maybe a project for the hackathon?

What happens if you do include a mesh deformation plugin from the start, but use a 'function' before the restart that is set to 0, and switch to 'free surface' for the restart. Does that work?

elodie-kendall commented 3 years ago

Hi Rene,

Thanks a lot for your reply. In debug mode I get the following error in deal.II:

Screen Shot 2021-05-13 at 16 42 48

I tried with your suggestion of mesh deformation with a 0 boundary function and then switching to the free surface, then it doesn't like the change in pressure normalization: "The pressure normalization method that was stored in the checkpoint file is not the same as the one you currently set in your input file. These need to be the same during restarting from a checkpoint."

Yeah, I can come back to it at the hackathon. Thanks!