You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: implement attempt-based resource scaling (RAM/walltime doubling on retry) #127
The pipeline currently sets --restart-times 2 in the aspen CLI, so Snakemake retries failed jobs up to twice. However, resources are read from the static cluster.json and do not scale with attempt number — each retry runs with identical RAM and walltime, so jobs that fail due to resource exhaustion will fail again.
Desired behavior
On the first retry (attempt 2), automatically double walltime (and optionally RAM). On the second retry (attempt 3), double again. This is directly supported by Snakemake via attempt-aware resource lambdas:
# in a rule:resources:
mem_mb=lambdawildcards, attempt: attempt*48_000,
runtime=lambdawildcards, attempt: attempt*960# 16 h × attempt
What needs to change
Add resources: blocks to all resource-intensive rules (trim, align, remove_BL, atac_tss, etc.) using attempt-based lambdas.
Update the SLURM cluster-submission command in aspen to read from {resources.mem_mb} and {resources.runtime} instead of cluster.json.
cluster.json can then be retired or kept only for defaults/fallbacks.
The same attempt-based scaling should apply to lscratch (SLURM GRES), not just RAM and walltime. Issue #113 reports that remove_BL runs out of scratch space; static cluster.json has no way to escalate on retry.
Proposed approach — add a disk_gb resource to affected rules:
# e.g. in remove_BL rule:resources:
mem_mb=lambdawildcards, attempt: attempt*120_000,
runtime=lambdawildcards, attempt: attempt*720, # 12 h × attemptdisk_gb=lambdawildcards, attempt: attempt*256# 256 GB × attempt
Then in the cluster submit command, pass --gres=lscratch:{resources.disk_gb} instead of the hardcoded value from cluster.json.
This means the scope of this issue covers all three resource axes:
Activity
kopardev commentedon Aug 21, 2026
Also: extend to lscratch (addresses #113)
The same attempt-based scaling should apply to
lscratch(SLURM GRES), not just RAM and walltime. Issue #113 reports thatremove_BLruns out of scratch space; staticcluster.jsonhas no way to escalate on retry.Proposed approach — add a
disk_gbresource to affected rules:Then in the cluster submit command, pass
--gres=lscratch:{resources.disk_gb}instead of the hardcoded value fromcluster.json.This means the scope of this issue covers all three resource axes:
mem_mb)runtime)disk_gb→lscratch)Related: #113 (lscratch for
remove_BL)⚡ Generated using AI ⚡
fix(aspen): attempt-aware resource scaling and dry-run handling