From ebecfb6dc6ec771e44b543e541e426edd3625cf7 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent@modolo.fr>
Date: Wed, 27 Jan 2021 14:39:32 +0100
Subject: [PATCH] nextflow.config: add memory limits

---
 src/nextflow.config           | 11 +++++++----
 src/nf_modules/picard/main.nf |  1 -
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/nextflow.config b/src/nextflow.config
index dfebf4d3..df01d720 100644
--- a/src/nextflow.config
+++ b/src/nextflow.config
@@ -17,6 +17,7 @@ profiles {
     docker.temp = "auto"
     docker.enabled = true
     process {
+      memory = '16 GB'
       withLabel: big_mem_mono_cpus {
         cpus = 1
       }
@@ -29,6 +30,7 @@ profiles {
     singularity.enabled = true
     singularity.cacheDir = "./bin/"
     process {
+      memory = '16 GB'
       withLabel: big_mem_mono_cpus {
         cpus = 1
       }
@@ -46,7 +48,7 @@ profiles {
         executor = "sge"
         clusterOptions = "-cwd -V"
         cpus = 1
-        memory = "20GB"
+        memory = "128GB"
         time = "12h"
         queue = "monointeldeb128"
       }
@@ -55,7 +57,7 @@ profiles {
         executor = "sge"
         clusterOptions = "-cwd -V"
         cpus = 32
-        memory = "30GB"
+        memory = "192GB"
         time = "24h"
         queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D"
         penv = "openmp32"
@@ -75,6 +77,7 @@ profiles {
         executor = "sge"
         clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n"
         cpus = 1
+        memory = "8GB"
         queue = "huge"
       }
       withLabel: big_mem_multi_cpus {
@@ -83,9 +86,9 @@ profiles {
         stageInMode = "copy"
         stageOutMode = "rsync"
         executor = "sge"
-        clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n\
-        "
+        clusterOptions = "-P P_lbmc -l os=cl7 -l sps=1 -r n"
         cpus = 1
+        memory = "8GB"
         queue = "huge"
       }
     }
diff --git a/src/nf_modules/picard/main.nf b/src/nf_modules/picard/main.nf
index 9a6b702f..0faec2e0 100644
--- a/src/nf_modules/picard/main.nf
+++ b/src/nf_modules/picard/main.nf
@@ -6,7 +6,6 @@ process mark_duplicate {
   label "big_mem_mono_cpus"
   tag "$file_id"
   publishDir "results/mapping/ddup/", mode: 'copy'
-  memory '30 GB'
 
   input:
     tuple val(file_id), path(bam)
-- 
GitLab