Skip to content

Inconsistent handling of gres in profiles #248

Open
@w8jcik

Description

@w8jcik

Software Versions

Snakemake 9.1.3
snakemake-executor-plugin-slurm 1.1.0

Describe the bug

This works

default-resources:
  gres: "'gpu:1'"

but with gres set in a rule, in the same profile file

set-resources:
  "some_rule":
    ...
    gres: "'gpu:1'"

following error appears

WorkflowError:
Invalid GRES format: 'gpu:1'. Expected format: '<name>:<number>' or '<name>:<type>:<number>' (e.g., 'gpu:1' or 'gpu:tesla:2')

Aside from failing submission, the message suggests to use format that is already used.

More details in case parameters interfere with each other

default-resources:
  tasks: 1
  threads: 12
  cpus_per_task: 12
  runtime: 5
  slurm_partition: "deflt"
  gres: "'gpu:1'"
  slurm_extra: "'--exclude node5'"

set-resources:
  "failing_rule":
    runtime: 30240
    slurm_partition: "long"
    nodes: 1
    tasks: 4
    mpi: "srun"
    gres: "'gpu:4'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions