0

Consider the following example .sh file attempting to schedule some jobs with SLURM

#!/bin/bash
#SBATCH --account=exacct
#SBATCH --time=02:00:00
#SBATCH --job-name="ex_job"
#SBATCH --array=1-80
#SBATCH --cpus-per-task=40
#SBATCH --mem-per-cpu=4G
#SBATCH --output=%x.%a.out

cd /ex_directory

srun Rscript ex_script.R

Let's say that jobs 1-40 will take 1 hour and jobs 41-80 will take 2 hours. Is there anyway to explicitly state this to SLURM (I am thinking that if I indicate some jobs will run quicker this will help with priority). Thanks!

David Veitch
  • 125
  • 5

1 Answers1

1

As per the documentation, it is not possible to do it like that (Unfortunately). All jobs must have the same initial options (e.g. size, time limit, etc.) and we can only change some of these options only after the job start.

To achieve your objective, unfortunately, you need to submit two job scripts one with 1hr time requirement and the other with 2hr time requirement.

In most of the systems, your order of submission gives some weightage in deciding the job priority (since the user privilege and resource requirements are same for your both job scripts) hence, submit the first job script (1hr duration) and few seconds later submit the other one.

j23
  • 3,139
  • 1
  • 6
  • 13