Search code examples
slurmbilling

Detremine total core hours to be billed for a slurm job?


I have a basic question about HPC billing. I’ve surfed the site but could not find a clear answer. For a given job ID, I have seemingly three jobs running as shown in the attached photo. I run a bash script with one srun command using sbatch command. I believe the 2nd line is for the bash script and the 3rd is for the srun command. I want to know the total CPU hours I'll be billed for this job? Would it be the time for

  1. 3591397+3591397.bat+3591397.0 ~ 5 hrs
  2. 3591397.bat+3591397.0 ~ 3:13 hrs

results for the sacct for a particular job

I know there are other considerations like memory, GPUs used that can change the total billing by having a billing weight different than 1. However, I don’t want to consider them for now.

Thanks.


Solution

  • You only have one job associated to that job ID 3591397, but that job has two steps, one 3591397.batch that corresponds to the submission script, and one 3591397.0 that corresponds to the first (and seemingly only) instance of srun in the submission script.

    The first line is the summary for the job so the billing would be 13 minutes and 49 seconds multiplied by 8.

    In your output, there is a one-second discrepancy between the Elapsed values for the .batch step, but that could be due to rounding errors.

    If you are not interested in the information for individual steps, you can use the -X parameter of sacct to only get one line per job (the first line in your example).