Repository navigation
fix(nextflow): every SLURM step grows memory and time on retry; cap memory at 244 GB - #436
Merged
Merged
Conversation
…emory at 244 GB Most steps asked for their init estimate verbatim on every retry, so an estimate that was too low failed every attempt the same way and aborted the run once retries ran out. The v9 debug run of 2026_08_11_A549_SEC61B_DENV lost its pyramid step that way: 16 GB, OOM-killed on all attempts. - run_flat_field, run_deskew, run_apply_inv_tf, run_virtual_stain, run_concatenate, run_segment and run_track now use retry_memory, which doubles after an OOM kill (137) and keeps the request after a preemption. - compute_transfer_function (30 min), run_virtual_stain_preprocess (1 h) and run_track (2 h) now use retry_time instead of a constant, so a wall-time kill doubles the next attempt. Track can retry only once and ultrack cannot resume, so a timeout with the same 2 h was certain to recur. - retry_memory caps a doubled request at 244 GB, the second node tier of the `preempted` partition (250000 MiB): 118 of its 122 nodes can take it, only cpu-c-[1-4] (120000 MiB) cannot, and sbatch never refuses it (exit 1, which terminates). A request already above the cap is kept, never lowered. tests/retry_resources.nf covers the cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Most steps requested their init estimate verbatim on every retry. A retry only gets more resources from
retry_memory/retry_timeinmodules/common.nf, and most processes did not use them. So an estimate that was too low failed every attempt the same way and aborted the run oncemaxRetriesran out.The v9 debug run of
2026_08_11_A549_SEC61B_DENVhit exactly this in its pyramid step: every attempt asked for 16 GB and was OOM-killed with 137.Before this PR:
What changes
retry_memory. It doubles memory after an OOM kill (exit 137) and keeps the request after a preemption.compute_transfer_function,run_virtual_stain_preprocessandrun_tracknow useretry_timeinstead of a constant, so a wall-time kill doubles the next attempt. This matters most for track: it retries only once and ultrack cannot resume, so a second timeout with the same 2 h was certain.retry_memorycaps a doubled request at 244 GB, the second node tier ofpreempted.preemptedproject.nfandpyramid.nfexist only on their feature branches and get the sameretry_memoryswitch there: #424 (a84a480) and #430 (f1966b2). #430 picks up the cap once it mergesmain.Testing
nextflow run nextflow/tests/retry_resources.nfpasses. It adds four cap cases: 128 GB doubles to 244 GB, a request at the cap stays at the cap, a 400 GB base is kept, and an OOM retry of a 400 GB request stays at 400 GB.🤖 Generated with Claude Code