From bfb361766f799cf362e452d61908e7ad363919b4 Mon Sep 17 00:00:00 2001
From: Frits Sweijen <fritssweijen@hotmail.com>
Date: Mon, 23 Oct 2023 08:57:27 +0000
Subject: [PATCH] Use max_dp3_threads as coresMin for steps that take this
 input

---
 steps/applybeam.cwl       | 2 +-
 steps/applycal.cwl        | 2 +-
 steps/ddecal.cwl          | 2 +-
 steps/dp3_addcol.cwl      | 2 +-
 steps/dp3_prep_cal.cwl    | 2 +-
 steps/dp3_prep_target.cwl | 2 +-
 steps/filter_predict.cwl  | 2 +-
 steps/gaincal.cwl         | 2 +-
 steps/predict.cwl         | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/steps/applybeam.cwl b/steps/applybeam.cwl
index 13e73947..f360dcdd 100644
--- a/steps/applybeam.cwl
+++ b/steps/applybeam.cwl
@@ -102,7 +102,7 @@ requirements:
         writable: true
   - class: InlineJavascriptRequirement
   - class: ResourceRequirement
-    coresMin: 4
+    coresMin: $(inputs.max_dp3_threads)
 hints:
   - class: DockerRequirement
     dockerPull: 'astronrd/linc'
diff --git a/steps/applycal.cwl b/steps/applycal.cwl
index 4158aa11..808f888c 100644
--- a/steps/applycal.cwl
+++ b/steps/applycal.cwl
@@ -112,7 +112,7 @@ requirements:
         writable: true
   - class: InlineJavascriptRequirement
   - class: ResourceRequirement
-    coresMin: 4
+    coresMin: $(inputs.max_dp3_threads)
 hints:
   - class: DockerRequirement
     dockerPull: 'astronrd/linc'
diff --git a/steps/ddecal.cwl b/steps/ddecal.cwl
index eb43e709..016ff570 100644
--- a/steps/ddecal.cwl
+++ b/steps/ddecal.cwl
@@ -286,7 +286,7 @@ hints:
 requirements:
   - class: InlineJavascriptRequirement
   - class: ResourceRequirement
-    coresMin: 2
+    coresMin: $(inputs.max_dp3_threads)
 
 stdout: ddecal.log
 stderr: ddecal_err.log
diff --git a/steps/dp3_addcol.cwl b/steps/dp3_addcol.cwl
index efeab21b..c3feb7ea 100644
--- a/steps/dp3_addcol.cwl
+++ b/steps/dp3_addcol.cwl
@@ -56,7 +56,7 @@ requirements:
       - entry: $(inputs.msin)
         writable: true
   - class: ResourceRequirement
-    coresMin: 2
+    coresMin: $(inputs.max_dp3_threads)
 hints:
   - class: DockerRequirement
     dockerPull: astronrd/linc
diff --git a/steps/dp3_prep_cal.cwl b/steps/dp3_prep_cal.cwl
index 2a8f7883..98cc6c96 100755
--- a/steps/dp3_prep_cal.cwl
+++ b/steps/dp3_prep_cal.cwl
@@ -122,4 +122,4 @@ stderr: DP3_err.log
 requirements:
   - class: InlineJavascriptRequirement
   - class: ResourceRequirement
-    coresMin: 8
+    coresMin: $(inputs.max_dp3_threads)
diff --git a/steps/dp3_prep_target.cwl b/steps/dp3_prep_target.cwl
index e24b977d..3d080d08 100755
--- a/steps/dp3_prep_target.cwl
+++ b/steps/dp3_prep_target.cwl
@@ -178,4 +178,4 @@ stderr: DP3_err.log
 requirements:
   - class: InlineJavascriptRequirement
   - class: ResourceRequirement
-    coresMin: 4
+    coresMin: $(inputs.max_dp3_threads)
diff --git a/steps/filter_predict.cwl b/steps/filter_predict.cwl
index 3429f0a7..ab3aedde 100644
--- a/steps/filter_predict.cwl
+++ b/steps/filter_predict.cwl
@@ -129,7 +129,7 @@ requirements:
     inplaceUpdate: true
   - class: InlineJavascriptRequirement
   - class: ResourceRequirement
-    coresMin: 1
+    coresMin: $(inputs.max_dp3_threads)
 hints:
   - class: DockerRequirement
     dockerPull: astronrd/linc
diff --git a/steps/gaincal.cwl b/steps/gaincal.cwl
index 4f32aafc..e8061e72 100644
--- a/steps/gaincal.cwl
+++ b/steps/gaincal.cwl
@@ -187,6 +187,6 @@ requirements:
     inplaceUpdate: true
   - class: InlineJavascriptRequirement
   - class: ResourceRequirement
-    coresMin: 2
+    coresMin: $(inputs.max_dp3_threads)
 $schema:
   - 'https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl'
diff --git a/steps/predict.cwl b/steps/predict.cwl
index 53f76043..33114b9c 100644
--- a/steps/predict.cwl
+++ b/steps/predict.cwl
@@ -117,7 +117,7 @@ requirements:
         writable: true
   - class: InlineJavascriptRequirement
   - class: ResourceRequirement
-    coresMin: 2
+    coresMin: $(inputs.max_dp3_threads)
 hints:
   - class: DockerRequirement
     dockerPull: astronrd/linc
-- 
GitLab