snakemake / snakemake-executor-plugin-slurm

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

Snakemake 8 not usable with Slurm clusters offering GPUs #52

Closed w8jcik closed 3 months ago

w8jcik commented 3 months ago

As previously reported

Snakemake 8.9 still fails to submit jobs to a Slurm cluster when requesting GPU resources.

profiles/default/config.yaml

executor: slurm

default-resources:
  ...
  slurm_extra: "'--gres=gpu:1'"
Select jobs to execute...
InputFunctionException in rule [obfuscated] in file [obfuscated]/Snakefile, line 6:
Error:
  WorkflowError:
    Failed to evaluate resources value '--gres=gpu:1'.
        String arguments may need additional quoting. E.g.: --default-resources "tmpdir='/home/user/tmp'" or --set-resources "somerule:someresource='--nice=100'". This also holds for setting resources inside of a profile, where you might have to enclose them in single and double quotes, i.e. someresource: "'--nice=100'".
    SyntaxError: invalid syntax (<string>, line 1)

Versions

cmeesters commented 3 months ago

I'm afraid I could reproduce this issue.

We are working on a fix - actually this has been fixed, should be covered by a test case and still, it reoccurred. My apologies.

cmeesters commented 3 months ago

Thank you for your patience - I was absent and could not test.

Please update to the latest version of Snakemake: The parsing is now stable.

w8jcik commented 3 months ago

Thank you for help. It works now.

Just for verbosity, the issue have been fixed between version 8.10.2 and 8.10.4, most likely 8.10.2.

I tested that it works with 8.10.4.

There is one more problem with specifying GPU types, but I am creating a separate issue https://github.com/snakemake/snakemake-executor-plugin-slurm/issues/58.