-
Notifications
You must be signed in to change notification settings - Fork 0
/
application.conf
86 lines (69 loc) · 2.38 KB
/
application.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
include required(classpath("application"))
system.max-concurrent-workflows = 3
system.new-workflow-poll-rate = 10
system.io {
number-of-attempts = 50
}
backend {
default = "PBSPRO"
providers {
PBSPRO {
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
concurrent-job-limit = 100
runtime-attributes = """
String? docker
String walltime = "240:00:00"
String queue = "cgsd"
Int cpu = 6
Int memory_gb = 12
"""
submit = """
qsub \
-N ${job_name} \
-l walltime=${walltime} \
-q ${queue} \
-l ncpus=${cpu} \
-l mem=${memory_gb}gb \
-o ${out} \
-e ${err} \
${script}
"""
submit-docker = """
module load singularity/3.7.2
# mkdir -p /groups/cgsd/alexandre/.singularity/cache
export SINGULARITY_CACHEDIR=$HOME/.singularity/cache
# Singularity cachedir check if it exists, if not create one
if [ -z $SINGULARITY_CACHEDIR ];
then CACHE_DIR=$HOME/.singularity/cache
else CACHE_DIR=$HOME/.singularity/cache
fi
# make sure cache dir exists, so we can create a lock file with flock command
mkdir -p $CACHE_DIR
LOCK_FILE=$CACHE_DIR/singularity_pull_flock
# Create an exclusive filelock with flock, this prevents two workflow tasks to pull the same container image at the same time
flock --exclusive --timeout 15 $LOCK_FILE \
singularity exec --containall docker://${docker} \
echo "successfully pulled ${docker}!"
# Submit the script
qsub \
-W block=true \
-k oed \
-v SINGULARITY_CACHEDIR \
-N ${job_name} \
-l walltime=${walltime} \
-q ${queue} \
-l ncpus=${cpu} \
-l mem=${memory_gb}gb \
-o ${cwd}/execution/stdout \
-e ${cwd}/execution/stderr \
-- /software/singularity/3.7.2/bin/singularity exec -C --bind ${cwd}:${docker_cwd} docker://${docker} ${job_shell} ${docker_script}
"""
root = "/groups/cgsd/alexandre/cromwell-executions"
job-id-regex = "(\\d+)"
kill = "qdel ${job_id}"
check-alive = "qstat ${job_id}"
}
}
}
}