Interactive Jobs

Run interactive jobs on DAIC compute nodes for testing and debugging.

Before you begin

You should already be logged in to DAIC. If not, complete First Login.

Why use interactive jobs?

Interactive jobs let you:

  • Test code before submitting batch jobs
  • Debug issues on compute nodes
  • Explore GPU resources
  • Run short experiments that need direct interaction

Start an interactive session

1. Request resources with salloc

salloc --account=<your-account> --partition=all --time=1:00:00 --cpus-per-task=2 --mem=4G
> salloc: Granted job allocation 12345
> salloc: Waiting for resource configuration
> salloc: Nodes gpu23 are ready for job

2. Run commands on the compute node

Use srun to execute commands on your allocated node:

srun hostname
> gpu23.ethernet.tudhpc

3. Get an interactive shell

For a full shell session on the compute node:

srun --pty bash

4. Exit the session

When done, type exit to release the allocation:

exit
> salloc: Relinquishing job allocation 12345

To cancel from another terminal:

scancel <jobid>

Or cancel all your jobs:

scancel -u $USER

Request GPU resources

To get an interactive session with a GPU:

salloc --account=<your-account> --partition=all --time=1:00:00 --gres=gpu:1 --mem=8G

Once allocated, verify the GPU:

srun nvidia-smi

Common salloc options

OptionDescriptionExample
--accountYour account (required)--account=ewi-insy
--partitionPartition to use--partition=all
--timeMaximum run time--time=2:00:00
--cpus-per-taskCPUs per task--cpus-per-task=4
--memMemory--mem=8G
--gresGeneric resources (GPUs)--gres=gpu:1

Next steps