How to run interactive jobs

If you want to use a GUI or have a short program you want to test or debug, we suggest using the "srun" command. This will automatically grab a compute node with 1 core and an interactive shell. The example below details how to use qlogin to grab a compute node.

First load the "slurm" module:

[abc123@login01 ~]$ module load slurm

Now type "qlogin" to get an interactive shell:
[abc123@login01 ~]$ srun --pty bash
[abc123@compute004 ~]$

Now you can load the module and run your application.

* NOTE * - When using srun with parallel applications you will need to specify how many cores you will use. The batch scheduler, Slurm, by default interprets this as only 1 core and assigns a node accordingly. The problem with this is our compute nodes offer 32 cores. So, if you are running a 32 core job and Slurm *thinks its only using 1 core, Slurm could potentially place you on a node that is already running active jobs (or vice versa). To fix this you'll need to tell srun how many cores you expect to use.

[abc123@login01 ~]$ srun --ntasks-per-node 32 --pty bash

Change "32" to the number of cores you expect to use during your interactive session.

-- AdminUser - 08 Nov 2016
Topic revision: r7 - 12 Jun 2020, AdminUser
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback