I am running a Snakemake (V7.14.0) pipeline on the cluster and provided resources in a resource config file like:

    tool1: 4
    tool1: 12

Point to it in my rules like:


And the snakemake cluster command like:

snakemake --configfiles \
    config/config_resources.yml \
    config/config_parameters.yml \
    --latency-wait 60 \
    --use-conda \
    --use-singularity \
    --printshellcmds \
    --jobname MyPipe{name}_{jobid} \
    --jobs 300 \
    --cluster \
    "bsub -W 200 -n {threads} -M {resources.mem_gb}G \
    -R 'rusage[mem={resources.mem_gb}G]' \
    -o run_logs/{name}_%J.out \
    -e run_logs/{name}_%J.err"

What I do not understand when I run the pipeline is that it shows this in the terminal:

threads: 4

resources: mem_mb=19442, disk_mb=19442, tmpdir=/tmp, mem_gb=12

So next to the one I provided (mem_gb), there are: mem_mb, and disk_mb. They are clearly not the same value. In the cluster job it looks as though the MEMLIMIT is indeed the one I give, but the MEM usage is different (higher). Is it because Snakemake does not understand the mem_gb and I specifically need to use that word?

Thanks in advance


1 Answer 1


You have defined mem_gb but not mem_mb in your resource configuration file. You can set them to same value by adding something like mem_mb=config['mem_gb']['tool1']. Additional information in their documentation.

  • $\begingroup$ Thanks for the response. So basically, Snakemake does not understand mem_gb. So to do this correctly, I need to actually *1000 the values. Because otherwise I get too low values (e.g. 6 mb instead of 6 gb). $\endgroup$
    – Dandelion
    Commented Nov 23, 2022 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.