Overview

Interactive jobs let you run commands directly on a compute node โ€” useful for testing, debugging, or running short tasks. They provide a live shell rather than a batch script submission. (They're unsuitable for full-scale MPI benchmarking because of performance variability.)

Basic command

srun -p queue_name --pty bash

Replace queue_name with your desired partition (e.g. short-40core, gpu).

Examples

Standard session:

srun -p short-40core --pty bash

Full node with time limit:

srun -p short-40core -N 1 -n 40 --time=01:00:00 --pty bash

Shared partition with memory specification:

srun -p short-40core-shared -N 1 -n 10 --mem=32GB --time=02:00:00 --pty bash

GPU access:

srun -p a100 --gres=gpu:1 --time=01:00:00 --pty bash

Common options

OptionPurposeExample
-pPartition/queue-p short-40core
-NNumber of nodes-N 1
-nNumber of tasks-n 20
-cCores per task-c 2
--memMemory per node--mem=64GB
--timeTime limit--time=02:00:00
--gresGeneric resources--gres=gpu:1
--pty bashInteractive shellRequired at command end

During the session

Load software, compile code, run programs, and test MPI/OpenMP behavior. Exit with exit to release the resources.

Best practices

  • Request only the resources you need
  • Set appropriate time limits with --time
  • Use interactive jobs primarily for testing and debugging
  • Exit sessions when finished to prevent resource waste
Applies to All clusters