cromwell SGE配置

支持平台

cromwell安装后可以直接进行单机,单节点的任务投递。

1
java -jar cromwell.jar run pipeline.wdl -i pipeline.json

但是 cromwell 不仅支持本地计算机任务调度,同时支持集群/云计算作业管理系统。cromwell针对包含 SGE、AWS、Docker 在内的等多种平台和容器均提供了配置文件模板,可以通过简单的配置实现基于各平台的调度。

  • Cloud Providers

    • AWS: Amazon Web Services (documentation)
    • TES: is a backend that submits jobs to a server with protocol defined by GA4GH (documentation)
    • PAPIv2: Google Pipelines API backend (version 2!) (documentation)
  • Containers

    • Docker: an example backend that only runs workflows with docker in every command
    • Singularity: run Singularity containers locally (documentation)
    • Singularity+Slurm: An example using Singularity with SLURM (documentation)
    • TESK is the same, but intended for Kubernetes. See the TES docs at the bottom.
    • udocker: to interact with udocker locally documentation
    • udocker+Slurm: to interact with udocker on SLURM (documentation)
  • Workflow Managers

集群配置

SGE

官方针对不同的集群/云作业管理系统提供了相关的配置文件(https://github.com/broadinstitute/cromwell/tree/develop/cromwell.example.backends),但是本质都是讲调度命令嵌入其中。
**作业调度系统的配置文件并非完整的配置文件,必须添加到 [cromwell.examples.conf](https://github.com/broadinstitute/cromwell/blob/develop/cromwell.example.backends/cromwell.examples.confhttps://github.com/broadinstitute/cromwell/blob/develop/cromwell.example.backends/cromwell.examples.conf) 的 backend 部分才可以正常工作**

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
# cromwell.sge.config
# 完整配置文件
include required(classpath("application"))

backend {
default = SGE
providers {
SGE {
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
concurrent-job-limit = 5


runtime-attributes = """
Int cpu = 1
Float? memory_gb
String? sge_queue
String? sge_project
"""

submit = """
qsub \
-terse \
-V \
-b y \
-N ${job_name} \
-wd ${cwd} \
-o ${out}.qsub \
-e ${err}.qsub \
-pe smp ${cpu} \
${"-l mem_free=" + memory_gb + "g"} \
${"-q " + sge_queue} \
/usr/bin/env bash ${script}
"""

kill = "qdel ${job_id}"
check-alive = "qstat -j ${job_id}"
job-id-regex = "(\\d+)"


}
}
}
}

使用sge进行任务投递

1
java -Dconfig.file=cromwell.examples.conf -jar /home/liubo4/software/cromwell-84.jar run helloword.wdl -i helloword.wdl.input.json

SGE&docker

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
# cromwell.sge.docker.config
# 完整配置文件
include required(classpath("application"))

backend {
default = SGE
providers {
SGE {
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
concurrent-job-limit = 5


runtime-attributes = """
Int cpu = 1
Float? memory_gb
String? sge_queue
String? sge_project
"""

submit = """
qsub \
-terse \
-V \
-b y \
-N ${job_name} \
-wd ${cwd} \
-o ${out}.qsub \
-e ${err}.qsub \
-pe smp ${cpu} \
${"-l mem_free=" + memory_gb + "g"} \
${"-q " + sge_queue} \
/usr/bin/env bash ${script}
"""

kill = "qdel ${job_id}"
check-alive = "qstat -j ${job_id}"
job-id-regex = "(\\d+)"


}
}
}
}

reference

Cromwell ReadtheDoc SGE
Cromwell Example Backends
[https://blog.csdn.net/tanzuozhev/article/details/120629170]

-------------本文结束感谢您的阅读-------------