Configure Resources and Resume Work

Use this guide to choose allocation limits and recover unfinished work. For a small worked comparison, complete Compare Execution and Restart. Exact fields are listed in User Parameters.

The runtime uses one bounded segment supervisor. Metadata grouping can reduce repeated frame-file staging; it does not cache decoded inputs or change science. The CPU and CUDA processors own lag parallelism inside a scientific segment.

Configuration

execution controls grouping and allocation resources; execution_profile controls numerical processing within each segment (see Configure a native execution profile). The backend is selected independently through segment_processer.

job_per_worker: 8
execution:
  grouping: shared_frames
  memory_limit: 32GiB
  worker_memory: 8GiB
  headroom: 1GiB

These values illustrate syntax, not suitable reservations for every search. worker_memory includes the segment, frame reading, lag workers and scratch. grouping: adjacent is the default. Optional batch_size overrides job_per_worker; explicit setup --job-per-worker takes precedence. Both mean assigned segments per allocation, not simultaneous workers.

Execution settings

Setting

Default

Meaning

grouping

adjacent

Input-order grouping or metadata-only shared_frames grouping.

batch_size

null

Maximum assigned segments; null uses job_per_worker.

cores

Detected allocation

Optional allocation-wide logical CPU cap.

memory_limit

Detected availability

Allocation-wide host RAM ceiling.

worker_memory

null (automatic)

Share the usable allocation among segments, or specify a measured per-segment estimate.

headroom

512MiB

Unallocated safety margin.

message_limit

64MiB

Maximum single serialized message and writer buffer bound.

worker_shutdown_timeout

60 seconds

Deadline to exit after reporting completion; not a scientific runtime limit.

Sizes accept integer bytes or explicit SI/IEC units. Omitted CLI arguments preserve YAML. Generated jobs run one segment at a time with explicit CPU/RAM ceilings; CPU demand includes lag workers and their inner threads. CUDA jobs request one scheduler GPU and do not run simultaneous segments on that device. A manual batch-runner --n-workers request is capped by CPU/RAM admission. Slurm array concurrency is the number of allocations, not segment concurrency.

Current staged YAML/catalogs with known former profiles and built-in factory paths are read narrowly as grouping settings. Retired raw-cache settings are validated and discarded; new records omit them. Custom factory paths and conflicting canonical values fail explicitly. See the migration notes for changed runtime organization.

Grouping and durable output

Setup persists exact groups in self-contained catalog fragments. --batch-id selects stored membership on shared filesystems and transferred execute nodes. A missing fragment is an error; setup rejects changed membership or scientific job definitions over existing fragments. Per-group transfer paths are deduplicated.

The supervisor holds exclusive segment/fragment ownership through shutdown. Its writer acknowledges progress only after prior trigger products are durable. Worker, output and shutdown failures propagate; a scheduler retry uses committed progress. n_retries consistently means additional attempts: zero runs once. Resource and outcome metrics appear in the execution log and are returned by the Python runner. No separate execution JSON files are written.

Resume an unchanged run

For a local run, keep the original YAML and work directory and allow reuse of the existing output directory:

pycwb progress --work-dir RUN_DIRECTORY --verbose
pycwb run user_parameters.yaml --work-dir RUN_DIRECTORY --force-overwrite
pycwb progress --work-dir RUN_DIRECTORY --verbose

The segment runner skips committed jobs/lags and retains their products. --force-overwrite passes the existing-output-directory check; it does not bypass YAML or execution-profile consistency checks and is not a general recovery command for every processor. Use a new directory for changed inputs or scientific settings. For batch runs, retain the original job membership and select unfinished work within those prepared fragments.

After completion, follow Collect and preserve results for merging and preserving the result set.

Memory and performance

Memory reservations and sampled monitoring are not a hard OS memory limit. Scientific peaks can exceed estimates between samples. The runtime can stop workers under memory pressure; use scheduler/cgroup enforcement for a hard ceiling. This layer budgets host RAM, not GPU VRAM.

On cgroup-v2 hosts, availability includes a conservative estimate of reclaimable inactive file cache. Dirty, writeback, mapped and shared-memory pages are excluded from that estimate; unavailable statistics fall back to counting all usage. Every visible parent limit and host availability still constrain the budget. The estimate does not guarantee that the kernel can immediately reclaim pages. Memory failures distinguish process usage exceeding the execution safety ceiling from estimated availability falling below execution.headroom.

For GPU or processor comparisons, use Scientific backends and execution support. Match the scientific workload and supported injection/output settings. Paired stage validation repeats work, so disable it when measuring speed; keep the numerical comparison and the performance measurement as separate results.

Worker startup and decoding overhead can make small jobs slower. Measure end-to-end runtime on a representative workload when choosing worker counts.

Implementation reference

See pycwb.workflow.execution package for the Python API. The package contains metadata grouping (planner.py), process supervision (executor.py), resource accounting (resources.py), durable transport (writer.py) and persisted membership (scheduling.py). Configuration is owned by pycwb.types.execution.

See execution details and verification notes.