Where To Run#
The same project can run on your computer, on an HPC cluster, or in the
cloud (experimental). Only the execution section of config.yaml
changes. Your receptors, meteorology, footprints, and outputs stay the same.
Backend |
Use it when |
Setup |
|---|---|---|
You’re working in a notebook or script, or have up to a few hundred simulations. This is the default. |
Nothing |
|
You have thousands of simulations and access to an HPC cluster that uses Slurm. |
An |
|
You’re running in the cloud. Experimental. |
A container image, a PostgreSQL database, and a cloud bucket |
Commands you’ll use#
stilt init <project>Create a project folder with a starter
config.yamlandreceptors.csv.stilt run <project>Run every simulation that isn’t finished yet. On your computer it returns when they are all done. On Slurm it submits a job array and returns right away. Add
--waitto wait for the job.model.run()does the same from Python.stilt status <project>Count finished and remaining simulations.
Options for stilt run:
--backendand--n-workersoverrideconfig.yamlfor this run.--no-skipreruns every simulation, finished or not.--compute-root DIRruns HYSPLIT inDIRand copies the outputs into the project afterward.
Commands PYSTILT runs for you#
You won’t usually type these. stilt run launches them on each Slurm task
or cloud worker, and they are listed here so you recognize them in job
scripts and logs.
stilt push-workerRuns every variant of each receptor in one list. Each Slurm array task runs one list.
stilt pull-workerTakes receptors one at a time from a shared PostgreSQL queue until the queue is empty. With
--followit keeps waiting for new work.stilt serveThe same as
stilt pull-worker --follow.stilt registerSaves the project’s settings and receptors without running anything. If a queue is set up, it also adds the receptors to the queue.
stilt rm --variant NAMEDeletes a variant’s outputs so it runs again from scratch. Repeat
--variantto delete several (Configuration).
When a simulation fails#
A failed simulation doesn’t stop the others. The error goes to the end of
that simulation’s stilt.log. The simulation stays unfinished, so the next
stilt run tries it again. Fix the cause (often missing meteorology) and
run again. Finished simulations are skipped.
In Python, sim.outcome gives a short failure reason and sim.log the
full log.
A footprint can be empty because no particle reached the grid. That is not a
failure. PYSTILT writes a .empty file in its place, and the simulation
counts as finished (see Load And Plot Results).