Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Merging latest changes for running on Compute Canada clusters #8

Open
wants to merge 50 commits into
base: dev-organize-output
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
75e0f90
Update readme.md
sitag Nov 12, 2019
05083fa
Update readme.md
sitag Nov 12, 2019
5cf17c3
file tracking
May 1, 2019
b56a763
track all encode extensions
May 3, 2019
a71e2f8
cleanup config
Jul 29, 2019
e334f1b
cleanup filt.bam + master filelist
Jul 29, 2019
d9c3b44
change md5 script generation
Jul 29, 2019
ad5f03f
add unrecognized file patterns
Aug 1, 2019
01b541b
cleaup updates
Aug 1, 2019
9acfa57
trapping find (really should do it differently)
Aug 1, 2019
6048281
add rmsize tracking
Aug 15, 2019
a70dafe
add cleanup notes
sitag Sep 3, 2019
520bead
add organising output section
sitag Sep 3, 2019
e3e1ee8
enable passing output directories
Oct 1, 2019
1df6a00
fix documentation
Oct 1, 2019
ab778de
Adding slurm singularity backend support
paulstretenowich Oct 1, 2019
7e9acc1
Singularity usage with cleanenv
paulstretenowich Oct 2, 2019
5529e7c
Readme update
paulstretenowich Oct 3, 2019
de56ad8
Fixing Local for IHEC test
paulstretenowich Oct 11, 2019
815ddf4
Merge branch 'master' of https://github.com/paulstretenowich/integrat…
paulstretenowich Jan 31, 2020
2fcbb39
Merge pull request #1 from IHEC/dev-organize-output
paulstretenowich Jan 31, 2020
7fabada
Fixing sambamba issue + pbs support
paulstretenowich Jan 31, 2020
0f34fea
PBS support fix
paulstretenowich Jan 31, 2020
82d44c5
PBS support readme modification
paulstretenowich Jan 31, 2020
d2a34aa
Update docker image
paulstretenowich Feb 3, 2020
077a00b
Path to cromwell fix inside template for piperunner
paulstretenowich Feb 13, 2020
f2d0509
Adding cleanenv at singularity calling
paulstretenowich Feb 13, 2020
4b6f7fb
Merge branch 'master' into dev-organize-output
paulstretenowich Aug 27, 2020
59badf4
Merge remote-tracking branch 'upstream/dev-organize-output' into dev-…
paulstretenowich Aug 27, 2020
0eddb1f
Test
paulstretenowich Sep 24, 2020
1a0c331
test
paulstretenowich Sep 25, 2020
ed2dc1d
Test
paulstretenowich Sep 30, 2020
3b68f5c
Test
paulstretenowich Oct 6, 2020
0357c05
Test
paulstretenowich Oct 6, 2020
a735a2e
Test
paulstretenowich Oct 6, 2020
7e52f38
Test
paulstretenowich Oct 7, 2020
6de370e
Changing the usage and updating the doc
paulstretenowich Oct 7, 2020
ee6c610
Doc update
paulstretenowich Oct 7, 2020
e5fea87
Doc update
paulstretenowich Oct 7, 2020
8e4a668
Fixing backend.conf
paulstretenowich Oct 7, 2020
6f7b247
Changing back
paulstretenowich Oct 8, 2020
8e6a18c
Changing Compute Canada behaviour
paulstretenowich Mar 3, 2021
1a9a13f
Debug
paulstretenowich Apr 9, 2021
b7ade1a
Updating md5s for new singularity image
paulstretenowich Jun 9, 2021
e6f44ba
Adding execute permission for compute canada launchers
paulstretenowich Jun 9, 2021
40f9aeb
Updating new singularity image
paulstretenowich Jun 9, 2021
4d43c3d
Updating documentation
paulstretenowich Jun 9, 2021
5ab13d0
Updating documentation
paulstretenowich Jun 9, 2021
f9bba75
Updating documentation
paulstretenowich Jul 7, 2021
0bfd39c
Merge pull request #2 from paulstretenowich/dev-organize-output
paulstretenowich Jul 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 16 additions & 140 deletions encode-wrapper/backend.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ backend {
submit = """
ls ${singularity_container} $(echo ${singularity_bindpath} | tr , ' ') 1>/dev/null && (sbatch \
--export=ALL \
--mail-type=END,FAIL --mail-user=$JOB_MAIL \
-A $RAP_ID \
-J ${job_name} \
-D ${cwd} \
-o ${out} \
Expand All @@ -36,52 +38,42 @@ backend {
${"--account " + slurm_account} \
${"--gres gpu:" + gpu} \
${slurm_extra_param} \
--wrap "chmod u+x ${script} && SINGULARITY_BINDPATH=$(echo ${cwd} | sed 's/cromwell-executions/\n/g' | head -n1),${singularity_bindpath} singularity exec --home ${cwd} ${if defined(gpu) then '--nv' else ''} ${singularity_container} ${script}")
--wrap "chmod u+x ${script} && SINGULARITY_BINDPATH=$(echo ${cwd} | sed 's/cromwell-executions/\n/g' | head -n1),${singularity_bindpath} singularity exec --cleanenv --home ${cwd} ${if defined(gpu) then '--nv' else ''} ${singularity_container} ${script}")
"""
kill = "scancel ${job_id}"
check-alive = "squeue -j ${job_id}"
job-id-regex = "Submitted batch job (\\d+).*"
}
}

sge_singularity {
pbs_singularity {
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
script-epilogue = "sleep 30 && sync"
script-epilogue = "sleep 30"
concurrent-job-limit = 50
runtime-attributes = """
String sge_pe = "shm"
Int cpu = 1
Int? gpu
Int? time
Int? memory_mb
String? sge_queue
String? sge_extra_param
Int time = 1
Int memory_mb = 1024
String singularity_container
String? singularity_bindpath
"""
submit = """
ls ${singularity_container} $(echo ${singularity_bindpath} | tr , ' ') 1>/dev/null && (echo "chmod u+x ${script} && SINGULARITY_BINDPATH=$(echo ${cwd} | sed 's/cromwell-executions/\n/g' | head -n1),${singularity_bindpath} singularity exec --home ${cwd} ${if defined(gpu) then '--nv' else ''} ${singularity_container} ${script}" | qsub \
-S /bin/sh \
-terse \
-b n \
ls ${singularity_container} $(echo ${singularity_bindpath} | tr , ' ') 1>/dev/null && (echo "chmod u+x ${script} && SINGULARITY_BINDPATH=$(echo ${cwd} | sed 's/cromwell-executions/\n/g' | head -n1),${singularity_bindpath} singularity exec --cleanenv --home ${cwd} ${if defined(gpu) then '--nv' else ''} ${singularity_container} ${script}" | qsub \
-N ${job_name} \
-wd ${cwd} \
-o ${out} \
-e ${err} \
${if cpu>1 then "-pe " + sge_pe + " " + cpu else " "} \
${"-l h_vmem=" + memory_mb/cpu + "m"} \
${"-l s_vmem=" + memory_mb/cpu + "m"} \
${"-l h_rt=" + time*3600} \
${"-l s_rt=" + time*3600} \
${"-q " + sge_queue} \
${"-l gpu=" + gpu} \
${sge_extra_param} \
-V)
-l nodes=1:ppn=${cpu} \
-l mem=${memory_mb}MB \
-l walltime=${time}:0:0 \
${if gpu>1 then "-lngpus=" + gpu else ""} \
-V
)
"""
kill = "qdel ${job_id}"
check-alive = "qstat -j ${job_id}"
job-id-regex = "(\\d+)"
job-id-regex = "(\\d+).*"
}
}

Expand All @@ -96,7 +88,7 @@ backend {
String? singularity_bindpath
"""
submit = """
ls ${singularity_container} $(echo ${singularity_bindpath} | tr , ' ') 1>/dev/null && (chmod u+x ${script} && SINGULARITY_BINDPATH=$(echo ${cwd} | sed 's/cromwell-executions/\n/g' | head -n1),${singularity_bindpath} singularity exec --home ${cwd} ${if defined(gpu) then '--nv' else ''} ${singularity_container} ${script} & echo $! && disown)
ls ${singularity_container} $(echo ${singularity_bindpath} | tr , ' ') 1>/dev/null && (chmod u+x ${script} && SINGULARITY_BINDPATH=$(echo ${cwd} | sed 's/cromwell-executions/\n/g' | head -n1),${singularity_bindpath} singularity exec --cleanenv --home ${cwd} ${if defined(gpu) then '--nv' else ''} ${singularity_container} ${script} & echo $! && disown)
"""
job-id-regex = "(\\d+)"
check-alive = "ps -ef | grep -v grep | grep ${job_id}"
Expand All @@ -110,112 +102,6 @@ backend {
concurrent-job-limit = 10
}
}

sge {
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
script-epilogue = "sleep 30 && sync"
concurrent-job-limit = 50
runtime-attributes = """
String sge_pe = "shm"
Int cpu = 1
Int? gpu
Int? time
Int? memory_mb
String? sge_queue
String? sge_extra_param
"""
submit = """
qsub \
-S /bin/sh \
-terse \
-b n \
-N ${job_name} \
-wd ${cwd} \
-o ${out} \
-e ${err} \
${if cpu>1 then "-pe " + sge_pe + " " + cpu else " "} \
${"-l h_vmem=" + memory_mb/cpu + "m"} \
${"-l s_vmem=" + memory_mb/cpu + "m"} \
${"-l h_rt=" + time*3600} \
${"-l s_rt=" + time*3600} \
${"-q " + sge_queue} \
${"-l gpu=" + gpu} \
${sge_extra_param} \
-V \
${script}
"""
kill = "qdel ${job_id}"
check-alive = "qstat -j ${job_id}"
job-id-regex = "(\\d+)"
}
}

slurm {
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
script-epilogue = "sleep 30"
concurrent-job-limit = 50
runtime-attributes = """
Int cpu = 1
Int? gpu
Int? time
Int? memory_mb
String? slurm_partition
String? slurm_account
String? slurm_extra_param
"""
submit = """
sbatch \
--export=ALL \
-J ${job_name} \
-D ${cwd} \
-o ${out} \
-e ${err} \
${"-t " + time*60} \
-n 1 \
--ntasks-per-node=1 \
${"--cpus-per-task=" + cpu} \
${"--mem=" + memory_mb} \
${"-p " + slurm_partition} \
${"--account " + slurm_account} \
${"--gres gpu:" + gpu} \
${slurm_extra_param} \
--wrap "/bin/bash ${script}"
"""
kill = "scancel ${job_id}"
check-alive = "squeue -j ${job_id}"
job-id-regex = "Submitted batch job (\\d+).*"
}
}

google {
actor-factory = "cromwell.backend.impl.jes.JesBackendLifecycleActorFactory"
config {
# Google project
project = "your-project-name"

# Base bucket for workflow executions
root = "gs://your-bucket-name"

concurrent-job-limit = 1000
genomics-api-queries-per-100-seconds = 1000
maximum-polling-interval = 600

genomics {
auth = "application-default"
compute-service-account = "default"
endpoint-url = "https://genomics.googleapis.com/"
restrict-metadata-access = false
}

filesystems {
gcs {
auth = "application-default"
}
}
}
}
}
}

Expand All @@ -238,13 +124,3 @@ call-caching {
enabled = false
invalidate-bad-cache-results = true
}

google {
application-name = "cromwell"
auths = [
{
name = "application-default"
scheme = "application_default"
}
]
}
65 changes: 65 additions & 0 deletions encode-wrapper/backend_ihec_pbs_singularity.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
include required(classpath("application"))

backend {
default = "Local"
providers {

pbs_singularity {
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
script-epilogue = "sleep 30"
concurrent-job-limit = 50
runtime-attributes = """
Int cpu = 1
Int? gpu
Int time = 1
Int memory_mb = 1024
String singularity_container
String? singularity_bindpath
"""
submit = """
ls ${singularity_container} $(echo ${singularity_bindpath} | tr , ' ') 1>/dev/null && (echo "chmod u+x ${script} && SINGULARITY_BINDPATH=$(echo ${cwd} | sed 's/cromwell-executions/\n/g' | head -n1),${singularity_bindpath} singularity exec --cleanenv --home ${cwd} ${if defined(gpu) then '--nv' else ''} ${singularity_container} ${script}" | qsub \
-N ${job_name} \
-o ${out} \
-e ${err} \
-l nodes=1:ppn=${cpu} \
-l mem=${memory_mb}MB \
-l walltime=${time}:0:0 \
${if gpu>1 then "-lngpus=" + gpu else ""} \
-V
)
"""
kill = "qdel ${job_id}"
check-alive = "qstat -j ${job_id}"
job-id-regex = "(\\d+).*"
}
}

Local {
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
concurrent-job-limit = 10
}
}
}
}

services {
LoadController {
class = "cromwell.services.loadcontroller.impl.LoadControllerServiceActor"
config {
# disable it (for login nodes on Stanford SCG, Sherlock)
control-frequency = 21474834 seconds
}
}
}

system {
abort-jobs-on-terminate = true
graceful-server-shutdown = true
}

call-caching {
enabled = false
invalidate-bad-cache-results = true
}
Loading