Execution#
PYSTILT supports three execution backends. All three share the same output project model — the same config, the same output layout, and the same CLI commands. The backend controls only how work gets dispatched to workers.
Backends#
Dispatch models#
- Push dispatch (
local,slurm) The coordinator enumerates pending simulation IDs and sends work directly to workers — either inline in the current process or by writing chunk files for a Slurm array.
- Pull dispatch (
kubernetes) Workers independently claim pending simulations from a shared output index backend. The coordinator registers work and returns; pods drain the queue autonomously.
Choosing a backend#
localDefault. Best for notebooks, workstation runs, and small receptor sets. Runs inline with
n_workers: 1or uses a local process pool. No infrastructure required.slurmBest for large receptor sets on HPC clusters with shared filesystems. Writes immutable chunk files and submits a Slurm array job whose tasks each call
stilt push-worker. Project and output roots must be local or shared-filesystem paths.kubernetesFor cloud-native or container-scale deployments backed by a PostgreSQL index and object-store outputs. Requires more infrastructure than the other two backends.
Note
The Kubernetes backend is not yet fully implemented. See Kubernetes for the current status.
CLI primitives#
These commands surface the executor model regardless of backend:
stilt runRegister pending simulations and launch workers using the configured executor. For
local, blocks until done. Forslurm, submits the array and returns (fire-and-forget); use--waitto block.stilt registerPublish project inputs and register simulations without launching any workers. Useful for separating the planning step from execution.
stilt push-workerExecute one immutable chunk of simulation IDs without queue polling or heartbeats. Used by Slurm task array elements.
stilt pull-workerClaim and execute pending simulations from the output index. Used by Kubernetes pods and long-lived local workers.
stilt serveLike
pull-worker --follow: keeps polling indefinitely for new claimable work. Use for always-on queue consumers.
Simulation state and delivery guarantees#
These semantics apply across all backends.
Area |
Current behavior |
|---|---|
Delivery guarantee |
At-least-once processing. A simulation can be retried after interruption or failure. |
Trajectory status |
|
Footprint status |
|
Empty footprint |
Treated as terminal success ( |
Reruns |
|