stampede3-submit — Stampede3 sbatch script builder
Queue reference
| Queue |
Node |
Cores/node |
RAM/node |
Max nodes/job |
Max wall |
Max jobs/user |
SU/node-hr |
skx |
Skylake |
48 |
192 GB |
256 |
48 h |
40 |
1 |
skx-dev |
Skylake |
48 |
192 GB |
16 |
2 h |
2 |
1 |
icx |
Ice Lake |
80 |
256 GB |
32 |
48 h |
12 |
1.5 |
spr |
Sapphire Rapids |
112 |
128 GB HBM2e |
32 |
48 h |
24 |
2 |
nvdimm |
Ice Lake large-mem |
80 |
4 TB |
1 |
48 h |
2 |
4 |
h100 |
4× H100 SXM5 (96 GB/GPU) |
96 |
1 TB |
4 |
48 h |
2 |
4 |
pvc |
4× Max 1550 (124 GB/GPU) |
96 |
1 TB |
4 |
48 h |
2 |
3 |
Workflow
Gather requirements before writing anything. If the user hasn't said, ask (one short batch of questions):
- What's the workload? (which executable, MPI? OpenMP? GPU? serial?)
- How many nodes / ranks / threads / GPUs?
- Estimated wall time?
- Which allocation/project? (only if user has multiple — check
/usr/local/etc/taccinfo)
- Inputs/outputs path — should I
cd $SCRATCH/<jobdir> first?
Pick the partition with this decision flow, using the queue table above for cores/RAM/limits.
Step 2a — is this a test or a production run?
- Test / debugging / first time running the script →
skx-dev (2 h max, 16 nodes max). Always start here. Faster queue, same SKX hardware.
Step 2b — GPU or CPU?
- NVIDIA CUDA / PyTorch / TensorFlow / JAX →
h100 (4× H100 SXM5, 96 GB/GPU, NDR IB).
- Intel oneAPI / SYCL / DPC++ →
pvc (4× Max 1550, 124 GB/GPU).
- No GPU → continue to 2c.
Step 2c — does one rank need > 256 GB RAM?
- Yes →
nvdimm (single node, 4 TB, 80 cores). Note: only 3 nodes total in this queue and only 1 per job — be sure you actually need it.
- No → continue to 2d.
Step 2d — pick the CPU queue by workload character:
| Workload |
Recommended |
Reason |
| Memory-bandwidth bound (sparse linalg, stencil, FFT, CFD) |
spr |
HBM2e gives 3.5× per-core bandwidth vs SKX |
| Memory-capacity bound (RAM/core matters more than BW) |
icx |
256 GB / 80 cores = 3.2 GB/core (vs SPR's ~1.1) |
| Compute-bound, moderate memory, large job (>32 nodes) |
skx |
Only queue that scales past 32 nodes (up to 256) |
| Legacy / well-validated SKX binary |
skx |
No re-build risk, 1 SU/node-hr (cheapest) |
Tie-break rules:
- Need > 32 nodes?
skx is your only option for CPU.
- SU budget tight? Cheaper-first:
skx (1) < icx (1.5) < spr (2) < pvc (3) < h100 = nvdimm (4).
- Don't pick a queue just because it's "the newest" — match it to the workload's bottleneck.
SPR memory trap: SPR's 128 GB HBM2e is per node, not per core. With 112 cores, that's ~1.1 GB/core. A code that runs fine on SKX (4 GB/core) or ICX (3.2 GB/core) may OOM on SPR. Either reduce ranks/node or pick icx.
Compute -N/-n/threads before writing:
- Pure MPI:
-n = N × cores_per_node (SKX 48, ICX 80, SPR 112, H100/PVC 96).
- Pure OpenMP:
-N 1 -n 1 and set OMP_NUM_THREADS.
- Hybrid:
-n = N × ranks_per_node and OMP_NUM_THREADS = cores_per_node / ranks_per_node. Document the math in a one-line comment.
- GPU:
-n 1 per node is fine; one process per GPU is typical (so -n 4 for 4 GPUs).
Write the script to a file the user names (default job.slurm in CWD). Always include:
#!/bin/bash shebang
#SBATCH block in the order: -J -N -n [-ntasks-per-node] -t -p [-A] -o
module reset then explicit module load lines — never rely on the user's .bashrc
cd to the run directory explicitly (don't rely on submit CWD if files live elsewhere)
ibrun for MPI; bare executable for serial/OpenMP; ./prog with CUDA_VISIBLE_DEVICES/ZE_AFFINITY_MASK only if asked
Write the script and hand it off. Claude cannot submit jobs on Stampede3 from inside an idev session — sbatch is blocked from compute by Slurm policy, and ssh login* requires MFA. So the workflow is: write the file, tell the user where it is and what it'll cost, and stop.
Hand-off message template:
Wrote job.slurm. Submit from a login-node terminal with sbatch job.slurm. Estimated cost: N × T × rate SUs.
After the user submits and reports back with a JobID, Claude can take over again from inside idev:
squeue -j <jobid> for queue state
sacct -j <jobid> --format=... for accounting
- Reading
slurm-<jobid>.out once the job runs
- Hand off to the
stampede3-debug skill if it failed
These all work fine from compute — only sbatch is blocked.
Hard "don't" list
- Don't emit
--mem (unsupported on Stampede3).
- Don't emit
--export=... (breaks env propagation).
- Don't use
mpirun/mpiexec/srun to launch MPI — always ibrun.
- Don't use
lfs setstripe on $HOME or $SCRATCH (VAST, not Lustre). $WORK is Lustre.
- Don't request more nodes than the queue allows (see the queue table).
- Don't pick max wall time "to be safe" — shorter jobs schedule faster and the 15-min minimum still applies.
Templates
Serial / single-threaded
#!/bin/bash
#SBATCH -J serial
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 02:00:00
#SBATCH -p skx
#SBATCH -o slurm-%j.out
module reset
module load intel/24.0
cd $SCRATCH/myrun
./myprogram input.txt
Pure MPI (SPR example: 4 nodes × 112 ranks = 448)
#!/bin/bash
#SBATCH -J mpi-spr
#SBATCH -N 4
#SBATCH -n 448
#SBATCH -t 04:00:00
#SBATCH -p spr
#SBATCH -o slurm-%j.out
module reset
module load intel/24.0 impi/21.11
cd $SCRATCH/myrun
ibrun ./mpi_program
Pure OpenMP (single SKX node, 48 threads)
#!/bin/bash
#SBATCH -J omp
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 02:00:00
#SBATCH -p skx
#SBATCH -o slurm-%j.out
module reset
module load intel/24.0
export OMP_NUM_THREADS=48
export OMP_PLACES=cores
export OMP_PROC_BIND=close
cd $SCRATCH/myrun
./omp_program
Hybrid MPI + OpenMP (2 ICX nodes, 4 ranks/node × 20 threads = 80 cores/node)
#!/bin/bash
#SBATCH -J hybrid
#SBATCH -N 2
#SBATCH -n 8
#SBATCH --ntasks-per-node=4
#SBATCH -t 03:00:00
#SBATCH -p icx
#SBATCH -o slurm-%j.out
module reset
module load intel/24.0 impi/21.11
# 4 ranks × 20 threads = 80 cores per ICX node
export OMP_NUM_THREADS=20
export OMP_PLACES=cores
export OMP_PROC_BIND=close
cd $SCRATCH/myrun
ibrun ./hybrid_program
H100 GPU (1 node, 4 H100s, one process per GPU)
#!/bin/bash
#SBATCH -J h100
#SBATCH -N 1
#SBATCH -n 4
#SBATCH -t 02:00:00
#SBATCH -p h100
#SBATCH -o slurm-%j.out
module reset
module load cuda
cd $SCRATCH/myrun
ibrun ./gpu_program # or: python train.py for single-process multi-GPU
Single-process multi-GPU (PyTorch / TF on one H100 node)
#!/bin/bash
#SBATCH -J torch
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 04:00:00
#SBATCH -p h100
#SBATCH -o slurm-%j.out
module reset
module load cuda python3
source $WORK/venvs/torch/bin/activate
cd $SCRATCH/myrun
python train.py # framework sees all 4 GPUs via CUDA_VISIBLE_DEVICES
PVC GPU (Intel Max 1550, SYCL)
#!/bin/bash
#SBATCH -J pvc
#SBATCH -N 1
#SBATCH -n 4
#SBATCH -t 02:00:00
#SBATCH -p pvc
#SBATCH -o slurm-%j.out
module reset
module load intel oneapi
cd $SCRATCH/myrun
ibrun ./sycl_program
Large memory (NVDIMM, 4 TB single node)
#!/bin/bash
#SBATCH -J bigmem
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 12:00:00
#SBATCH -p nvdimm
#SBATCH -o slurm-%j.out
module reset
module load intel/24.0
cd $SCRATCH/myrun
./memory_hog # can use up to ~4 TB
Job array (parameter sweep, throttled to 20 concurrent)
#!/bin/bash
#SBATCH -J sweep
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 01:00:00
#SBATCH -p skx
#SBATCH -a 1-100%20
#SBATCH -o slurm-%A_%a.out
module reset
module load intel/24.0
cd $SCRATCH/sweep
./run.sh input_${SLURM_ARRAY_TASK_ID}.dat
Job dependency (B starts after A succeeds)
JID_A=$(sbatch --parsable a.slurm)
sbatch --dependency=afterok:$JID_A b.slurm
After submitting
Report back to the user:
- The JobID
squeue -j <id> snapshot (state, reason, ETA if running)
- Where stdout/stderr will land
- The estimated SU cost:
nodes × max_wall_hours × rate (note: actual bill is by elapsed seconds, 15-min minimum)
When the user wants interactive instead
If they're iterating fast, suggest idev instead of repeated sbatch:
idev -p skx-dev -N 1 -n 48 -t 01:00:00
# drops you onto a compute node; run ibrun / programs as usual; `exit` to release
1---2name: stampede3-submit3description: Build a Slurm sbatch script for Stampede3 (TACC). Use when the user on Stampede3 asks to "run X on the cluster", "submit a job", "make a batch script", or "request N nodes/GPUs". Covers serial, MPI, OpenMP, hybrid, and GPU (H100/PVC) workloads with the correct partition, ibrun launch, and module setup. For diagnosing a job that already failed, use stampede3-debug.4---56# stampede3-submit — Stampede3 sbatch script builder78## Queue reference910| Queue | Node | Cores/node | RAM/node | Max nodes/job | Max wall | Max jobs/user | SU/node-hr |11|-------|------|-----------|----------|---------------|----------|---------------|------------|12| `skx` | Skylake | 48 | 192 GB | 256 | 48 h | 40 | 1 |13| `skx-dev` | Skylake | 48 | 192 GB | 16 | 2 h | 2 | 1 |14| `icx` | Ice Lake | 80 | 256 GB | 32 | 48 h | 12 | 1.5 |15| `spr` | Sapphire Rapids | 112 | 128 GB HBM2e | 32 | 48 h | 24 | 2 |16| `nvdimm` | Ice Lake large-mem | 80 | 4 TB | 1 | 48 h | 2 | 4 |17| `h100` | 4× H100 SXM5 (96 GB/GPU) | 96 | 1 TB | 4 | 48 h | 2 | 4 |18| `pvc` | 4× Max 1550 (124 GB/GPU) | 96 | 1 TB | 4 | 48 h | 2 | 3 |1920## Workflow21221. **Gather requirements** before writing anything. If the user hasn't said, ask (one short batch of questions):23 - What's the workload? (which executable, MPI? OpenMP? GPU? serial?)24 - How many nodes / ranks / threads / GPUs?25 - Estimated wall time?26 - Which allocation/project? (only if user has multiple — check `/usr/local/etc/taccinfo`)27 - Inputs/outputs path — should I `cd $SCRATCH/<jobdir>` first?28292. **Pick the partition** with this decision flow, using the queue table above for cores/RAM/limits.3031 **Step 2a — is this a test or a production run?**32 - Test / debugging / first time running the script → `skx-dev` (2 h max, 16 nodes max). Always start here. Faster queue, same SKX hardware.3334 **Step 2b — GPU or CPU?**35 - NVIDIA CUDA / PyTorch / TensorFlow / JAX → `h100` (4× H100 SXM5, 96 GB/GPU, NDR IB).36 - Intel oneAPI / SYCL / DPC++ → `pvc` (4× Max 1550, 124 GB/GPU).37 - No GPU → continue to 2c.3839 **Step 2c — does one rank need > 256 GB RAM?**40 - Yes → `nvdimm` (single node, 4 TB, 80 cores). Note: only 3 nodes total in this queue and only 1 per job — be sure you actually need it.41 - No → continue to 2d.4243 **Step 2d — pick the CPU queue by workload character:**44 | Workload | Recommended | Reason |45 |----------|-------------|--------|46 | Memory-bandwidth bound (sparse linalg, stencil, FFT, CFD) | `spr` | HBM2e gives 3.5× per-core bandwidth vs SKX |47 | Memory-capacity bound (RAM/core matters more than BW) | `icx` | 256 GB / 80 cores = 3.2 GB/core (vs SPR's ~1.1) |48 | Compute-bound, moderate memory, large job (>32 nodes) | `skx` | Only queue that scales past 32 nodes (up to 256) |49 | Legacy / well-validated SKX binary | `skx` | No re-build risk, 1 SU/node-hr (cheapest) |5051 **Tie-break rules:**52 - Need > 32 nodes? `skx` is your only option for CPU.53 - SU budget tight? Cheaper-first: `skx` (1) < `icx` (1.5) < `spr` (2) < `pvc` (3) < `h100` = `nvdimm` (4).54 - Don't pick a queue just because it's "the newest" — match it to the workload's bottleneck.5556 **SPR memory trap:** SPR's 128 GB HBM2e is *per node*, not per core. With 112 cores, that's ~1.1 GB/core. A code that runs fine on SKX (4 GB/core) or ICX (3.2 GB/core) may OOM on SPR. Either reduce ranks/node or pick `icx`.57583. **Compute `-N`/`-n`/threads** before writing:59 - Pure MPI: `-n = N × cores_per_node` (SKX 48, ICX 80, SPR 112, H100/PVC 96).60 - Pure OpenMP: `-N 1 -n 1` and set `OMP_NUM_THREADS`.61 - Hybrid: `-n = N × ranks_per_node` and `OMP_NUM_THREADS = cores_per_node / ranks_per_node`. Document the math in a one-line comment.62 - GPU: `-n 1` per node is fine; one process per GPU is typical (so `-n 4` for 4 GPUs).63644. **Write the script** to a file the user names (default `job.slurm` in CWD). Always include:65 - `#!/bin/bash` shebang66 - `#SBATCH` block in the order: `-J -N -n [-ntasks-per-node] -t -p [-A] -o`67 - `module reset` then explicit `module load` lines — never rely on the user's `.bashrc`68 - `cd` to the run directory explicitly (don't rely on submit CWD if files live elsewhere)69 - `ibrun` for MPI; bare executable for serial/OpenMP; `./prog` with `CUDA_VISIBLE_DEVICES`/`ZE_AFFINITY_MASK` only if asked70715. **Write the script and hand it off.** Claude cannot submit jobs on Stampede3 from inside an idev session — `sbatch` is blocked from compute by Slurm policy, and `ssh login*` requires MFA. So the workflow is: write the file, tell the user where it is and what it'll cost, and stop.7273 Hand-off message template:74 > Wrote `job.slurm`. Submit from a login-node terminal with `sbatch job.slurm`. Estimated cost: `N × T × rate` SUs.75766. After the user submits and reports back with a JobID, Claude can take over again from inside idev:77 - `squeue -j <jobid>` for queue state78 - `sacct -j <jobid> --format=...` for accounting79 - Reading `slurm-<jobid>.out` once the job runs80 - Hand off to the `stampede3-debug` skill if it failed8182 These all work fine from compute — only `sbatch` is blocked.8384## Hard "don't" list8586- Don't emit `--mem` (unsupported on Stampede3).87- Don't emit `--export=...` (breaks env propagation).88- Don't use `mpirun`/`mpiexec`/`srun` to launch MPI — always `ibrun`.89- Don't use `lfs setstripe` on `$HOME` or `$SCRATCH` (VAST, not Lustre). `$WORK` is Lustre.90- Don't request more nodes than the queue allows (see the queue table).91- Don't pick max wall time "to be safe" — shorter jobs schedule faster and the 15-min minimum still applies.9293## Templates9495### Serial / single-threaded96```bash97#!/bin/bash98#SBATCH -J serial99#SBATCH -N 1100#SBATCH -n 1101#SBATCH -t 02:00:00102#SBATCH -p skx103#SBATCH -o slurm-%j.out104105module reset106module load intel/24.0107108cd $SCRATCH/myrun109./myprogram input.txt110```111112### Pure MPI (SPR example: 4 nodes × 112 ranks = 448)113```bash114#!/bin/bash115#SBATCH -J mpi-spr116#SBATCH -N 4117#SBATCH -n 448118#SBATCH -t 04:00:00119#SBATCH -p spr120#SBATCH -o slurm-%j.out121122module reset123module load intel/24.0 impi/21.11124125cd $SCRATCH/myrun126ibrun ./mpi_program127```128129### Pure OpenMP (single SKX node, 48 threads)130```bash131#!/bin/bash132#SBATCH -J omp133#SBATCH -N 1134#SBATCH -n 1135#SBATCH -t 02:00:00136#SBATCH -p skx137#SBATCH -o slurm-%j.out138139module reset140module load intel/24.0141142export OMP_NUM_THREADS=48143export OMP_PLACES=cores144export OMP_PROC_BIND=close145146cd $SCRATCH/myrun147./omp_program148```149150### Hybrid MPI + OpenMP (2 ICX nodes, 4 ranks/node × 20 threads = 80 cores/node)151```bash152#!/bin/bash153#SBATCH -J hybrid154#SBATCH -N 2155#SBATCH -n 8156#SBATCH --ntasks-per-node=4157#SBATCH -t 03:00:00158#SBATCH -p icx159#SBATCH -o slurm-%j.out160161module reset162module load intel/24.0 impi/21.11163164# 4 ranks × 20 threads = 80 cores per ICX node165export OMP_NUM_THREADS=20166export OMP_PLACES=cores167export OMP_PROC_BIND=close168169cd $SCRATCH/myrun170ibrun ./hybrid_program171```172173### H100 GPU (1 node, 4 H100s, one process per GPU)174```bash175#!/bin/bash176#SBATCH -J h100177#SBATCH -N 1178#SBATCH -n 4179#SBATCH -t 02:00:00180#SBATCH -p h100181#SBATCH -o slurm-%j.out182183module reset184module load cuda185186cd $SCRATCH/myrun187ibrun ./gpu_program # or: python train.py for single-process multi-GPU188```189190### Single-process multi-GPU (PyTorch / TF on one H100 node)191```bash192#!/bin/bash193#SBATCH -J torch194#SBATCH -N 1195#SBATCH -n 1196#SBATCH -t 04:00:00197#SBATCH -p h100198#SBATCH -o slurm-%j.out199200module reset201module load cuda python3202203source $WORK/venvs/torch/bin/activate204cd $SCRATCH/myrun205python train.py # framework sees all 4 GPUs via CUDA_VISIBLE_DEVICES206```207208### PVC GPU (Intel Max 1550, SYCL)209```bash210#!/bin/bash211#SBATCH -J pvc212#SBATCH -N 1213#SBATCH -n 4214#SBATCH -t 02:00:00215#SBATCH -p pvc216#SBATCH -o slurm-%j.out217218module reset219module load intel oneapi220221cd $SCRATCH/myrun222ibrun ./sycl_program223```224225### Large memory (NVDIMM, 4 TB single node)226```bash227#!/bin/bash228#SBATCH -J bigmem229#SBATCH -N 1230#SBATCH -n 1231#SBATCH -t 12:00:00232#SBATCH -p nvdimm233#SBATCH -o slurm-%j.out234235module reset236module load intel/24.0237238cd $SCRATCH/myrun239./memory_hog # can use up to ~4 TB240```241242### Job array (parameter sweep, throttled to 20 concurrent)243```bash244#!/bin/bash245#SBATCH -J sweep246#SBATCH -N 1247#SBATCH -n 1248#SBATCH -t 01:00:00249#SBATCH -p skx250#SBATCH -a 1-100%20251#SBATCH -o slurm-%A_%a.out252253module reset254module load intel/24.0255256cd $SCRATCH/sweep257./run.sh input_${SLURM_ARRAY_TASK_ID}.dat258```259260### Job dependency (B starts after A succeeds)261```bash262JID_A=$(sbatch --parsable a.slurm)263sbatch --dependency=afterok:$JID_A b.slurm264```265266## After submitting267268Report back to the user:269- The JobID270- `squeue -j <id>` snapshot (state, reason, ETA if running)271- Where stdout/stderr will land272- The estimated SU cost: `nodes × max_wall_hours × rate` (note: actual bill is by elapsed seconds, 15-min minimum)273274## When the user wants interactive instead275276If they're iterating fast, suggest `idev` instead of repeated `sbatch`:277```bash278idev -p skx-dev -N 1 -n 48 -t 01:00:00279# drops you onto a compute node; run ibrun / programs as usual; `exit` to release280```