Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Restarting SeBa has certain particles cause a crash #1166

Copy link
Copy link
@ErwanH29

Description

@ErwanH29
Issue body actions

Describe the bug
When restarting a simulation whose particles are evolved up to a certain age, if they are either classified as 'Hertzsprung gap' (stellar type 2) or 'first giant branch' (stellar type 3) particles, the code crashes.

To Reproduce
With the attached particle set (
seba_crasher.zip), one can run this script to reproduce the error:

import numpy as np
from amuse.lab import read_set_from_file, units
from amuse.community.seba.interface import SeBa

particles = read_set_from_file("seba_crasher.amuse")
particles.relative_mass = particles.mass # To allow checkpoint in SeBa
particles.relative_age = 100 | units.Myr # For example, set the age to 100 Myr

working_set = particles[particles.stellar_type == 1 | units.stellar_type]
failing_set = particles[particles.stellar_type < 6 | units.stellar_type]
for pset in [working_set, failing_set]:
print(f"Stellar types: {np.unique(pset.stellar_type, return_counts=True)}...")
code = SeBa()
code.particles.add_particles(pset)
code.evolve_model(1 | units.Myr)
code.stop()
print("Evolved particles successfully !")

Expected behavior
The first loop will succeed, giving back the print statement successfully. However, in the second the code will fail.

Logs
Error message returns:

"amuse.support.exceptions.CodeException: Exception when calling function 'evolve_system', of code 'SeBaInterface', exception was 'Error in code: no error message - code probably died, sorry.'"

Environment (please complete the following information):

  • OS and version: Ubuntu 20.04.5 LTS
  • Compiler: gcc (conda-forge gcc 11.4.0-13) 11.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Bug
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.