How to start an interactive job?

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. 

Submitting an interactive job is done with the command srun.

[jzhan61@clogin01 ~]$ srun --pty --partition=interactive-cpu --nodes=1 --ntasks-per-node=4 --mem-per-cpu=1G --time=00:30:00 bash
[jzhan61@node1 ~]$

The above command will start an interactive job on the interactive-cpu partition, with 1 node, 4 cores, 1G memory per core and 30 minutes run time.

Note the change in node names. The user is initially on the login node ([jzhan61@clogin01 ~]), then switched to node1 ([jzhan61@node1 ~]), which is a compute node, after the interactive job starts. Your compute node might be different depending on resource availability.

Within this interactive job, users can load modules and run jobs interactively.

Run R interactively:

[jzhan61@node1 ~]$ module load R/4.0.2
[jzhan61@node1 ~]$ R

R version 4.0.2 (2020-06-22) -- "Taking Off Again"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>

Here is a Python example:

[jzhan61@node1 ~]$ module load python/3.8
[jzhan61@node1 ~]$ python3
Python 3.8.5 (default, Aug 31 2020, 12:49:31) 
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>