Creating an Interactive Job

The /home directories are not intended for active job I/O. Output from run your processing should be directed to either /work or /common.

Submitting an interactive job is done with the command srun.

$ srun --pty $SHELL

This command will allocate the default resources of 1GB of RAM, 1 hour of running time, and a single CPU core. Oftentimes, these resources are not enough. If the job is terminated, there is a high chance that the reason is exceeded resources, so please make sure you set the memory and time requirements appropriately.

Submitting an interactive job to allocate 4 CPU cores per node for 3 hours with RAM memory of 1GB per core on the general batch partition:

$ srun --nodes=1 --ntasks-per-node=4 --mem-per-cpu=1024 --time=3:00:00 --pty $SHELL

Submitting an interactive job is useful if you require extra resources to run some processing by hand.  It is also very useful to debug your processing.  

An interactive job is scheduled onto a worker node just like a regular job.  You can provide options to the interactive job just as you would a regular SLURM job. The default job runtime is 1 hour, and can be increased by including the --time argument.

Interactive job for Apptainer

Running Apptainer via an interactive job requires at least 4GBs of RAM:

$ srun --mem=4gb --nodes=1 --ntasks-per-node=4 --pty $SHELL
If you get any memory-related errors, continue to increase the requested memory amount.

Priority for short jobs

To run short jobs for testing and development work, a job can specify a different quality of service (QoS). The *short* QoS increases a jobs priority so it will run as soon as possible.

SLURM Specification
--qos=short
Limits per user for ‘short’ QoS
  • 6 hour job run time
  • 2 jobs of 16 CPUs or fewer
  • No more than 256 CPUs in use for short jobs from all users
Using the short QoS
srun --qos=short --nodes=1 --ntasks-per-node=1 --mem-per-cpu=1024 --pty $SHELL