Skip to content

# feat: soft run control via code_saturne control_file #12

Description

@florian-simvia

Problem

To adjust a running case today, the only option is a hard kill + restart from
checkpoint — brutal, and it discards in-flight work. code_saturne already exposes a
lightweight steering mechanism (control_file, dropped in the run dir and polled by the
solver each time step) that csauto doesn't surface.

Proposal

Surface control_file in the CLI and the dashboard instead of killing:

  • Graceful stop — set the last time step to the current one (clean stop + checkpoint).
  • Extend — raise max_time_step by N without restarting.
  • Checkpoint now — request a checkpoint at the next step.
  • Flush logs.
csauto control RUNS case0007 --stop          # graceful stop
csauto control RUNS case0007 --extend 500     # +500 time steps
csauto control RUNS case0007 --checkpoint

Notes

  • "Extend" is the high-value one: it avoids the kill + restart-from-checkpoint round-trip.
  • Exact directive syntax follows the installed code_saturne version — read from docs, don't
    hardcode; write the control_file into the active RESU/<run> dir.
  • Dashboard: add "Stop gracefully" + "Extend" actions alongside the existing hard "Kill"
    (which stays as a fallback). Log each action to .csauto.history.jsonl.

Acceptance criteria

  • control --stop produces a clean stop + checkpoint (no orphaned process).
  • control --extend N continues a running case without restart.
  • control --checkpoint triggers a checkpoint at the next step.
  • Actions surfaced in the dashboard and logged to history.
  • Docs + tests (control_file written correctly and picked up by the solver).

Metadata

Metadata

Labels

enhancementNew feature or request

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions