This is an archive of the discontinued LLVM Phabricator instance.

Enable OMPD tests
ClosedPublic

Authored by Vigneshbalu on Nov 21 2022, 3:21 AM.

Details

Summary

Enabling ompd tests that are disabled by this commit: https://github.com/llvm/llvm-project/commit/b5bf908fd7f87d2f0d74f62362a7e08366e926ff

This patch https://github.com/llvm/llvm-project/commit/1099498e3f35b2ad4b021ba3888b590259124e74 were failing differently in two different llvm-bots. Issues were failure at "cmake configuration" stage and test case failure at "openmp-offload-amdgpu-runtime"

Configuration issue: https://lab.llvm.org/buildbot/#/builders/84/builds/31109
Test case issues: https://lab.llvm.org/buildbot/#/builders/193/builds/21594 (couldn't reproduce locally)

This patch will make libompd build after libomptarget .
Configuration issue in debian machines seems to come from "find_package" of "libompd/test/CMakeLists.txt" which disables building DeviceRTL by messing up with "LLVM_DIR"
Also, I removed the code that looks for llvm-lit and filecheck as it is taken care by "OpenMPTesting.cmake"

Diff Detail

Event Timeline

Vigneshbalu created this revision.Nov 21 2022, 3:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2022, 3:21 AM
Herald added subscribers: kosarev, tpr. · View Herald Transcript
Vigneshbalu requested review of this revision.Nov 21 2022, 3:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2022, 3:21 AM

Gentle Reminder!

Vigneshbalu edited the summary of this revision. (Show Details)
ye-luo accepted this revision.Nov 29 2022, 10:19 AM

Seems fine in my builds of OpenMP as a project and a runtime.

This revision is now accepted and ready to land.Nov 29 2022, 10:19 AM

Checking the availability of GDB as well as it is required to run the tests.

Vigneshbalu reopened this revision.Dec 13 2022, 8:44 PM

Reopening as I am adding GDB changes.

This revision is now accepted and ready to land.Dec 13 2022, 8:44 PM
Vigneshbalu requested review of this revision.Dec 13 2022, 9:17 PM

@ye-luo would you please review it again ?
It fails when the machine doesn't have GDB, added the check for the same.

Gentle Reminder !

ye-luo accepted this revision.Dec 21 2022, 8:54 PM
This revision is now accepted and ready to land.Dec 21 2022, 8:54 PM

The test ompd-test::test_ompd_get_icv_from_scope.c is (still?) failing on the openmp-offload-cuda-runtime buildbot:

******************** TEST 'ompd-test :: api_tests/test_ompd_get_icv_from_scope.c' FAILED ********************
Script:
--
: 'RUN: at line 1';   /home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/./bin/clang -fopenmp -g -gdwarf-4 /home/buildbot-worker/src/llvm-project/openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c -o /home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/api_tests/Output/test_ompd_get_icv_from_scope.c.tmp  -I /home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.src/openmp/libompd/test -I /home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/runtimes/runtimes-bins/openmp/runtime/src  -L /home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/runtimes/runtimes-bins/openmp/runtime/src 2>&1 | tee /home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/api_tests/Output/test_ompd_get_icv_from_scope.c.tmp.compile
: 'RUN: at line 2';   env OMP_DEBUG=enabled gdb -x /home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/../gdb-plugin/python-module/ompd/__init__.py  -x /home/buildbot-worker/src/llvm-project/openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c.cmd /home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/api_tests/Output/test_ompd_get_icv_from_scope.c.tmp 2>&1 | tee /home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/api_tests/Output/test_ompd_get_icv_from_scope.c.tmp.out | /home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/./bin/FileCheck /home/buildbot-worker/src/llvm-project/openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c
--
Exit Code: 1
Command Output (stdout):
--
$ ":" "RUN: at line 1"
$ "/home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/./bin/clang" "-fopenmp" "-g" "-gdwarf-4" "/home/buildbot-worker/src/llvm-project/openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c" "-o" "/home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/api_tests/Output/test_ompd_get_icv_from_scope.c.tmp" "-I" "/home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.src/openmp/libompd/test" "-I" "/home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/runtimes/runtimes-bins/openmp/runtime/src" "-L" "/home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/runtimes/runtimes-bins/openmp/runtime/src"
$ "tee" "/home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/api_tests/Output/test_ompd_get_icv_from_scope.c.tmp.compile"
$ ":" "RUN: at line 2"
$ "env" "OMP_DEBUG=enabled" "gdb" "-x" "/home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/../gdb-plugin/python-module/ompd/__init__.py" "-x" "/home/buildbot-worker/src/llvm-project/openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c.cmd" "/home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/api_tests/Output/test_ompd_get_icv_from_scope.c.tmp"
$ "tee" "/home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins/openmp/libompd/test/api_tests/Output/test_ompd_get_icv_from_scope.c.tmp.out"
$ "/home/buildbot-worker/minipc-1050ti-linux/rundir/llvm.build/./bin/FileCheck" "/home/buildbot-worker/src/llvm-project/openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c"
# command stderr:
/home/buildbot-worker/src/llvm-project/openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c:29:15: error: CHECK-NOT: excluded string found in input
// CHECK-NOT: Failed
              ^
<stdin>:62:1: note: found here
Failed. with return code = 0
^~~~~~
Input file: <stdin>
Check file: /home/buildbot-worker/src/llvm-project/openmp/libompd/test/api_tests/test_ompd_get_icv_from_scope.c
-dump-input=help explains the following input dump.
Input was:
<<<<<<
        .
        .
        .
       57: Success. 
       58: Testing "ompd_get_icv_from_scope with thread_handle"... 
       59: Test: With Correct Arguments. 
       60: Success. 
       61: Test: with nthreads_var for ompd_rc_incomplete. 
       62: Failed. with return code = 0 
not:29     !~~~~~                        error: no match expected
       63: Testing "ompd_get_icv_from_scope with parallel_handle"... 
       64: Test: With Correct Arguments. 
       65: Success. 
       66: Testing "ompd_get_icv_from_scope with task_handle"... 
       67: Test: With Correct Arguments. 
        .
        .
        .
>>>>>>
error: command failed with exit status: 1
--
********************