How do I find my SLURM JobID number on Cheaha?

I need to find a JobID in order to manage that job.

–OR–

I’ve been asked by support to give a JobID for a job I’m having an issue with.

How can I find my JobID number?

All jobs submitted to Slurm on Cheaha are assigned a unique identifier called the JobID or jobid. Please follow the guide below to find the JobID

  • Using Open OnDemand?
    • If the job is still running see My Interactive Sessions to locate the Job ID.
    • If the job is no longer running, or the job card is missing, use the last bullet point, for sacct usage, below.
  • Using the terminal?
    • Just submitted the job?
      • Using srun <flags> --pty /bin/bash?
        • If you are still in the job context, type echo $SLURM_JOB_ID.
        • Otherwise use the final bullet point for sacct usage.
      • Using srun without --pty? Use the final bullet point for sacct usage.
      • Using sbatch? The Job ID is printed to the command line automatically on submission.
    • Job still running?
      • Use squeue -u $USER to show all your running jobs.
    • Job not running?
      • Use the final bullet point sacct usage below.

.

  • How to use sacct to find a job.
    • If you know the date of the job, use the following command at the terminal. The date following -s is the start date, choose the same day the job was submitted. The following -e is the end date, choose the day after -s. You will be provided with a list of jobs run on the -s day, and can sift through them to find your job.

      sacct -u $USER -s YYYY-MM-DD -e YYYY-MM-DD
      
    • Otherwise contact Support for assistance.