MESAHub/mesa

predictive mixing segfault

Closed this issue · 1 comments

See the mailing-list thread: https://lists.mesastar.org/pipermail/mesa-users/2023-November/014916.html

An example (which crashes near timestep 19200, with a photo at timestep 19000 provided) can be downloaded here.
example_predictive_mixing_segfault.tar.gz

where a 10Msun r23.05.1 MESA model with the attached inlist segfaults at He core ignition (roughly when the convection appears in the core).

The inlist controls adopted were:
predictive_mix(1) = .true.
predictive_zone_type(1) = 'burn_He'
predictive_zone_loc(1) = 'shell'
predictive_bdy_loc(1) = 'any'
predictive_avoid_reversal(1) = 'he4'

                                  bad k for do1_mlt        3471        3470

File: ../private/predictive_mix.f90, Line: 822, Message: non-zero op_err
ERROR STOP 1

Error termination. Backtrace:
#0 0x13af52147
...
It seems predictive mixing is the source of this issue, in which the subroutine is trying to access a zone which does not exist. where nz = 3470, the routine is trying to access zone 3471, interior to the center cell.

This segfault can be avoided by turning predictive mixing off, or (hint?) setting 'make_gradr_sticky_in_solver_iters = .true.' Although, by reducing the mesh and time resolution of the model, I was also able to avoid this segfault.

I'm not familiar with nor do I use predictive mixing. Perhaps someone more familiar with it knows what is happening?

MESA version : r23.05.1, sdk version: mesasdk-aarch64-macos-23.7.2
computer: (arm) Macbook pro, M1 max, OS: Monterey 12.6

The best solution to this is probably to just prevent users from using TDC with predictive mixing or present a warning to users.