Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment