Skip to content

WIP: Toil times - #1958

Open
glennhickey wants to merge 2 commits into
masterfrom
prepare
Open

WIP: Toil times#1958
glennhickey wants to merge 2 commits into
masterfrom
prepare

Conversation

@glennhickey

Copy link
Copy Markdown
Collaborator

start trying to have cactus assign times to toil jobs, with the hopes of getting small jobs onto faster partitions.

todo:

  • can't merge until we pin to an actual toil release
  • do some testing on slurm
  • most jobs currently handled are the really obvious ones, but there are surely a few others that could be included.

glennhickey and others added 2 commits July 23, 2026 11:53
cactus-panpatch's main() was missing the standard per-tool boilerplate
that every other cactus entry point runs after parsing options:

- cactus_override_toil_options(options): sets toil defaults (retryCount,
  realtime logging, default memory) and exports CACTUS_MAX_MEMORY /
  CACTUS_DEFAULT_MEMORY. panpatch calls cactus_clamp_memory(), which reads
  those env vars, so without this it would KeyError.
- setupBinaries(options): configures binariesMode/docker so cactus_call
  works as requested (panpatch runs vg, bgzip, etc. via cactus_call).
- set_logging_from_options(options) and enableDumpStack(): consistent
  logging setup and debug stack dumps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t Slurm partition

Newer Toil exposes a per-job `walltime` requirement that its Slurm backend uses to
pick a partition (and set --time). This gives Cactus's many small "coordination"
jobs a short walltime so Slurm routes them to a fast/short partition, while
everything else falls back to Toil's --defaultWalltime.

Machinery (src/cactus/shared/common.py):
- cactus_fast_walltime(): reads CACTUS_FAST_WALLTIME (mirrors cactus_clamp_memory).
- add_cactus_toil_options(): adds --fastWalltime (default 1800 = 30 min, very
  conservative for these jobs; 0 disables).
- cactus_override_toil_options() exports CACTUS_FAST_WALLTIME so it reaches workers.
- RoundedJob / ChildTreeJob now forward walltime to Toil.

Application:
- Wired add_cactus_toil_options(parser) into every tool's main().
- Tagged the small coordination jobs' scheduling call sites with
  walltime=cactus_fast_walltime() (the FAST set plus a hand-picked subset of the
  ambiguous ones; compute-heavy jobs left on --defaultWalltime).

Docs (doc/progressive.md, doc/pangenome.md): recommend --defaultWalltime (+ the
new --fastWalltime) instead of --slurmTime, which is now framed as a global override.

IMPORTANT: toil-requirement.txt is temporarily pinned to Toil master because
per-job walltime is not in a Toil release yet. Revert to a released toil[aws]==<ver>
before merging.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant