[Openmp-commits] [PATCH] D74921: Detect and disable openmp tests that require multiple hardware processor to run when only one core is available.

serge via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Feb 21 05:11:57 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG99b03c1c18de: Detect and disable openmp tests that require multiple hardware processor to run (authored by serge-sans-paille).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74921/new/

https://reviews.llvm.org/D74921

Files:
  openmp/runtime/test/lit.cfg
  openmp/runtime/test/ompt/teams/parallel_team.c
  openmp/runtime/test/ompt/teams/serial_teams.c


Index: openmp/runtime/test/ompt/teams/serial_teams.c
===================================================================
--- openmp/runtime/test/ompt/teams/serial_teams.c
+++ 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"
 
Index: openmp/runtime/test/ompt/teams/parallel_team.c
===================================================================
--- openmp/runtime/test/ompt/teams/parallel_team.c
+++ 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"
 
Index: openmp/runtime/test/lit.cfg
===================================================================
--- openmp/runtime/test/lit.cfg
+++ openmp/runtime/test/lit.cfg
@@ -100,6 +100,13 @@
 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']


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74921.245823.patch
Type: text/x-patch
Size: 1417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200221/6cb2b3e4/attachment.bin>


More information about the Openmp-commits mailing list