[Openmp-commits] [openmp] 99b03c1 - Detect and disable openmp tests that require multiple hardware processor to run
via Openmp-commits
openmp-commits at lists.llvm.org
Fri Feb 21 05:03:11 PST 2020
Author: serge-sans-paille
Date: 2020-02-21T14:02:12+01:00
New Revision: 99b03c1c18de3e4228e31ef04d38f2d530d335be
URL: https://github.com/llvm/llvm-project/commit/99b03c1c18de3e4228e31ef04d38f2d530d335be
DIFF: https://github.com/llvm/llvm-project/commit/99b03c1c18de3e4228e31ef04d38f2d530d335be.diff
LOG: Detect and disable openmp tests that require multiple hardware processor to run
Team tests seem to require at least two physical cores, and using the same trick
as in https://reviews.llvm.org/D55598 doesn't work (why?) .
Using lit configuration instead.
Differential Revision: https://reviews.llvm.org/D74921
Added:
Modified:
openmp/runtime/test/lit.cfg
openmp/runtime/test/ompt/teams/parallel_team.c
openmp/runtime/test/ompt/teams/serial_teams.c
Removed:
################################################################################
diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index 8ff668aaaa00..8e15a38e625b 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -100,6 +100,13 @@ if config.operating_system == 'NetBSD':
if config.operating_system in ['Linux', 'Windows']:
config.available_features.add('affinity')
+import multiprocessing
+try:
+ if multiprocessing.cpu_count() > 1:
+ config.available_features.add('multicpu')
+except NotImplementedError:
+ pass
+
# to run with icc INTEL_LICENSE_FILE must be set
if 'INTEL_LICENSE_FILE' in os.environ:
config.environment['INTEL_LICENSE_FILE'] = os.environ['INTEL_LICENSE_FILE']
diff --git a/openmp/runtime/test/ompt/teams/parallel_team.c b/openmp/runtime/test/ompt/teams/parallel_team.c
index 15d9b6c24dd9..96ce0d542eb4 100644
--- a/openmp/runtime/test/ompt/teams/parallel_team.c
+++ b/openmp/runtime/test/ompt/teams/parallel_team.c
@@ -1,5 +1,5 @@
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
-// REQUIRES: ompt
+// REQUIRES: ompt, multicpu
// UNSUPPORTED: gcc
#include "callback.h"
diff --git a/openmp/runtime/test/ompt/teams/serial_teams.c b/openmp/runtime/test/ompt/teams/serial_teams.c
index 64d0c895898b..abd3db531626 100644
--- a/openmp/runtime/test/ompt/teams/serial_teams.c
+++ b/openmp/runtime/test/ompt/teams/serial_teams.c
@@ -1,5 +1,5 @@
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
-// REQUIRES: ompt
+// REQUIRES: ompt, multicpu
// UNSUPPORTED: gcc
#include "callback.h"
More information about the Openmp-commits
mailing list