From 7bf6a5a2752b07a73cd39a99b23ad52e21d2a188 Mon Sep 17 00:00:00 2001
From: Adrian Schmitz <a.schmitz@itc.rwth-aachen.de>
Date: Mon, 9 Jan 2023 10:44:43 +0100
Subject: [PATCH] merge fix

Signed-off-by: Adrian Schmitz <a.schmitz@itc.rwth-aachen.de>
---
 .template.yml | 41 ++++++++++++++++-------------------------
 1 file changed, 16 insertions(+), 25 deletions(-)

diff --git a/.template.yml b/.template.yml
index 9d8ebc9..546b1eb 100644
--- a/.template.yml
+++ b/.template.yml
@@ -34,14 +34,14 @@ default:
   tags: [$RUNNER_TAG]
 
 variables:
-  SLURM_ENV_SLURM_TIMELIMIT: "00:05:00"
-  SLURM_ENV_SLURM_PARTITION: "c18m_low"
-  SLURM_ENV_SRUN_CPUS_PER_TASK: "1"
+  SLURM_PARAM_TIMELIMIT: "-t 05:00"
+  SLURM_PARAM_PARTITION: "-p c18m_low"
+  SLURM_PARAM_CPUS: "-c 1"
   GIT_STRATEGY: clone
 
 .parallel-job:
   variables:
-    SLURM_ENV_SRUN_CPUS_PER_TASK: "2"
+    SLURM_PARAM_CPUS: "-c 2"
     CI_MODE: "SingleSlurmJobAcrossStages"
   parallel:
     matrix:
@@ -50,12 +50,12 @@ variables:
 
 .sequential-job:
   variables:
-    SLURM_ENV_SRUN_CPUS_PER_TASK: "1"
+    SLURM_PARAM_CPUS: "-c 1"
     CI_MODE: "Slurm"
 
 .shared-sequential-job:
   variables:
-    SLURM_ENV_SRUN_CPUS_PER_TASK: "1"
+    SLURM_PARAM_CPUS: "-c 1"
     CI_MODE: "SingleSlurmJobAcrossStages"
 
 parallel-build-job:       # This job runs in the build stage, which runs first.
@@ -63,7 +63,7 @@ parallel-build-job:       # This job runs in the build stage, which runs first.
   stage: build
   variables:
     BEGIN_SINGLE_SLURM_JOB: "1"
-    SLURM_ENV_SLURM_TIMELIMIT: "00:15:00"
+    SLURM_PARAM_TIMELIMIT: "-t 10:30"
   script:
     - echo "JOBID ${SLURM_JOB_ID}"
     - echo "NODELIST ${SLURM_JOB_NODELIST}"
@@ -169,7 +169,7 @@ fail-exit-code-job-Singularity:       # This job runs in the build stage, which
 fail-timeout-job-Singularity:       # This job runs in the build stage, which runs first.
   stage: fail                 # MUST FAIL
   variables:
-    SLURM_ENV_SLURM_TIMELIMIT: "00:00:30"
+    SLURM_PARAM_TIMELIMIT: "-t 00:30"
     CI_MODE: "Singularity"
     CONTAINER: "tensorflow"
   script:
@@ -186,7 +186,7 @@ fail-exit-code-job:       # This job runs in the build stage, which runs first.
 fail-timeout-job:       # This job runs in the build stage, which runs first.
   stage: fail                 # MUST FAIL
   variables:
-    SLURM_ENV_SLURM_TIMELIMIT: "00:00:30"
+    SLURM_PARAM_TIMELIMIT: "-t 00:30"
   script:
     - echo "Compiling the code..."
     - sleep 1200
@@ -195,7 +195,7 @@ fail-timeout-job:       # This job runs in the build stage, which runs first.
 build-job:       # This job runs in the build stage, which runs first.
   stage: build
   variables:
-    SLURM_ENV_SRUN_CPUS_PER_TASK: "2"
+    SLURM_PARAM_CPUS: "-c 2"
   script:
     - echo "Compiling the code..."
     - echo "Compile complete."
@@ -203,7 +203,7 @@ build-job:       # This job runs in the build stage, which runs first.
 build-job-Singularity:       # This job runs in the build stage, which runs first.
   stage: build
   variables:
-    SLURM_ENV_SRUN_CPUS_PER_TASK: "2"
+    SLURM_PARAM_CPUS: "-c 2"
     CI_MODE: "Singularity"
     CONTAINER: "tensorflow"
   script:
@@ -215,7 +215,7 @@ build-job-Singularity:       # This job runs in the build stage, which runs firs
 build-job-Singularity-Batch:       # This job runs in the build stage, which runs first.
   stage: build
   variables:
-    SLURM_PARAM1: "-n2"
+    SLURM_PARAM_TASKS: "-n 2"
     CI_MODE: "Singularity_Batch"
     CONTAINER: "tensorflow"
   script:
@@ -253,7 +253,7 @@ fail-batch-job:       # This job runs in the build stage, which runs first.
 unit-test-job:   # This job runs in the test stage.
   stage: test    # It only starts when the job in the build stage completes successfully.
   variables:
-    SLURM_ENV_SRUN_CPUS_PER_TASK: "4"
+    SLURM_PARAM_CPUS: "-c 4"
   script:
     - echo "Running unit tests... This will take about 10 seconds."
     - sleep 10
@@ -262,7 +262,7 @@ unit-test-job:   # This job runs in the test stage.
 lint-test-job:   # This job also runs in the test stage.
   stage: test    # It can run at the same time as unit-test-job (in parallel).
   variables:
-    SLURM_ENV_SRUN_CPUS_PER_TASK: "8"
+    SLURM_PARAM_CPUS: "-c 8"
   script:
     - echo "Linting code... This will take about 10 seconds."
     - sleep 10
@@ -271,16 +271,7 @@ lint-test-job:   # This job also runs in the test stage.
 fail-slurm-parameter-test:   # This job also runs in the test stage.
   stage: fail    # It can run at the same time as unit-test-job (in parallel).
   variables:
-    SLURM_PARAM1: "-A gwogh" # non existing account
-  script:
-    - echo $SLURM_ACCOUNT
-    - echo "No lint issues found."
-  allow_failure: true
-
-fail-slurm-wrong-parameter-test:   # This job also runs in the test stage.
-  stage: fail    # It can run at the same time as unit-test-job (in parallel).
-  variables:
-    SLURM_ENV_ACCOUNT: "serv0002"
+    SLURM_PARAM_ACCOUNT: "-A gwogh" # non existing account
   script:
     - echo $SLURM_ACCOUNT
     - echo "No lint issues found."
@@ -289,7 +280,7 @@ fail-slurm-wrong-parameter-test:   # This job also runs in the test stage.
 slurm-parameter-test:   # This job also runs in the test stage.
   stage: test    # It can run at the same time as unit-test-job (in parallel).
   variables:
-    SLURM_ENV_SLURM_NPROCS: "2"
+    SLURM_PARAM_CPUS: "-c 2"
   script:
     - echo "No lint issues found."
 
-- 
GitLab