Skip to content

ci: after an sbatch that timed out, use the job it queued instead of submitting a copy - #2523

Merged
sbryngelson merged 1 commit into
MFlowCode:masterfrom
sbryngelson:sbatch-timeout-adopt
Nov 26, 2026
Merged

sbryngelson merged 1 commit into
MFlowCode:masterfrom
sbryngelson:sbatch-timeout-adopt

Conversation

@sbryngelson

Copy link
Copy Markdown
Member

A timed-out sbatch can still queue the job. retry_sbatch (.github/scripts/retry-sbatch.sh) took the timeout to mean nothing was submitted and submitted again. In #2516's Phoenix gpu-acc run, the first shard-1 submission (16191310) timed out yet ran, the retry (16191321) ran too, and the two copies deleted each other's tests/<UUID>/ inputs: 620 "simulation.inp is missing" / "MFC.sh: No such file" errors, 75 failed tests, and an orphaned GPU job. Shard 2, alone in its directory, passed 501/501.

Before each retry, retry_sbatch now looks for a pending or running job of ours with the script's -J name, from this directory, submitted since the first attempt, and uses it if there is one. SLURM_TIME_FORMAT=standard because Frontier sets relative, which prints only the time for today's jobs.

1. Does it solve the problem?

Command that shows it: cd toolchain && python3 -m pytest mfc/test_retry_sbatch.py

Case (sbatch stubbed: the first call times out) master this PR
the timed-out call queued a job submits a second copy uses the queued job, 1 sbatch call
it queued nothing resubmits resubmits
a same-name job from another directory, or from before the first attempt resubmits resubmits

Against the real squeue on Frontier (Slurm with relative time format) and Phoenix (26.05), the lookup finds a queued CI job by name and directory, and ignores it when the start time is later than its submit time.

2. Does it create another one?

Check Result
Tests ./mfc.sh precheck passes; the new tests and test_submit_requeue.py pass
Golden files changed 0
Not tested A real sbatch timeout (cannot be produced on demand)

3. Is it slower?

N/A: CI script only. The lookup runs only after a timed-out submission.

…submitting a copy

A timed-out sbatch can still queue the job. retry_sbatch then submitted it again, and on
Phoenix both copies of shard 1 ran in the same checkout and deleted each other's test inputs
(75 failures in MFlowCode#2516's gpu-acc run). Before retrying, look for a pending or running job of
ours with the same name, from this directory, submitted since the first attempt.
@sbryngelson
sbryngelson requested a review from a team as a code owner November 26, 2026 22:36
@sbryngelson
sbryngelson requested review from wilfonba and removed request for a team November 26, 2026 22:36
@github-actions

Copy link
Copy Markdown

Claude Code Review

Head SHA: 9e97132

No review was produced. Claude ran but wrote no review (Claude step: failure). Run and transcript: https://github.com/MFlowCode/MFC/actions/runs/45905921539

@sbryngelson
sbryngelson merged commit 75711c8 into MFlowCode:master Nov 26, 2026
22 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant