From 4c700df19f457553dbe3a3d8d031417ab7a95c28 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Fri, 4 Jan 2019 08:28:25 +0100
Subject: [PATCH] Set OMP_NUM_THREADS=1 on all stages running ogs.

In multi-threaded environments multiple ctests running
parallel fight for the same cpu threads otherwise.
---
 Jenkinsfile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index 0b08b2b732a..9bc9ccdc7e2 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -82,6 +82,9 @@ pipeline {
               additionalBuildArgs '--pull'
             }
           }
+          environment {
+            OMP_NUM_THREADS = '1'
+          }
           steps {
             script {
               sh 'git submodule sync'
@@ -250,6 +253,7 @@ pipeline {
           environment {
             MSVC_NUMBER = '15'
             MSVC_VERSION = '2017'
+            OMP_NUM_THREADS = '1'
           }
           steps {
             script {
@@ -298,6 +302,9 @@ pipeline {
             expression { return stage_required.build || stage_required.full }
           }
           agent { label "mac"}
+          environment {
+            OMP_NUM_THREADS = '1'
+          }
           steps {
             script {
               sh 'git submodule sync'
-- 
GitLab