How to Run Overlap Jobs in SLURM

Last updated: 2024-12-06
Solution verified 2024-12-06

Environment

  • ITSO HPC clusters

Issue

  • Users need to run overlap jobs within an existing SLURM allocation (e.g. monitoring, debugging, etc.)

  • Standard job submission may not allow sharing resources with existing jobs

Resolution

To run an overlap job within an existing SLURM allocation:

  • Find your current job ID:

squeue -u $USER
  • Use srun with the –overlap flag:

srun -A <account> --overlap --jobid <jobid> --pty bash

Example usage:

$ srun -A myproject --overlap --jobid 12345 --pty bash

Note

The –overlap flag allows the new job to share resources with the existing job specified by –jobid

Warning

Ensure you have sufficient resources in your original allocation to run the overlap job

Root Cause

SLURM by default prevents multiple jobs from using the same resources simultaneously. The –overlap flag explicitly allows resource sharing between jobs when needed for workflow efficiency.

References