You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`partition`| string | No | SLURM partition to submit jobs to when `execution: slurm`. If omitted, the cluster default partition is used. |
33
+
|`slurm_header`| mapping | No | Arbitrary `#SBATCH` directives for `execution: slurm`, as `key: value` pairs using canonical `sbatch` long-option names (e.g. `partition`, `nodes`, `account`, `time`, `qos`, `mem-per-cpu`). `true` renders a bare flag (e.g. `exclusive: true` → `#SBATCH --exclusive`); `false`, `null`, or an empty string drops the entry. `cpus-per-task` is always derived from `ncores` and cannot be overridden. Unknown keys fail validation. |
34
+
|`slurm_prologue`| string | No | Shell commands (e.g. `module load ...`) run before the haddock3 execution line when `execution: slurm`. Do not include `cd <path>` or the `haddock3 ...` invocation — those are always generated automatically. When set, a version-check step is automatically added to the job script after the prologue to detect if it altered the haddock3 version in use. |
33
35
|`mol_suffixes`| array of strings | Yes | File suffixes used to identify molecule files. Must contain at least 2 suffixes (typically receptor and ligand). |
34
36
|`input_list`| string | Yes | Path to the input list file containing file paths for all targets. |
35
37
|`work_dir`| string | Yes | Directory where benchmark results will be stored. Created automatically if it doesn't exist. |
@@ -49,6 +51,29 @@ general:
49
51
work_dir: ./results
50
52
```
51
53
54
+
**SLURM example**, using `slurm_header` and `slurm_prologue`:
55
+
56
+
```yaml
57
+
general:
58
+
max_concurrent: 4
59
+
ncores: 96
60
+
execution: slurm
61
+
slurm_header:
62
+
partition: small
63
+
nodes: 1
64
+
account: project_XXXXXX
65
+
mem-per-cpu: 1500
66
+
time: "24:00:00"
67
+
qos: standard
68
+
exclusive: true
69
+
slurm_prologue: |
70
+
module load some-module
71
+
module load another-module
72
+
mol_suffixes: [_r_u, _l_u, _x_u]
73
+
input_list: docking/input_list.txt
74
+
work_dir: ./results
75
+
```
76
+
52
77
### Notes
53
78
54
79
- **Local execution**: When using `execution: local`, the total number of CPU cores required is `max_concurrent * ncores`. Ensure your system has enough cores.
@@ -339,6 +364,7 @@ When `execution: local`:
339
364
When `execution: slurm`:
340
365
341
366
- The `sbatch` and `sacct` commands must be available in the system PATH.
367
+
- **`slurm_header`**: Keys must be recognized `sbatch` long-option names; an unknown key fails validation. `cpus-per-task` is always derived from `ncores` and cannot be overridden.
Copy file name to clipboardExpand all lines: docs/src/usage.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,45 @@ scenarios:
104
104
105
105
See [Configuration Reference](./reference.md) for complete configuration options.
106
106
107
+
### Step 3.1: Using SLURM
108
+
109
+
Set `execution: slurm` in `general` to submit jobs via `sbatch` instead of running them locally. `sbatch` and `sacct` must be available in `PATH`.
110
+
111
+
> IMPORTANT: `haddock-runner` expects to be executed in the LOGIN node. It will take care of the SLURM submission itself. Do not submit a job with `haddock-runner` to the queue.
112
+
113
+
**Customizing the `#SBATCH` header**: use `slurm_header` to pass any `sbatch` long option as a YAML mapping:
114
+
115
+
```yaml
116
+
general:
117
+
execution: slurm
118
+
ncores: 96
119
+
slurm_header:
120
+
partition: small
121
+
nodes: 1
122
+
account: project_XXXXXX
123
+
mem-per-cpu: 1500
124
+
time: "24:00:00"
125
+
qos: standard
126
+
exclusive: true # renders as a bare `#SBATCH --exclusive` flag
127
+
```
128
+
129
+
- Keys must be recognized `sbatch` long-option names (e.g. `partition`, `nodes`, `account`, `time`, `qos`, `mem-per-cpu`); an unknown key fails validation.
130
+
-`cpus-per-task` is always derived from `ncores` and cannot be overridden here.
131
+
-`true` renders a bare flag (no value); `false`, `null`, or an empty string drops the entry and lets SLURM's own default apply.
132
+
- If `slurm_header` is omitted entirely, SLURM's cluster defaults are used — these vary by system.
133
+
134
+
**Running setup commands before the job**: use `slurm_prologue` for shell commands (e.g. loading environment modules) that must run before haddock3 executes:
135
+
136
+
```yaml
137
+
general:
138
+
slurm_prologue: |
139
+
module load some-module
140
+
module load another-module
141
+
```
142
+
143
+
- Do **not** add `cd <path>` or the `haddock3 ...` invocation yourself, those lines are always generated automatically and appended after your prologue.
144
+
- Because `slurm_prologue` can change the shell environment it might swap the version of `haddock3` you are using. There is an extra (automatic) check directly in the produced job script to double-check the version and avoid any surprises.
0 commit comments