Standalone
Requirements¶
To install and run Sirocco in standalone mode, you will need an HPC system
- using the SLURM scheduler, for now the only supported one
- with Python
>=3.12installed
Install¶
Sirocco is a pure Python package available on PyPI. Directly install it on the HPC system (no root access required) from pypi.org or from a fresh clone for development. Using uv is highly recommended.
The virtual environment in which sirocco is installed can later be specified in the workflow configuration.
Sirocco is run through a command line interface. Check your installation with
CLI¶
Once the workflow configuration is created on the HPC, it can be handled by the sirocco CLI. sirocco sub-commands can be classified in 2 groups: checking and controlling. All of them take the configuration directory as the only positional argument defaulting to the current directory and have a --help option.
Checking¶
Sirocco provides a few commands to help users check the workflow configuration.
verify¶
Try to load the configuration. This is helpful to catch validation issues.
represent¶
Unroll the workflow graph and print it as a string formatted à la yaml. It is mainly used as a serialization method for testing but can also help debugging.
visualize¶
Generate a visual representation of the workflow graph as an svg file. By default, it is written in the configuration directory and named after it: <configuration directory name>.svg. Use --output (-o) to choose another path. An example is displayed in the cycles section. It is pretty useful to confirm that the workflow graph corresponds to the intended nodes relationship.
long graph representation
The graph representation is produced via the graphviz library with the dot layout engine. Trying to display the entire graph for long production workflows can lead to very long processing or even non converging algorithm for nodes and edges placement. It is advised to reduce the workflow duration for visualization.
stviz¶
Generate a graphical representation similar to visualize focusing on the task front and dump it to state.svg in the current working directory. Use --output (-o) to choose another path. Only cycles containing tasks from the front are represented. Rank \(0\) tasks (running or queued) and involved input/output data are displayed in bold. Other front tasks (\(r \geq 1\)) and involved input/output data are unchanged compared to visualize. Other tasks and data nodes are grayed out. Task ranks are also added to the tooltip (hover on the task nodes to see).
Controlling¶
Sirocco has the 3 following self-explanatory commands to control the workflow. Each of them, as well as the continuation tasks, logs information to sirocco.log (see below) located in the configuration directory. By default Sirocco uses ANSI escape codes for coloring, which can be disabled with --no-ansi as a global option coming before the actual command like sirocco --no-ansi <command> <args>.
start¶
Start the workflow. Use --cleanup to force a fresh start from an existing workflow and wipe the run directory.
stop¶
Stop the workflow, which means cancel all front tasks. Use --cool-down to let currently running tasks gracefully terminate and only cancel others.
Manual task cancellation
Do not cancel tasks manually, especially the Sirocco continuation one, this would break the workflow state.
restart¶
Restart a stopped workflow, even if it was stopped in cool-down mode. Rank \(0\) tasks will be picked up if not already completed.
Example run¶
The workflow log and folder hierarchy below were produced by running the configuration example with the default front depth of 2. The workflow was started, stopped in cool-down mode, restarted and then left to run to completion. See Workflow folder hierarchy for how the run directories are organized.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:37:04 ├─────────────────────────
╰─────────────────────╯
⮞ Starting workflow at /scratch/user/example_config ...
[INFO] ● pre proc__date_2026-01-01T00-00-00 (1039615) SUBMITTED to rank 0
[INFO] ● pre proc__date_2026-03-01T00-00-00 (1039616) SUBMITTED to rank 0
[INFO] ● model__date_2026-01-01T00-00-00 (1039617) SUBMITTED to rank 1
✔ Workflow started successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:37:32 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● pre proc__date_2026-03-01T00-00-00 (1039616) COMPLETED
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:37:41 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● pre proc__date_2026-01-01T00-00-00 (1039615) COMPLETED
[INFO] ● model__date_2026-01-01T00-00-00 (1039617) PROMOTED from rank 1 to 0
[INFO] ● pre proc__date_2026-05-01T00-00-00 (1039620) SUBMITTED to rank 1
[INFO] ● model__date_2026-03-01T00-00-00 (1039621) SUBMITTED to rank 1
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:38:54 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● model__date_2026-01-01T00-00-00 (1039617) COMPLETED
[INFO] ● pre proc__date_2026-05-01T00-00-00 (1039620) PROMOTED from rank 1 to 0
[INFO] ● model__date_2026-03-01T00-00-00 (1039621) PROMOTED from rank 1 to 0
[INFO] ● model__date_2026-05-01T00-00-00 (1039623) SUBMITTED to rank 1
[INFO] ● pre proc__date_2026-07-01T00-00-00 (1039624) SUBMITTED to rank 1
[INFO] ● post proc__date_2026-01-01T00-00-00 (1039625) SUBMITTED to rank 1
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:39:19 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● pre proc__date_2026-05-01T00-00-00 (1039620) COMPLETED
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:39:34 ├─────────────────────────
╰─────────────────────╯
⮞ Stopping workflow at /scratch/user/example_config in cool down mode ...
[INFO] ● model__date_2026-03-01T00-00-00 (1039621) COOLING DOWN
[INFO] ● model__date_2026-05-01T00-00-00 (1039623) CANCELED
[INFO] ● pre proc__date_2026-07-01T00-00-00 (1039624) CANCELED
[INFO] ● post proc__date_2026-01-01T00-00-00 (1039625) CANCELED
✔ Workflow stopped successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:40:24 ├─────────────────────────
╰─────────────────────╯
⮞ Restarting workflow at /scratch/user/example_config ...
[INFO] ● model__date_2026-03-01T00-00-00 (1039621) CONTINUED as rank 0 from cool-down
[INFO] ● model__date_2026-05-01T00-00-00 (1039628) SUBMITTED to rank 1
[INFO] ● pre proc__date_2026-07-01T00-00-00 (1039629) SUBMITTED to rank 1
[INFO] ● post proc__date_2026-01-01T00-00-00 (1039630) SUBMITTED to rank 1
[INFO] ● model__date_2026-03-01T00-00-00 (1039621) COMPLETED
[INFO] ● model__date_2026-05-01T00-00-00 (1039628) PROMOTED from rank 1 to 0
[INFO] ● pre proc__date_2026-07-01T00-00-00 (1039629) PROMOTED from rank 1 to 0
[INFO] ● post proc__date_2026-01-01T00-00-00 (1039630) PROMOTED from rank 1 to 0
[INFO] ● model__date_2026-07-01T00-00-00 (1039631) SUBMITTED to rank 1
[INFO] ● clean up__date_2026-01-01T00-00-00 (1039632) SUBMITTED to rank 1
✔ Workflow restarted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:40:55 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● pre proc__date_2026-07-01T00-00-00 (1039629) COMPLETED
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:41:03 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● post proc__date_2026-01-01T00-00-00 (1039630) COMPLETED
[INFO] ● clean up__date_2026-01-01T00-00-00 (1039632) PROMOTED from rank 1 to 0
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:41:11 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● clean up__date_2026-01-01T00-00-00 (1039632) COMPLETED
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:41:37 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● model__date_2026-05-01T00-00-00 (1039628) COMPLETED
[INFO] ● model__date_2026-07-01T00-00-00 (1039631) PROMOTED from rank 1 to 0
[INFO] ● post proc__date_2026-05-01T00-00-00 (1039637) SUBMITTED to rank 1
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:42:56 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● model__date_2026-07-01T00-00-00 (1039631) COMPLETED
[INFO] ● post proc__date_2026-05-01T00-00-00 (1039637) PROMOTED from rank 1 to 0
[INFO] ● clean up__date_2026-05-01T00-00-00 (1039639) SUBMITTED to rank 1
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:43:29 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● post proc__date_2026-05-01T00-00-00 (1039637) COMPLETED
[INFO] ● clean up__date_2026-05-01T00-00-00 (1039639) PROMOTED from rank 1 to 0
✔ Workflow continuation submitted successfully.
╭─────────────────────╮
─────────────────────────┤ 2026-11-18 21:43:46 ├─────────────────────────
╰─────────────────────╯
⮞ Continue workflow ...
[INFO] ● clean up__date_2026-05-01T00-00-00 (1039639) COMPLETED
✔ Workflow completed!
Workflow log.
example_config
├── run
│ ├── clean up__date_2026-01-01T00-00-00
│ │ ├── cleanup.py
│ │ ├── run_script.1039632.o
│ │ └── run_script.sh
│ ├── clean up__date_2026-05-01T00-00-00
│ │ ├── cleanup.py
│ │ ├── run_script.1039639.o
│ │ └── run_script.sh
│ ├── model__date_2026-01-01T00-00-00
│ │ ├── restart
│ │ ├── stream_1
│ │ ├── stream_2
│ │ ├── model.py
│ │ ├── run_script.1039617.o
│ │ └── run_script.sh
│ ├── model__date_2026-03-01T00-00-00
│ │ ├── restart
│ │ ├── stream_1
│ │ ├── stream_2
│ │ ├── model.py
│ │ ├── run_script.1039621.o
│ │ └── run_script.sh
│ ├── model__date_2026-05-01T00-00-00
│ │ ├── restart
│ │ ├── stream_1
│ │ ├── stream_2
│ │ ├── model.py
│ │ ├── run_script.1039628.o
│ │ └── run_script.sh
│ ├── model__date_2026-07-01T00-00-00
│ │ ├── restart
│ │ ├── stream_1
│ │ ├── stream_2
│ │ ├── model.py
│ │ ├── run_script.1039631.o
│ │ └── run_script.sh
│ ├── post proc__date_2026-01-01T00-00-00
│ │ ├── processed_output
│ │ ├── postproc.sh
│ │ ├── run_script.1039630.o
│ │ └── run_script.sh
│ ├── post proc__date_2026-05-01T00-00-00
│ │ ├── processed_output
│ │ ├── postproc.sh
│ │ ├── run_script.1039637.o
│ │ └── run_script.sh
│ ├── pre proc__date_2026-01-01T00-00-00
│ │ ├── processed_data
│ │ ├── preproc.sh
│ │ ├── run_script.1039615.o
│ │ └── run_script.sh
│ ├── pre proc__date_2026-03-01T00-00-00
│ │ ├── processed_data
│ │ ├── preproc.sh
│ │ ├── run_script.1039616.o
│ │ └── run_script.sh
│ ├── pre proc__date_2026-05-01T00-00-00
│ │ ├── processed_data
│ │ ├── preproc.sh
│ │ ├── run_script.1039620.o
│ │ └── run_script.sh
│ ├── pre proc__date_2026-07-01T00-00-00
│ │ ├── processed_data
│ │ ├── preproc.sh
│ │ ├── run_script.1039629.o
│ │ └── run_script.sh
│ └── state.yaml
├── scripts
│ ├── cleanup.py
│ ├── model.py
│ ├── postproc.sh
│ └── preproc.sh
├── .sirocco_continue.sh
├── sirocco.log
└── sirocco.yaml
Configuration directory after the workflow completed.
Troubleshooting¶
In the case of a failing task, the continuation task cancels all other tasks of the front and marks the workflow as failed. If needed, the workflow can later be restarted via sirocco restart.
Sirocco is also designed so that any workflow task can be re-submitted interactively, so not as part of the workflow, for testing or troubleshooting purposes.
Recovery
A workflow recovery mechanism will be implemented in a later version
Remote handling¶
Remote checking and controlling
Remote checking and controlling from users machines through either FirecREST or ssh will be implemented in a later version.