I'm using a slurm queue system and I wanted to be able to queue a list of jobs. The problem I have is that the software I am using it can only be used once at the time. So if a job is using it, the next in queue has to finish until the previous is over. maybe a queue that can only run one job at the time? thanks for any help you can give me!
I tried to use --dependency=afterok:$jobid but for that I need to always check the jobid of the previous job and I though it should be a way to configure slurm to do this automatically
This is the typical use case for licenses in Slurm. The idea is to define a number of licences available for that software (here, only 1) and then use the
--licenceoption for jobs that require that software. Slurm will then only schedule such job when a licence is available.If you are not administrator and cannot change the Slurm configuration, a workaround is to give all your jobs the same name (
--job-name) and use--dependency=singleton. That will instruct Slurm to one run one of such job at a time.