Skip to content

SBATCH --mem-per-cpu in call is mem_mb_per_cpu x threads #317

@johnne

Description

@johnne

Software Versions

snakemake 9.5.1
snakemake-executor-plugin-slurm 1.3.6
snakemake-executor-plugin-slurm-jobstep 0.3.0

Describe the bug
When I add mem_mb_per_cpu to a rule in a profile configuration the SBATCH call has --mem-per-cpu set to the product of the {threads} for the rule and the mem_mb_per_cpu value.

Example:

file=myprofile/config.yaml

set-resources:
  run_kraken:
    mem_mb_per_cpu: 1000

file=rules/kraken.smk

rule run_kraken:
    ...
    threads: 16
    ...

SBATCH call from plugin:

sbatch <flags and settings> --mem-per-cpu 16000 <more flags and settings>

This causes the error:

WorkflowError:
SLURM sbatch failed. The error message was sbatch: error: Batch job submission failed: Requested node configuration is not available

Logs

Minimal example

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/fixSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions