snakemake / snakemake-executor-plugin-slurm

A Snakemake executor plugin for submitting jobs to a SLURM cluster
MIT License
9 stars 13 forks source link

Constraints that include logical "or" cause Snakemake to hang #58

Open w8jcik opened 3 months ago

w8jcik commented 3 months ago

Constraints are used to select GPU types, architectures and CPU types.

Using logical or leads to Snakemake neither failing or submitting a job.

Example profile profiles/default/config.yaml

executor: slurm

default-resources:
  ...
  constraint: "turing|ampere"

Observations

WorkflowError:
SLURM job submission failed. The error message was sbatch: error: Batch job submission failed: Invalid feature specification

My first guess is that this parameter is passed directly to shell and then | results in opening a pipe.

cmeesters commented 3 months ago

I'm afraid, your assumption is correct. I will attempt a fix today. Meanwhile, you could try: constraint: "'turing|ampere'".

w8jcik commented 3 months ago

Meanwhile, you could try: constraint: "'turing|ampere'".

I tried with extra quotes and without, the outcome is the same.

cmeesters commented 2 months ago

We do not have a test case, yet. That might take a little while, yet you can try the code in PR #64 . Just clone, switch to branch fix/#58_logical_constraints and (assuming you are working with a conda/mamba environment, use poetry install from your cloned directory.

I hope, we have the fix tested in a few days.

w8jcik commented 2 months ago

I successfully queued some jobs to the cluster using | operator, so I believe that the change works.

Thank you for help.