aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ravanan/command-line-tool.scm10
-rw-r--r--ravanan/workflow.scm15
2 files changed, 20 insertions, 5 deletions
diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm
index c943881..5bb9dac 100644
--- a/ravanan/command-line-tool.scm
+++ b/ravanan/command-line-tool.scm
@@ -62,7 +62,9 @@
%command-line-tool-supported-requirements
scheduler-proc
scheduler-proc-name
- scheduler-proc-cwl))
+ scheduler-proc-cwl
+ scheduler-proc-scatter
+ scheduler-proc-scatter-method))
(define %store-files-directory
"files")
@@ -96,10 +98,12 @@
(exit #f))
(define-immutable-record-type <scheduler-proc>
- (scheduler-proc name cwl)
+ (scheduler-proc name cwl scatter scatter-method)
scheduler-proc?
(name scheduler-proc-name)
- (cwl scheduler-proc-cwl))
+ (cwl scheduler-proc-cwl)
+ (scatter scheduler-proc-scatter)
+ (scatter-method scheduler-proc-scatter-method))
(define-immutable-record-type <single-machine-job-state>
(single-machine-job-state script success?)
diff --git a/ravanan/workflow.scm b/ravanan/workflow.scm
index 2ecc4e6..50052cb 100644
--- a/ravanan/workflow.scm
+++ b/ravanan/workflow.scm
@@ -126,7 +126,7 @@ requirements and hints of the step."
"Convert @code{CommandLineTool} workflow @var{cwl} of @var{name} to a
propagator."
(propagator name
- (scheduler-proc name cwl)
+ (scheduler-proc name cwl %nothing %nothing)
(vector-map->list (lambda (input)
(cons (assoc-ref input "id")
(assoc-ref input "id")))
@@ -199,7 +199,18 @@ their own namespaces."
(assoc-ref step "run"))))
(propagator (prefix-name step-id
(propagator-name step-propagator))
- (propagator-proc step-propagator)
+ ;; Augment proc with scatter and scatter method.
+ (let ((proc (propagator-proc step-propagator)))
+ (scheduler-proc
+ (scheduler-proc-name proc)
+ (scheduler-proc-cwl proc)
+ (maybe-assoc-ref (just step) "scatter")
+ (maybe-let* ((scatter-method
+ (maybe-assoc-ref (just step) "scatterMethod")))
+ (just (assoc-ref* '(("dotproduct" . dot-product)
+ ("nested_crossproduct" . nested-cross-product)
+ ("flat_crossproduct" . flat-cross-product))
+ scatter-method)))))
(assoc-ref step "in")
(propagator-optional-inputs step-propagator)
(vector-map->list (lambda (output-name)