[Openmp-commits] [PATCH] D82963: [OpenMP] Temporarily disable failing runtime and ompt tests for OpenMP 5.0

Saiyedul Islam via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 2 09:42:32 PDT 2020


saiislam updated this revision to Diff 275148.
saiislam added a comment.
Herald added a subscriber: mgorny.

Thanks @Hahnfeld. I realized that LLVM_MAJOR_VERSION was neither getting set in OpenMPTesting.cmake nor was it
inheriting it from anywhere else. So, OPENMP_TEST_COMPILER_VERSION_MAJOR was also getting set as empty, which
was getting propagated to lit by config.test_compiler_features. That is why "clang-11" was not getting recognized
as a valid target by lit-unsupported (though clang-11.0.0 would have worked). This change should fix this issue.

Thanks @protze.joachim. I have removed dependences.c from this patch and will wait for D82267 <https://reviews.llvm.org/D82267> to land.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82963

Files:
  openmp/cmake/OpenMPTesting.cmake
  openmp/runtime/test/env/kmp_set_dispatch_buf.c
  openmp/runtime/test/lit.cfg
  openmp/runtime/test/worksharing/for/kmp_set_dispatch_buf.c


Index: openmp/runtime/test/worksharing/for/kmp_set_dispatch_buf.c
===================================================================
--- openmp/runtime/test/worksharing/for/kmp_set_dispatch_buf.c
+++ openmp/runtime/test/worksharing/for/kmp_set_dispatch_buf.c
@@ -3,6 +3,7 @@
 // RUN: %libomp-run 1 && %libomp-run 2 && %libomp-run 5
 // RUN: %libomp-compile -DMY_SCHEDULE=guided && %libomp-run 7
 // RUN: %libomp-run 1 && %libomp-run 2 && %libomp-run 5
+// UNSUPPORTED: clang-11
 #include <stdio.h>
 #include <omp.h>
 #include <stdlib.h>
Index: openmp/runtime/test/lit.cfg
===================================================================
--- openmp/runtime/test/lit.cfg
+++ openmp/runtime/test/lit.cfg
@@ -111,7 +111,6 @@
 if 'INTEL_LICENSE_FILE' in os.environ:
     config.environment['INTEL_LICENSE_FILE'] = os.environ['INTEL_LICENSE_FILE']
 
-
 # substitutions
 config.substitutions.append(("%libomp-compile-and-run", \
     "%libomp-compile && %libomp-run"))
Index: openmp/runtime/test/env/kmp_set_dispatch_buf.c
===================================================================
--- openmp/runtime/test/env/kmp_set_dispatch_buf.c
+++ openmp/runtime/test/env/kmp_set_dispatch_buf.c
@@ -1,9 +1,15 @@
-// RUN: %libomp-compile && env KMP_DISP_NUM_BUFFERS=0 %libomp-run
-// RUN: env KMP_DISP_NUM_BUFFERS=1 %libomp-run && env KMP_DISP_NUM_BUFFERS=3 %libomp-run
-// RUN: env KMP_DISP_NUM_BUFFERS=4 %libomp-run && env KMP_DISP_NUM_BUFFERS=7 %libomp-run
-// RUN: %libomp-compile -DMY_SCHEDULE=guided && env KMP_DISP_NUM_BUFFERS=1 %libomp-run
-// RUN: env KMP_DISP_NUM_BUFFERS=3 %libomp-run && env KMP_DISP_NUM_BUFFERS=4 %libomp-run
+// RUN: %libomp-compile
+// RUN: env KMP_DISP_NUM_BUFFERS=0 %libomp-run
+// RUN: env KMP_DISP_NUM_BUFFERS=1 %libomp-run
+// RUN: env KMP_DISP_NUM_BUFFERS=3 %libomp-run
+// RUN: env KMP_DISP_NUM_BUFFERS=4 %libomp-run
 // RUN: env KMP_DISP_NUM_BUFFERS=7 %libomp-run
+// RUN: %libomp-compile -DMY_SCHEDULE=guided
+// RUN: env KMP_DISP_NUM_BUFFERS=1 %libomp-run
+// RUN: env KMP_DISP_NUM_BUFFERS=3 %libomp-run
+// RUN: env KMP_DISP_NUM_BUFFERS=4 %libomp-run
+// RUN: env KMP_DISP_NUM_BUFFERS=7 %libomp-run
+// UNSUPPORTED: clang-11
 #include <stdio.h>
 #include <omp.h>
 #include <stdlib.h>
Index: openmp/cmake/OpenMPTesting.cmake
===================================================================
--- openmp/cmake/OpenMPTesting.cmake
+++ openmp/cmake/OpenMPTesting.cmake
@@ -133,8 +133,18 @@
   set(OPENMP_TEST_COMPILER_ID "Clang")
   # Cannot use CLANG_VERSION because we are not guaranteed that this is already set.
   set(OPENMP_TEST_COMPILER_VERSION "${LLVM_VERSION}")
-  set(OPENMP_TEST_COMPILER_VERSION_MAJOR "${LLVM_MAJOR_VERSION}")
-  set(OPENMP_TEST_COMPILER_VERSION_MAJOR_MINOR "${LLVM_MAJOR_VERSION}.${LLVM_MINOR_VERSION}")
+  
+  # Determine major version in case llvm major version is not set.
+  if(${LLVM_MAJOR_VERSION})
+    set(OPENMP_TEST_COMPILER_VERSION_MAJOR "${LLVM_MAJOR_VERSION}")
+    set(OPENMP_TEST_COMPILER_VERSION_MAJOR_MINOR "${LLVM_MAJOR_VERSION}.${LLVM_MINOR_VERSION}")
+  else()
+    string(REGEX MATCH "[0-9]+" major "${LLVM_VERSION}")
+    string(REGEX MATCH "[0-9]+\\.[0-9]+" majorminor "${LLVM_VERSION}")
+    set(OPENMP_TEST_COMPILER_VERSION_MAJOR "${major}")
+    set(OPENMP_TEST_COMPILER_VERSION_MAJOR_MINOR "${majorminor}")
+  endif()
+
   # Unfortunately the top-level cmake/config-ix.cmake file mangles CMake's
   # CMAKE_THREAD_LIBS_INIT variable from the FindThreads package, so work
   # around that, until it is fixed there.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82963.275148.patch
Type: text/x-patch
Size: 3503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200702/1eef75c3/attachment.bin>


More information about the Openmp-commits mailing list