Skip to content

Commit 2bd2556

Browse files
Add interactive partition with sinteractive defaults
Configure new interactive partition (compute03-04, 06-07) with 8-hour default / 1-day max wall time and 3-job-per-user QOS limit. Update sinteractive to default to the interactive partition with 2 CPUs and 8G memory. Document partition setup in admin guide. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 59a3d54 commit 2bd2556

4 files changed

Lines changed: 68 additions & 8 deletions

File tree

docs/admin.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,44 @@ scontrol update NodeName=ALL State=RESUME
4949
```
5050

5151
The reservation approach is preferred because it gives users visibility and lets the scheduler handle everything automatically.
52+
53+
## Interactive partition
54+
55+
The `interactive` partition provides a dedicated queue for interactive work with shorter time limits and a per-user job cap to prevent monopolization.
56+
57+
### slurm.conf
58+
59+
Add the following line to `/etc/slurm/slurm.conf`:
60+
61+
```conf
62+
PartitionName=interactive Nodes=compute[03-04],compute[06-07] Default=NO MaxTime=1-00:00:00 DefaultTime=08:00:00 State=UP AllowQOS=interactive QOS=interactive
63+
```
64+
65+
| Parameter | Value | Purpose |
66+
|---|---|---|
67+
| `Nodes` | `compute[03-04],compute[06-07]` | Shared with `normal` partition |
68+
| `Default` | `NO` | Users must request this partition explicitly |
69+
| `MaxTime` | `1-00:00:00` | 1-day maximum wall time |
70+
| `DefaultTime` | `08:00:00` | 8-hour default (matches `sinteractive` default) |
71+
| `AllowQOS` | `interactive` | Only the `interactive` QOS can submit here |
72+
| `QOS` | `interactive` | All jobs use this QOS automatically |
73+
74+
### Per-user job limit (QOS)
75+
76+
`MaxJobsPerUser` is not a valid `slurm.conf` partition parameter — enforce it via a QOS instead:
77+
78+
```bash
79+
# Create the QOS with a 3-job-per-user limit
80+
sacctmgr add qos interactive set MaxJobsPerUser=3
81+
82+
# Allow all accounts to use it
83+
sacctmgr modify account where account=root withsubaccounts set qos+=interactive
84+
```
85+
86+
### Apply and verify
87+
88+
```bash
89+
scontrol reconfigure
90+
scontrol show partition interactive
91+
sacctmgr show qos interactive format=Name,MaxJobsPerUser
92+
```

docs/pain-points.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ squeue -j $SLURM_JOB_ID -h -o "%L"
219219
| Partition | Max wall time | Default wall time | Nodes | Access | Notes |
220220
|---|---|---|---|---|---|
221221
| `normal` | 3 days | not set | compute01–04, 06–07, 14 | All accounts | Default partition |
222+
| `interactive` | 1 day | 8 hours | compute03–04, 06–07 | All accounts | Max 3 jobs/user |
222223
| `rna` | 3 days | not set | compute07–09, 15–20 | `rbi` | Falls back to `normal` |
223224
| `jones` | 3 days | not set | compute04–05, 10–12 | `jones` | |
224225
| `genome` | 3 days | not set | compute06–09 | `genome` | Falls back to `normal` |

docs/sinteractive.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ sinteractive [OPTIONS] [SBATCH_ARGS...]
3939
| Option | Description | Default |
4040
|---|---|---|
4141
| `--node NODE` | Request a specific compute node | any available |
42-
| `--partition PART` | SLURM partition | `normal` |
42+
| `--partition PART` | SLURM partition | `interactive` |
4343
| `--time TIME` | Wall time limit | `08:00:00` |
44+
| `--cpus-per-task N` | Number of CPUs | `2` |
45+
| `--mem SIZE` | Memory | `8G` |
4446
| `--attach JOBID` | Reattach to a running session | |
4547
| `--list` | List running sinteractive sessions | |
4648
| `-h`, `--help` | Show help message | |
@@ -50,7 +52,7 @@ All other arguments are passed directly to `sbatch`, so you can use any `sbatch`
5052
### Examples
5153

5254
```bash
53-
# Default: 8-hour session on the normal partition
55+
# Default: 8-hour session, 2 CPUs, 8G memory
5456
sinteractive
5557

5658
# Run on a specific node
@@ -59,11 +61,14 @@ sinteractive --node compute01
5961
# 2-hour session on the rna partition
6062
sinteractive --time=2:00:00 --partition=rna
6163

62-
# Request extra memory and CPUs
64+
# Override default memory and CPUs
6365
sinteractive --mem=16G --cpus-per-task=4
6466

6567
# GPU session
6668
sinteractive --partition=gpu --gpus=1 --mem=16G
69+
70+
# Longer session on the normal partition (up to 3 days)
71+
sinteractive --time=1-12:00:00 --partition=normal
6772
```
6873

6974
## How it works
@@ -124,4 +129,7 @@ scancel <JOBID>
124129
```
125130

126131
!!! warning "Wall time"
127-
The default wall time is **8 hours**. If you need more, pass `--time` explicitly. The `normal` partition allows up to 7 days.
132+
The default wall time is **8 hours** on the `interactive` partition, with a maximum of **1 day**. For longer sessions, switch to the `normal` partition (up to 3 days): `sinteractive --partition=normal --time=2-00:00:00`.
133+
134+
!!! info "Job limit"
135+
The `interactive` partition limits each user to **3 concurrent jobs**. If you need more simultaneous sessions, use the `normal` partition.

scripts/sinteractive

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Start an interactive tmux session on a compute node via Slurm.
6666
6767
Options:
6868
--node NODE Request a specific compute node (e.g., compute01)
69-
--partition PART Slurm partition (default: normal)
69+
--partition PART Slurm partition (default: interactive)
7070
--time TIME Wall time limit (default: 08:00:00)
7171
Supports shorthand: 8h, 30m, 2d, 1d12h, 1h30m
7272
--attach JOBID Reattach to a running sinteractive session
@@ -75,7 +75,7 @@ Options:
7575
7676
All other options are passed directly to sbatch. Examples:
7777
78-
sinteractive # 8h session, default resources
78+
sinteractive # 8h session, 2 CPUs, 8G memory
7979
sinteractive --node compute01 # run on a specific node
8080
sinteractive --time=2h -p rna # 2h session on rna partition
8181
sinteractive --mem=16G --cpus-per-task=4
@@ -173,9 +173,19 @@ function main {
173173
set -- --time=08:00:00 "$@"
174174
fi
175175

176-
# Default to normal partition if no --partition/-p specified
176+
# Default to interactive partition if no --partition/-p specified
177177
if ! printf '%s\n' "$@" | grep -qE '^(--partition|-p)'; then
178-
set -- --partition=normal "$@"
178+
set -- --partition=interactive "$@"
179+
fi
180+
181+
# Default to 2 CPUs if no --cpus-per-task/-c specified
182+
if ! printf '%s\n' "$@" | grep -qE '^(--cpus-per-task|-c)'; then
183+
set -- --cpus-per-task=2 "$@"
184+
fi
185+
186+
# Default to 8G memory if no --mem specified
187+
if ! printf '%s\n' "$@" | grep -qE '^--mem'; then
188+
set -- --mem=8G "$@"
179189
fi
180190

181191
# Send warning signal 10 minutes before time limit

0 commit comments

Comments
 (0)