Skip to content

Commit 55068ae

Browse files
authored
feat: new flag for SLURM qos (#351)
a new flag `--slurm-qos` has been added to conform with reservations requiring a particular qos upon job submission. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added optional SLURM QoS support for job submissions. Users can specify a QoS via a new --slurm-qos=<qos> CLI option or corresponding executor setting; no change occurs when unset. * **Documentation** * Added “Using SLURM QoS” under SLURM reservations, explaining how to configure QoS alongside reservations and the new option. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 28924a7 commit 55068ae

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

docs/further.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,10 @@ With `--slurm-efficiency-report` you can generate a table of all efficiency data
627627
The plugin allows specifying a flag `--slurm-reservation=<name>` to use a particular reservation.
628628
It does not validate the spelling nor eligibility to this reservation.
629629

630+
### Using SLURM QoS
631+
632+
To use SLURM's quality of service flags (`--qos` to `sbatch`) the plugin allows specifying `--slurm-qos=<qos-string>`, too. Both, the reservation and the qos may be particularly useful in a course setting.
633+
630634
### Frequently Asked Questions
631635

632636
#### Should I run Snakemake on the Login Node of my Cluster?

snakemake_executor_plugin_slurm/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ class ExecutorSettings(ExecutorSettingsBase):
140140
"This flag has no effect, if not set.",
141141
},
142142
)
143+
qos: Optional[str] = field(
144+
default=None,
145+
metadata={
146+
"help": "If set, the given QoS will be used for job submission.",
147+
"env_var": False,
148+
"required": False,
149+
},
150+
)
143151
reservation: Optional[str] = field(
144152
default=None,
145153
metadata={
@@ -309,6 +317,9 @@ def run_job(self, job: JobExecutorInterface):
309317
if self.workflow.executor_settings.requeue:
310318
call += " --requeue"
311319

320+
if self.workflow.executor_settings.qos:
321+
call += f" --qos={self.workflow.executor_settings.qos}"
322+
312323
if self.workflow.executor_settings.reservation:
313324
call += f" --reservation={self.workflow.executor_settings.reservation}"
314325

0 commit comments

Comments
 (0)