From 3c326a4c0ddcfd9fb207c96c257ee52133016283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kowalczyk?= Date: Tue, 29 Sep 2020 18:00:36 +0200 Subject: [PATCH] [LibOS] regression: Fix OpenMP test on systems with a lot of cores --- LibOS/shim/test/regression/openmp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LibOS/shim/test/regression/openmp.c b/LibOS/shim/test/regression/openmp.c index dbb849af..20a8f100 100644 --- a/LibOS/shim/test/regression/openmp.c +++ b/LibOS/shim/test/regression/openmp.c @@ -6,7 +6,10 @@ int v[10]; int main(void) { -#pragma omp parallel for + /* We need to limit the number of threads, otherwise OpenMP spawns as many threads as available + * logical cores on the machine, which may exceed the TCS count specified in the manifest. + */ +#pragma omp parallel for num_threads(10) for (int i = 0; i < 10; i++) { v[i] = i; }