Interactive jobs¶
Important
Please avoid using srun from the login node. If the login node is restarted, any job running there will be terminated immediately. We highly recommend always using the Open OnDemand portal for Vera and Alvis instead, which does not have this limitation, and also allows you to get a full desktop session.
An interactive job allows you to run a shell on a compute node. This can be useful for quick development, debugging and other forms of short interactive work.
$ srun --account=NAISS2025-1-2-3 --gpus-per-node=T4:1 --time=01:00:00 --pty=/bin/bash
[emilia@alvis2-12 ~]$ module load PyTorch
[emilia@alvis2-12 ~]$ ./my_ml_pytorch_script.py --debug
Explanation:
The srun
command schedules a job on a compute node.
--account=NAISS2025-1-2-3
: Specifies the NAISS compute project (you must change this) responsible for billing.--gpus-per-node=T4:1
: Requests four (4) A40 GPUs for this job.--time=01:00:00
: Requests a runtime of 1 hour.--pty
: Needed for an interactive shells- /bin/bash`: The program to launch (in this case a shell to run things from).
The last two lines in the example is typed by the user on the compute host
alvis2-12
.
module load PyTorch
: Loads the pytorch module from the module system../my_ml_pytorch_script --debug
: Starts an application.