Skip to content
Snippets Groups Projects

WIP: Add a small drift before dumping a restart file to avoid problems of coordination

Closed Matthieu Schaller requested to merge snapshot_stop_coordination into master
1 unresolved thread

Does what it says on the tin. This prevents a crash (with checks on) or an inconsistency when a snapshot is written during the same step as the code dumps restart files.

Fixes #624 (closed).

Edited by Matthieu Schaller

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
2995 2998 restart_remove_previous(e->restart_file);
2996 2999
2997 3000 /* Drift all particles first (may have just been done). */
2998 if (!drifted_all) engine_drift_all(e, /*drift_mpole=*/1);
3001 if (!drifted_all) {
  • This doesn't make sense, given what follows must be done when e->ti_last_io != e->ti_current. Looking at all the uses of drifted_all it looks like we always set it to 0, so let's remove it.

  • Please register or sign in to reply
  • Matthieu Schaller marked as a Work In Progress

    marked as a Work In Progress

  • "WIPed" as there might be a cleaner solution: check for restarts before any physics dumps. We would, however, need to make sure the snapshot is not written a second time if we were to restart from these exact set of check-point files.

  • Please register or sign in to reply
    Loading