[ARVADOS] created: 1.3.0-1711-g861599984
Git user
git at public.curoverse.com
Fri Oct 4 14:30:08 UTC 2019
at 861599984cc86e100bd1c6dc36500a6f2334052d (commit)
commit 861599984cc86e100bd1c6dc36500a6f2334052d
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Fri Oct 4 10:23:00 2019 -0400
15640: RunInSingleContainer needs minimum of 128 MiB RAM
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/sdk/cwl/arvados_cwl/arvworkflow.py b/sdk/cwl/arvados_cwl/arvworkflow.py
index c6bcd0477..604ad39de 100644
--- a/sdk/cwl/arvados_cwl/arvworkflow.py
+++ b/sdk/cwl/arvados_cwl/arvworkflow.py
@@ -295,6 +295,12 @@ class ArvadosWorkflow(Workflow):
self.loadingContext.metadata = self.loadingContext.metadata.copy()
self.loadingContext.metadata["http://commonwl.org/cwltool#original_cwlVersion"] = "v1.0"
+ if len(job_res_reqs) == 1:
+ # RAM request needs to be at least 128 MiB or the workflow
+ # runner itself won't run reliably.
+ if job_res_reqs[0].get("ramMin", 1024) < 128:
+ job_res_reqs[0]["ramMin"] = 128
+
wf_runner = cmap({
"class": "CommandLineTool",
"baseCommand": "cwltool",
diff --git a/sdk/cwl/tests/arvados-tests.yml b/sdk/cwl/tests/arvados-tests.yml
index 0eb606d25..99aee3795 100644
--- a/sdk/cwl/tests/arvados-tests.yml
+++ b/sdk/cwl/tests/arvados-tests.yml
@@ -179,6 +179,12 @@
tool: wf/runin-reqs-wf4.cwl
doc: "RunInSingleContainer discovers static resource request in subworkflow steps"
+- job: null
+ output:
+ out: null
+ tool: wf/runin-reqs-wf5.cwl
+ doc: "RunInSingleContainer has minimum 128 MiB RAM"
+
- job: secondaryFiles/inp3.yml
output: {}
tool: secondaryFiles/example1.cwl
diff --git a/sdk/cwl/tests/wf/runin-reqs-wf5.cwl b/sdk/cwl/tests/wf/runin-reqs-wf5.cwl
new file mode 100644
index 000000000..34d7b2c39
--- /dev/null
+++ b/sdk/cwl/tests/wf/runin-reqs-wf5.cwl
@@ -0,0 +1,62 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+class: Workflow
+cwlVersion: v1.0
+$namespaces:
+ arv: "http://arvados.org/cwl#"
+inputs:
+ count:
+ type: int[]
+ default: [1, 2, 3, 4]
+ script:
+ type: File
+ default:
+ class: File
+ location: check_mem.py
+outputs:
+ out: []
+requirements:
+ SubworkflowFeatureRequirement: {}
+ ScatterFeatureRequirement: {}
+ InlineJavascriptRequirement: {}
+ StepInputExpressionRequirement: {}
+hints:
+ DockerRequirement:
+ dockerPull: arvados/jobs:1.4.0.20190604172024
+steps:
+ substep:
+ in:
+ count: count
+ script: script
+ out: []
+ hints:
+ - class: arv:RunInSingleContainer
+ - class: arv:APIRequirement
+ scatter: count
+ run:
+ class: Workflow
+ id: mysub
+ inputs:
+ count: int
+ script: File
+ outputs: []
+ steps:
+ sleep1:
+ in:
+ count: count
+ script: script
+ out: []
+ run:
+ class: CommandLineTool
+ id: subtool
+ hints:
+ - class: ResourceRequirement
+ ramMin: 32
+ inputs:
+ count:
+ type: int
+ script: File
+ outputs: []
+ arguments: [python, $(inputs.script), "128"]
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list