CU e-Science HTC-HPC Cluster and Cloud
  • CU e-Science HTC-HPC Cluster and Cloud
  • Introduction to our cluster
    • Our resources
    • Registration
    • Login to our cluster
    • Disk space
    • Acknowledgement and Publication
  • Slurm
    • 101: How to submit Slurm batch jobs
    • 101: Interactive jobs with Slurm
    • Basic Slurm commands
    • QoS and Partition
    • Job priority
    • Available complier and software
    • Examples
      • Simple C, C++, Python program
      • Python with VirtualEnv
      • How do I submit a large number of very similar jobs?
      • CMSSW
      • R
      • Mathematica
      • Message Passing Interface (MPI)
  • Kubenetes
    • Under construction!
Powered by GitBook
On this page

Was this helpful?

  1. Slurm

101: Interactive jobs with Slurm

Previous101: How to submit Slurm batch jobsNextBasic Slurm commands

Last updated 4 years ago

Was this helpful?

You can use salloc to allocate resources in real-time to run an interactive batch job. Typically this is used to allocate resources and spawn a shell. The shell is then used to execute srun commands to launch parallel tasks. Interactive job is useful for tasks including data exploration, development, or (with X11 forwarding) visualization activities. The maximum walltime depends on the you have used.

For worker nodes with CPU and GPU:

salloc --qos=cu_hpc --partition=cpugpu

For worker nodes with CPU-only:

salloc --qos=cu_hpc --partition=cpu

After connection, you will get the message like

salloc: Granted job allocation 82025
salloc: Waiting for resource configuration
salloc: Nodes cpu-bladeh-01 are ready for job

and with squeue -u your_user_name, you will see

JOBID PARTITION     NAME           USER ST       TIME  NODES NODELIST(REASON)
82025       cpu interact your_user_name  R       1:59      1 cpu-bladeh-01

To run, you can use srun, e.g.

[your_user_name@frontend-02 ~]$ srun hostname
cpu-bladeh-01.stg

To exit the interactive mode, you can use the command exit

[your_user_name@frontend-02 ~]$ exit
exit
salloc: Relinquishing job allocation 82025
QoS