1+ // Prevent schemas warnings for profile parameters
2+ validation {
3+ ignoreParams = [
4+ 'cheaha_scratch_dir'
5+ ]
6+ }
7+
18// Define the Scratch directory
2- def scratch_dir = System.getenv(" USER_SCRATCH" ) ?: " /tmp"
9+ params.cheaha_scratch_dir = env(' USER_SCRATCH' ) ?: ' /tmp'
310
411params {
512 config_profile_name = 'cheaha'
@@ -9,40 +16,14 @@ params {
916}
1017
1118env {
12- TMPDIR="$scratch_dir"
13- SINGULARITY_TMPDIR="$scratch_dir"
19+ TMPDIR=params.cheaha_scratch_dir
20+ SINGULARITY_TMPDIR=params.cheaha_scratch_dir
1421}
1522
1623singularity {
1724 enabled = true
1825 autoMounts = true
19- runOptions = "--contain --workdir $scratch_dir -B /scratch"
20- }
21-
22- def getQueues = { time, memory ->
23- def queue_list = ["long"]
24-
25- if (time <= 2.h) {
26- queue_list.add("express")
27- }
28-
29- if (time <= 12.h) {
30- queue_list.add("short")
31- }
32-
33- if (time <= 50.h) {
34- queue_list.add("medium")
35- }
36-
37- if (memory >= 300.GB) {
38- queue_list.add("largemem-long")
39-
40- if (time <= 50.h) {
41- queue_list.add("largemem")
42- }
43- }
44-
45- return queue_list.join(",")
26+ runOptions = "--contain --workdir ${params.cheaha_scratch_dir} -B /scratch"
4627}
4728
4829process {
@@ -54,5 +35,29 @@ process {
5435 executor = 'slurm'
5536 maxRetries = 3
5637 beforeScript = 'module load Singularity/3.5.2-GCC-5.4.0-2.26'
57- queue = { getQueues( task.time, task.memory ) }
58- }
38+ queue = {
39+ def queue_list = ["long"]
40+
41+ if (task.time <= 2.h) {
42+ queue_list.add("express")
43+ }
44+
45+ if (task.time <= 12.h) {
46+ queue_list.add("short")
47+ }
48+
49+ if (task.time <= 50.h) {
50+ queue_list.add("medium")
51+ }
52+
53+ if (task.memory >= 300.GB) {
54+ queue_list.add("largemem-long")
55+
56+ if (task.time <= 50.h) {
57+ queue_list.add("largemem")
58+ }
59+ }
60+
61+ return queue_list.join(",")
62+ }
63+ }
0 commit comments