This page just gives you a quick introduction to submitting an interactive job. An interactive job (also referred as interactive session) will provide you with a shell on a compute node in which you can launch your jobs.
For more information about interactive jobs, we refer you to the Batch Job & Interactive Job Submissions guide in our Helpful References.
srun can be used to run interactive jobs, with or without graphics
srun --x11 -N 1 -n 1 -c 2 --time=1:00:00 --mem=5gb --pty /bin/bash
Note: This will launch one node (-N 1) with two cpus per task (-c 2) within a single task (-n 1) for 1 hour (--time=1:00:00) and 5gb of memory, with graphical windows (--x11) ready. If you want to request, let's say, 100 hrs, you can do it as --time=4-04:00:00 in the the format: "days-hours:minutes:seconds".
For GPU, it becomes:
srun --x11 -p gpu -C gpu2v100 --gres=gpu:1 -n 1 -c 2 --time=1:00:00 --mem=5gb --pty /bin/bash
Note: This will request a gpu2v100 queue (-C gpu2v100) with only one gpu (--gres=gpu:1) out of 2 gpus with cpu memory-per-node 5gb (--mem=5gb). For other GPU types, please look up the Resource View
To request a specific node, use the --nodelist option.
Request a specific node:
srun -p gpu -C gpu2v100 --nodelist=gpu059t --gres=gpu:1 --pty bash
It is requesting gpu059t. It is useful when we want to use a specific node only. Please be mindful that you might have to wait until the node is free to use if someone else is running a job in that node.
Exclude a particular node or multiple nodes from running your jobs:
srun --exclude=compt227,compt229 --pty bash
srun --exclude=compt[230-240] --pty bash
If you want to reserve the whole node, you can use, --exclusive
srun --exclusive --pty bash
Request an smp node in smp queue (-q smp).
srun -p smp -n 32 --mem=500gb --pty bash
We have multiple GPU types on the cluster. To request an interactive session on a GPU Node, use the command:
Insert the appropriate GPUtype (e.g. gpu2v100 or gpup100)
srun -p gpu --gres=gpu:1 -C <GPUtype> --pty bash
To request a GPU node when submitting a BATCH job, add the following option to your Slurm Script
#SBATCH -p gpu -C <GPUtype> --gres=gpu:1