Commit a8c0311b authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Backport a fix from the COLIBRE repo to solve a segfault in the cleaning...

Backport a fix from the COLIBRE repo to solve a segfault in the cleaning routines when ending a run that restarted from check-point files.
parent ab352b59
......@@ -1463,8 +1463,8 @@ int main(int argc, char *argv[]) {
if (with_verbose_timers) timers_close_file();
if (with_cosmology) cosmology_clean(e.cosmology);
if (with_self_gravity) pm_mesh_clean(e.mesh);
if (with_cooling || with_temperature) cooling_clean(&cooling_func);
if (with_feedback) feedback_clean(&feedback_properties);
if (with_cooling || with_temperature) cooling_clean(e.cooling_func);
if (with_feedback) feedback_clean(e.feedback_props);
engine_clean(&e, /*fof=*/0);
free(params);
......
......@@ -3420,7 +3420,7 @@ void engine_init(struct engine *e, struct space *s, struct swift_params *params,
const struct entropy_floor_properties *entropy_floor,
struct gravity_props *gravity, const struct stars_props *stars,
const struct black_holes_props *black_holes,
const struct feedback_props *feedback, struct pm_mesh *mesh,
struct feedback_props *feedback, struct pm_mesh *mesh,
const struct external_potential *potential,
struct cooling_function_data *cooling_func,
const struct star_formation *starform,
......
......@@ -440,7 +440,7 @@ struct engine {
const struct star_formation *star_formation;
/* Properties of the sellar feedback model */
const struct feedback_props *feedback_props;
struct feedback_props *feedback_props;
/* Properties of the chemistry model */
const struct chemistry_global_data *chemistry;
......@@ -513,7 +513,7 @@ void engine_init(struct engine *e, struct space *s, struct swift_params *params,
const struct entropy_floor_properties *entropy_floor,
struct gravity_props *gravity, const struct stars_props *stars,
const struct black_holes_props *black_holes,
const struct feedback_props *feedback, struct pm_mesh *mesh,
struct feedback_props *feedback, struct pm_mesh *mesh,
const struct external_potential *potential,
struct cooling_function_data *cooling_func,
const struct star_formation *starform,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment