@@ -65,15 +65,17 @@ Usage: sinteractive [OPTIONS] [-- SBATCH_ARGS...]
6565Start an interactive tmux session on a compute node via Slurm.
6666
6767Options:
68- -n, --name NAME Tag the session with a name for easy reattach
69- (allowed: letters, digits, '.', '_', '-')
70- --node NODE Request a specific compute node (e.g., compute01)
71- --partition PART Slurm partition (default: interactive)
72- --time TIME Wall time limit (default: 1 day)
73- Supports shorthand: 8h, 30m, 2d, 1d12h, 1h30m
74- --attach TARGET Reattach to a running session by JOBID or NAME
75- --list List running sinteractive sessions (with NAME and CWD)
76- -h, --help Show this help message
68+ -n, --name NAME Tag the session with a name for easy reattach
69+ (allowed: letters, digits, '.', '_', '-')
70+ --node NODE Request a specific compute node (e.g., compute01)
71+ --partition PART Slurm partition (default: interactive)
72+ --time TIME Wall time limit (default: 1 day)
73+ Supports shorthand: 8h, 30m, 2d, 1d12h, 1h30m
74+ -j, --threads N Number of CPUs (alias for --cpus-per-task)
75+ -m SIZE Memory (alias for --mem, e.g., 16G)
76+ -a, --attach TARGET Reattach to a running session by JOBID or NAME
77+ -l, --list List running sinteractive sessions (with NAME and CWD)
78+ -h, --help Show this help message
7779
7880Note: -n is consumed by sinteractive as --name. Use --ntasks=N to set
7981sbatch ntasks instead of -n.
@@ -130,10 +132,10 @@ function main {
130132 -h | --help)
131133 usage
132134 ;;
133- --list)
135+ -l | - -list)
134136 list_sessions
135137 ;;
136- --attach)
138+ -a | - -attach)
137139 reattach_target=" $2 "
138140 shift 2
139141 ;;
@@ -177,6 +179,18 @@ function main {
177179 args+=(--partition=" ${1# --partition=} " )
178180 shift
179181 ;;
182+ -j | --threads)
183+ args+=(--cpus-per-task=" $2 " )
184+ shift 2
185+ ;;
186+ --threads=* )
187+ args+=(--cpus-per-task=" ${1# --threads=} " )
188+ shift
189+ ;;
190+ -m)
191+ args+=(--mem=" $2 " )
192+ shift 2
193+ ;;
180194 * )
181195 args+=(" $1 " )
182196 shift
0 commit comments