Skip to content

Multiple --gres arguments not supported #466

@alexrakowski

Description

@alexrakowski

Software Versions
Snakemake: 9.13.7
snakemake-executor-plugin-slurm: 1.9.2

Describe the bug
The parser is not supporting multiple --gres arguments

Logs


Using profile ./snakemake_config for setting default command line arguments.
host: <my-host-address>
Building DAG of jobs...
You are running snakemake in a SLURM job context. This is not recommended, as it may lead to unexpected behavior. Please run Snakemake directly on the login node.
SLURM run ID: <slurm-run-id>
Using shell: /usr/bin/bash
Provided remote nodes: 1
Provided resources: load=1
Job stats:
job                         count
------------------------  -------
ptb_xl_vae_fc                   2
ptb_xl_vae_fc_deep_model        1
total                           3

Select jobs to execute...
Execute 1 jobs...

[Mon Jun  1 13:57:24 2026]
rule ptb_xl_vae_fc:
    output: results/ptb_xl/fc/64/1e-08/0.001/64/500/8/1/2/0/250/42/results.json
    log: logs/ptb_xl/fc/64/1e-08/0.001/64/500/8/1/2/0/250/42/log.stdout, logs/ptb_xl/fc/64/1e-08/0.001/64/500/8/1/2/0/250/42/log.stderr
    jobid: 1
    reason: Missing output files: results/ptb_xl/fc/64/1e-08/0.001/64/500/8/1/2/0/250/42/results.json
    wildcards: dim_Z=64, coeff_kl=1e-08, lr=0.001, batch_size=64, max_epochs=500, n_layers=8, ch_mult=1, n_layers_fc_dec=2, fold_idx=0, resample_to=250, seed=42
    threads: 16
    resources: tmpdir=<TBD>, runtime=10080, mem=256gb, mem_mb=256000, gres=gpu:a40:1,localtmp:2G, tasks_per_node=1, cpus_per_task=8, partition=gpu, slurm_partition=gpu
Shell command: None
No SLURM account given, trying to guess.
Unable to guess SLURM account. Trying to proceed without.
Cleaning up log files older than 10 day(s).
WorkflowError:
Invalid GRES format: gpu:a40:1,localtmp:2G. Expected format: '<name>:<number>' or '<name>:<type>:<number>' (e.g., 'gpu:1' or 'gpu:tesla:2')

Minimal example

rule ptb_xl_vae_fc:
    output:
        res_file=str(DIR_RESULTS_PTB_XL / 'fc' / '{dim_Z}' / '{coeff_kl}' / '{lr}' / '{batch_size}' / '{max_epochs}' / '{n_layers}' / '{ch_mult}' / '{n_layers_fc_dec}' / '{fold_idx}' / '{resample_to}' /  '{seed}' / 'results.json'),
    resources:
        runtime=7 * 24 * 60,
        mem='256gb',
        gres='gpu:a40:1,localtmp=2G',
        tasks_per_gpu=0,
        n=8,
        partition='gpu',
        slurm_partition='gpu'
    threads: 16
    log: 
        stdout=str(DIR_LOGS_PTB_XL / 'fc' / '{dim_Z}' / '{coeff_kl}' / '{lr}' / '{batch_size}' / '{max_epochs}' / '{n_layers}' / '{ch_mult}' / '{n_layers_fc_dec}' / '{fold_idx}' / '{resample_to}' / '{seed}' / 'log.stdout'), 
        stderr=str(DIR_LOGS_PTB_XL / 'fc' / '{dim_Z}' / '{coeff_kl}' / '{lr}' / '{batch_size}' / '{max_epochs}' / '{n_layers}' / '{ch_mult}' / '{n_layers_fc_dec}' / '{fold_idx}' / '{resample_to}' /'{seed}' / 'log.stderr')
    run:
        print('')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions