# Slurm queue directive

**URL:** <https://cylc.discourse.group/t/slurm-queue-directive/758>\
**Category:** Cylc Development\
**Created:** [September 13, 2023, 4:12pm UTC](https://cylc.discourse.group/t/slurm-queue-directive/758 "2023-09-13T16:12:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ejhyer](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/ejhyer/32/307_2.png) [@ejhyer](https://cylc.discourse.group/u/ejhyer)\
**Post date:** [September 13, 2023, 4:12pm UTC](https://cylc.discourse.group/t/slurm-queue-directive/758/1 "2023-09-13T16:12:04Z")

</div>

I am using SLURM for the first time. On the system I am using, directives are specified by `#SBATCH KEY=VALUE` which is consistent with what the SLURM handler in cylc provides. The exception to this is the queue specification, which is `#SBATCH q QUEUE` and SLURM will not accept an `=` in there. I confirmed that if I hand-hack `slurm.py` to handle this exception, I can get my jobs to run, but that’s a terrible hack. Has anyone else worked on a system with this behavior?

---

<div class="post-metadata">

**Author:** ![oliver.sanders](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/oliver.sanders/32/110_2.png) [@oliver.sanders](https://cylc.discourse.group/u/oliver.sanders)\
**Post date:** [September 13, 2023, 5:32pm UTC](https://cylc.discourse.group/t/slurm-queue-directive/758/2 "2023-09-13T17:32:25Z")

</div>

Hi, I think this might work:

```auto
[[directives]]
  -p QUEUE =

```

---

<div class="post-metadata">

**Author:** ![ejhyer](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/ejhyer/32/307_2.png) [@ejhyer](https://cylc.discourse.group/u/ejhyer)\
**Post date:** [September 13, 2023, 6:21pm UTC](https://cylc.discourse.group/t/slurm-queue-directive/758/3 "2023-09-13T18:21:06Z")

</div>

Thanks! That put me on the right track. The incantation that worked is this one:

```auto
        [[[directives]]]
            --qos = QUEUE

```

---

<div class="post-metadata">

**Author:** ![wxtim](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/wxtim/32/151_2.png) [@wxtim](https://cylc.discourse.group/u/wxtim)\
**Post date:** [September 20, 2023, 9:30am UTC](https://cylc.discourse.group/t/slurm-queue-directive/758/4 "2023-09-20T09:30:38Z")

</div>

For future reference Cylc’s Slurm job handler formats directives for use with Sbatch. [Sbatch’s options can be found here](https://slurm.schedmd.com/sbatch.html).

---

<div class="post-metadata">

**Author:** ![ejhyer](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/ejhyer/32/307_2.png) [@ejhyer](https://cylc.discourse.group/u/ejhyer)\
**Post date:** [September 27, 2023, 5:08pm UTC](https://cylc.discourse.group/t/slurm-queue-directive/758/5 "2023-09-27T17:08:58Z")

</div>

Also worth stashing for those using slurm is this cheatsheet: [https://slurm.schedmd.com/pdfs/summary.pdf](https://slurm.schedmd.com/pdfs/summary.pdf)

---

<div class="post-metadata">

**Author:** ![wxtim](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/wxtim/32/151_2.png) [@wxtim](https://cylc.discourse.group/u/wxtim)\
**Post date:** [September 28, 2023, 8:58am UTC](https://cylc.discourse.group/t/slurm-queue-directive/758/6 "2023-09-28T08:58:03Z")

</div>

Also worth noting that the Cylc docs say

> Since not all SLURM commands have a short form, cylc requires the long form directives.

[source](https://cylc.github.io/cylc-doc/stable/html/user-guide/task-implementation/job-runner-handlers/cylc.flow.job_runner_handlers.slurm.html#admonition-0)
