Commit d05a5049 authored by Blaise Li's avatar Blaise Li
Browse files

Trying to solve memory issues.

This is actually related to 16b41b3f.
parent 06e5b121
......@@ -67,7 +67,14 @@ shift
if [ -e ${configfile} ]
then
cmd="snakemake -s ${snakefile} --configfile ${configfile} $@"
kilobytes_tot=$(mawk '$1 == "MemTotal:" {print $2}' /proc/meminfo)
# Some rules were given a "mem_mb" resource section based on the "max_vms" benchmarking result.
# See the /pasteur/homes/bli/Documents/Informatique/benchmarks/Pipeline_benchmarking/Pipeline_benchmarking.ipynb jupyter notebook.
# These values are in megabytes (https://stackoverflow.com/a/47201241/1878788)
# We divide the total memory (in kB) by 1100 instead of 1000
# to avoid pretending that we have all this memory available for snakemake rules.
megabytes_resource=$(echo "${kilobytes_tot} / 1100" | bc)
cmd="snakemake -s ${snakefile} --configfile ${configfile} --resources mem_mb=${megabytes_resource} $@"
else
error_exit "Pipeline configuration file ${configfile} not found."
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment