How to Run an Interactive Job
The following article will explain how to run an interactive job.
When you login to the Grid, you are connected to the login node warrior. This is indicated by the '@warrior'
Warrior is the gateway for users to submit and run jobs on compute hosts (nodes). If you run any processes on warrior, you will receive a warning. If you do not suspend these processes, they will be killed and your account may be temporarily suspended. If you continue to run processes on warrior after being warned then you may be banned from using the Grid.
You must run all processes on compute nodes by requesting a node through Slurm. One of the ways this can be done is with an interactive job.
An interactive job will spawn a shell where users can execute commands and scripts in real-time, and run applications or software that require a graphical display or input from the user.
An interactive job can be requested with the following command: srun -q primary -N 1 -n 8 --mem 4G -t 10:00:00 --pty bash
This is asking for the primary QoS, 1 node, 8 cores, 10 hours and 4 GB of memory. It can modified to request any other variation of resources. This is ideal for an application, software, or conda related installations.
Once the job has been allocated, you will be put on a compute host or node. In this example, it is sfx4. This is indicated by the '@sfx4'.
From here, you can run any applications or software, scripts or commands.
The following are a few common uses for an interactive job:
- Running R Interactively
Load the module: module load r/4.2.0
Run R with the command: R
- Running Python Interactively
Load the module: module load python/3.8
Run python: python
- Create a Conda environment and install Conda packages