Skip to content

Conversation

mhalk
Copy link
Contributor

@mhalk mhalk commented Jul 7, 2025

Description

OpenMP Tooling Interface Testing Library (ompTest) ompTest is a unit testing framework for testing OpenMP implementations. It offers a simple-to-use framework that allows a tester to check for OMPT events in addition to regular unit testing code, supported by linking against GoogleTest by default. It also facilitates writing concise tests while bridging the semantic gap between the unit under test and the OMPT-event testing.

Background

This library has been developed to provide the means of testing OMPT implementations with reasonable effort. Especially, asynchronous or unordered events are supported and can be verified with ease, which may prove to be challenging with LIT-based tests. Additionally, since the assertions are part of the code being tested, ompTest can reference all corresponding variables during assertion.

Basic Usage

OMPT event assertions are placed before the code, which shall be tested. These assertion can either be provided as one block or interleaved with the test code. There are two types of asserters: (1) sequenced "order-sensitive" and (2) set "unordered" assserters. Once the test is being run, the corresponding events are triggered by the OpenMP runtime and can be observed. Each of these observed events notifies asserters, which then determine if the test should pass or fail.

Example (partial, interleaved)

  int N = 100000;
  int a[N];
  int b[N];

  OMPT_ASSERT_SEQUENCE(Target, TARGET, BEGIN, 0);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, ALLOC, N * sizeof(int)); // a ?
  OMPT_ASSERT_SEQUENCE(TargetDataOp, H2D, N * sizeof(int), &a);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, ALLOC, N * sizeof(int)); // b ?
  OMPT_ASSERT_SEQUENCE(TargetDataOp, H2D, N * sizeof(int), &b);
  OMPT_ASSERT_SEQUENCE(TargetSubmit, 1);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, D2H, N * sizeof(int), nullptr, &b);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, D2H, N * sizeof(int), nullptr, &a);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, DELETE);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, DELETE);
  OMPT_ASSERT_SEQUENCE(Target, TARGET, END, 0);

#pragma omp target parallel for
  {
    for (int j = 0; j < N; j++)
      a[j] = b[j];
  }

References

This work has been presented at SC'24 workshops, see: https://ieeexplore.ieee.org/document/10820689

Current State and Future Work

ompTest's development was mostly device-centric and aimed at OMPT device callbacks and device-side tracing. Consequentially, a substantial part of host-related events or features may not be supported in its current state. However, we are confident that the related functionality can be added and ompTest provides a general foundation for future OpenMP and especially OMPT testing. This PR will allow us to upstream the corresponding features, like OMPT device-side tracing in the future with significantly reduced risk of introducing regressions in the process.

Build

ompTest is linked against LLVM's GoogleTest by default, but can also be built 'standalone'. Additionally, it comes with a set of unit tests, which in turn require GoogleTest (overriding a standalone build). The unit tests are added to the check-openmp target.

Use the following parameters to perform the corresponding build:
LIBOMPTEST_BUILD_STANDALONE (Default: ${OPENMP_STANDALONE_BUILD})
LIBOMPTEST_BUILD_UNITTESTS (Default: OFF)


@llvmbot llvmbot added openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime labels Jul 7, 2025
@mhalk
Copy link
Contributor Author

mhalk commented Jul 7, 2025

While being aware that this change is of substantial size, we chose to start the reviewing process to gather feedback.
If it is desired to provide this change in smaller chunks, please provide suggestions.

Also, please pull in other reviewers as needed.

@jplehr jplehr self-requested a review July 7, 2025 19:53
@jplehr
Copy link
Contributor

jplehr commented Jul 7, 2025

It seems we forgot to add the appropriate license statement in the source files.

@mhalk mhalk force-pushed the mhalk/feat/openmp-omptest-lib branch from ab941a7 to f024da4 Compare July 8, 2025 12:45
@mhalk
Copy link
Contributor Author

mhalk commented Jul 8, 2025

It seems we forgot to add the appropriate license statement in the source files.

Good catch, thanks for pointing that out. It should be corrected now :)

@jplehr
Copy link
Contributor

jplehr commented Jul 8, 2025

Maybe as an additional comment, given that it may not be obvious from the initial message: This is the first part of our efforts to upstream our OMPT device-tracing support from OpenMP offloading.

@jprotze
Copy link
Collaborator

jprotze commented Jul 8, 2025

Am I right, that the unittests in this PR are to test omptest itself, and not some specific event sequences from the OpenMP runtime library?

@mhalk
Copy link
Contributor Author

mhalk commented Jul 8, 2025

Am I right, that the unittests in this PR are to test omptest itself, and not some specific event sequences from the OpenMP runtime library?

Yes, correct.
Currently, these unit tests, while not exhaustive, provide some basic coverage and a starting point for further testing.

Copy link
Contributor

@jplehr jplehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments.

Copy link
Collaborator

@jprotze jprotze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments for the first files

@mhalk mhalk force-pushed the mhalk/feat/openmp-omptest-lib branch from daed795 to e0195f8 Compare July 22, 2025 14:54
Copy link
Collaborator

@JonChesterfield JonChesterfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is large, and the signal to noise is perhaps not optimal, but it represents a substantial step forward in terms of testing openmp.

I vote ship it as is and iterate in tree as needed. Worst case the framework will turn out to be broken and we delete it, best case it isolates bugs in the openmp implementation and leads to things working better.

Seems clear cut to me. Thanks!

@mhalk mhalk force-pushed the mhalk/feat/openmp-omptest-lib branch from e0195f8 to 1445028 Compare August 13, 2025 12:38
@mhalk mhalk force-pushed the mhalk/feat/openmp-omptest-lib branch from 1445028 to d61ab37 Compare August 13, 2025 18:06
@mhalk
Copy link
Contributor Author

mhalk commented Aug 13, 2025

Addressed all review feedback (I am aware of) so far -- thank you!

Copy link
Collaborator

@jprotze jprotze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @JonChesterfield, this PR is good to go as soon as you are happy with it :)

(GIthub shows 3 pending comments, but I cannot find them, so they are also a surprise to me 🤷 )

Copy link
Contributor

@mjklemm mjklemm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@hansangbae hansangbae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a few things in the comments.

@mhalk mhalk force-pushed the mhalk/feat/openmp-omptest-lib branch from d61ab37 to 37f625c Compare August 19, 2025 16:00
@mhalk mhalk force-pushed the mhalk/feat/openmp-omptest-lib branch from 7fc4620 to 91af3c2 Compare August 20, 2025 16:30
@mhalk
Copy link
Contributor Author

mhalk commented Aug 20, 2025

Opted to modernize the relevant CMake to make it more robust and usable.

@mjklemm mjklemm merged commit 35f01ce into llvm:main Aug 21, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime-2 running on rocm-worker-hw-02 while building openmp at step 5 "compile-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/11894

Here is the relevant piece of the build log for the reference
Step 5 (compile-openmp) failure: build (failure)
...
-- Building offloading runtime library libomptarget.
-- Performing Test PLATFORM_HAS_AMDGPU
-- Performing Test PLATFORM_HAS_AMDGPU - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins
108.515 [4/1/4706] No install step for 'runtimes-amdgcn-amd-amdhsa'
108.540 [3/1/4707] Performing build step for 'runtimes'
ninja: error: '/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it
108.568 [2/2/4708] Completed 'runtimes-amdgcn-amd-amdhsa'
FAILED: runtimes/runtimes-stamps/runtimes-build /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-stamps/runtimes-build 
cd /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building openmp at step 5 "compile-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/29268

Here is the relevant piece of the build log for the reference
Step 5 (compile-openmp) failure: build (failure)
...
-- Looking for __atomic_load_1 - not found
-- Looking for __atomic_load_1 in atomic
-- Looking for __atomic_load_1 in atomic - found
CMake Error at /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/tools/omptest/CMakeLists.txt:7 (cmake_minimum_required):
  CMake 3.22 or higher is required.  You are running version 3.20.4


-- Configuring incomplete, errors occurred!
See also "/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/runtimes/runtimes-bins/CMakeFiles/CMakeOutput.log".
See also "/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/runtimes/runtimes-bins/CMakeFiles/CMakeError.log".
FAILED: runtimes/runtimes-stamps/runtimes-configure 
cd /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/runtimes/runtimes-bins && /usr/bin/cmake --no-warn-unused-cli -DCMAKE_C_COMPILER=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang -DCMAKE_CXX_COMPILER=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang++ -DCMAKE_ASM_COMPILER=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang -DCMAKE_Fortran_COMPILER=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/flang -DCMAKE_LINKER=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/ld.lld -DCMAKE_AR=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/llvm-ar -DCMAKE_RANLIB=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/llvm-ranlib -DCMAKE_NM=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/llvm-nm -DCMAKE_OBJDUMP=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/llvm-objdump -DCMAKE_OBJCOPY=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/llvm-objcopy -DCMAKE_STRIP=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/llvm-strip -DCMAKE_READELF=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/llvm-readelf -DCMAKE_C_COMPILER_TARGET=x86_64-unknown-linux-gnu -DCMAKE_CXX_COMPILER_TARGET=x86_64-unknown-linux-gnu -DCMAKE_Fortran_COMPILER_TARGET=x86_64-unknown-linux-gnu -DCMAKE_ASM_COMPILER_TARGET=x86_64-unknown-linux-gnu -DCMAKE_INSTALL_PREFIX=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.inst -DLLVM_BINARY_DIR=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build -DLLVM_CONFIG_PATH=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/llvm-config -DLLVM_ENABLE_WERROR=OFF -DLLVM_HOST_TRIPLE=x86_64-unknown-linux-gnu -DLLVM_HAVE_LINK_VERSION_SCRIPT=1 -DLLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO=OFF -DLLVM_USE_RELATIVE_PATHS_IN_FILES=OFF -DLLVM_LIT_ARGS=-sv -DLLVM_SOURCE_PREFIX= -DPACKAGE_VERSION=22.0.0git -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCOMPILER_RT_BUILD_BUILTINS=Off -DLLVM_INCLUDE_TESTS=ON -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu -DLLVM_ENABLE_PROJECTS_USED=ON -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON -DLLVM_BUILD_TOOLS=ON -DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_CXX_COMPILER_WORKS=ON -DCMAKE_Fortran_COMPILER_WORKS=ON -DCMAKE_ASM_COMPILER_WORKS=ON -DHAVE_LLVM_LIT=ON -DCLANG_RESOURCE_DIR= "-DLLVM_ENABLE_RUNTIMES=offload;flang-rt;compiler-rt;openmp" -DFFI_INCLUDE_DIR= -DFFI_LIBRARY_DIR= -DFLANG_RUNTIME_F128_MATH_LIB= -DLIBOMP_FORTRAN_MODULES_COMPILER=/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/flang -DLIBOMP_MODULES_INSTALL_PATH=include/flang -GNinja -C/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/projects/runtimes/tmp/runtimes-cache-Release.cmake /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/runtimes/../../runtimes && /usr/bin/cmake -E touch /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/runtimes/runtimes-stamps//runtimes-configure
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-out-of-tree running on linaro-flang-aarch64-out-of-tree while building openmp at step 6 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/53/builds/19242

Here is the relevant piece of the build log for the reference
Step 6 (build-unified-tree) failure: build (failure)
...
293.546 [18/44/675] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o
293.559 [18/43/676] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_sched.cpp.o
293.586 [18/42/677] Building CXX object compiler-rt/lib/xray/CMakeFiles/RTXrayFDR.aarch64.dir/xray_fdr_logging.cpp.o
293.648 [16/43/678] Linking CXX static library /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/build_llvm/lib/clang/22/lib/aarch64-unknown-linux-gnu/libclang_rt.xray-fdr.a
293.700 [16/42/679] Linking CXX static library compiler-rt/lib/xray/tests/libRTXRay.test.aarch64.a
293.739 [16/41/680] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o
293.811 [16/40/681] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o
293.980 [16/39/682] Building C object openmp/libompd/gdb-plugin/CMakeFiles/ompdModule.dir/ompdModule.c.o
294.035 [15/39/683] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerCrossOver.cpp.o
294.086 [15/38/684] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o
FAILED: openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/build_llvm/./bin/clang++ --target=aarch64-unknown-linux-gnu -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domptest_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/openmp/tools/omptest/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC -UNDEBUG -MD -MT openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -MF openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o.d -o openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/openmp/tools/omptest/src/OmptTester.cpp
In file included from /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/openmp/tools/omptest/src/OmptTester.cpp:17:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/openmp/tools/omptest/include/OmptTester.h:49:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/openmp/tools/omptest/include/OmptTesterGoogleTest.h:27:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest.h:64:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-assertion-result.h:46:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-message.h:57:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/gtest-port.h:312:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h:37:
/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h:43:10: fatal error: 'llvm/Support/raw_os_ostream.h' file not found
   43 | #include "llvm/Support/raw_os_ostream.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
294.125 [15/37/685] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_barrier.cpp.o
294.142 [15/36/686] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.aarch64.dir/wrappers_cpp.cpp.o
294.150 [15/35/687] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptAssertEvent.cpp.o
/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/openmp/tools/omptest/src/OmptAssertEvent.cpp:27:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
   27 |   default:
      |   ^
1 warning generated.
294.200 [15/34/688] Linking C shared module openmp/libompd/gdb-plugin/python-module/ompd/ompdModule.so
294.223 [15/33/689] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerUtilLinux.cpp.o
294.237 [15/32/690] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_dispatch.cpp.o
294.252 [15/31/691] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-aarch64.dir/wrappers_cpp.cpp.o
294.275 [15/30/692] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_tasking.cpp.o
294.309 [15/29/693] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/Logging.cpp.o
294.377 [15/28/694] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerUtil.cpp.o
294.452 [15/27/695] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerUtilPosix.cpp.o
294.580 [15/26/696] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/TargetValue.cpp.o
294.603 [15/25/697] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerIO.cpp.o
294.667 [15/24/698] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-aarch64.dir/wrappers_c.cpp.o
294.685 [15/23/699] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_runtime.cpp.o
294.907 [15/22/700] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-aarch64.dir/wrappers_c.cpp.o
295.007 [15/21/701] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptCallbackHandler.cpp.o
295.148 [15/20/702] Building CXX object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/run_program_wrapper.cpp.o
295.216 [15/19/703] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/InternalEvent.cpp.o
295.238 [15/18/704] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone_cxx-aarch64.dir/wrappers_cpp.cpp.o
295.251 [15/17/705] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-libcxx running on linaro-flang-aarch64-libcxx while building openmp at step 6 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/89/builds/21760

Here is the relevant piece of the build log for the reference
Step 6 (build-unified-tree) failure: build (failure)
...
416.129 [16/1/720] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/InternalEvent.cpp.o
416.289 [14/2/721] Linking CXX static library openmp/tools/archer/libarcher_static.a
426.817 [14/1/722] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/Logging.cpp.o
429.737 [12/2/723] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptAssertEvent.cpp.o
/home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/openmp/tools/omptest/src/OmptAssertEvent.cpp:27:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
   27 |   default:
      |   ^
1 warning generated.
442.141 [12/1/724] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptAsserter.cpp.o
444.473 [10/2/725] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o
FAILED: openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build_llvm/./bin/clang++ --target=aarch64-unknown-linux-gnu -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domptest_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/openmp/tools/omptest/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC -UNDEBUG -MD -MT openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -MF openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o.d -o openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/openmp/tools/omptest/src/OmptTester.cpp
In file included from /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/openmp/tools/omptest/src/OmptTester.cpp:17:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/openmp/tools/omptest/include/OmptTester.h:49:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/openmp/tools/omptest/include/OmptTesterGoogleTest.h:27:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest.h:64:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-assertion-result.h:46:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-message.h:57:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/gtest-port.h:312:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h:37:
/home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h:43:10: fatal error: 'llvm/Support/raw_os_ostream.h' file not found
   43 | #include "llvm/Support/raw_os_ostream.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
444.714 [10/1/726] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptCallbackHandler.cpp.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/runtimes-stamps/runtimes-build /home/tcwg-buildbot/worker/flang-aarch64-libcxx/build_llvm/runtimes/runtimes-stamps/runtimes-build 
cd /home/tcwg-buildbot/worker/flang-aarch64-libcxx/build_llvm/runtimes/runtimes-bins && /usr/local/bin/cmake --build .
ninja: build stopped: subcommand failed.

jplehr added a commit that referenced this pull request Aug 21, 2025
Reverts #147381

A few buildbot failures for different reasons.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-ubuntu-22-cmake-build-only running on rocm-docker-ubu-22 while building openmp at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/20606

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
  /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/flang-rt/CMakeLists.txt:32 (CMAKE_FORCE_Fortran_COMPILER)


-- quadmath.h found in Clang's selected GCC installation
-- Configuring done
-- Generating done
-- Build files have been written to: /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/runtimes/runtimes-bins
[8022/8026] Linking CXX executable bin/bbc
[8023/8026] Performing build step for 'runtimes'
ninja: error: '/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it
FAILED: runtimes/runtimes-stamps/runtimes-build /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
  CMAKE_Fortran_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/flang-rt/CMakeLists.txt:32 (CMAKE_FORCE_Fortran_COMPILER)
-- quadmath.h found in Clang's selected GCC installation
-- Configuring done
-- Generating done
-- Build files have been written to: /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/runtimes/runtimes-bins
[8022/8026] Linking CXX executable bin/bbc
[8023/8026] Performing build step for 'runtimes'
ninja: error: '/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it
FAILED: runtimes/runtimes-stamps/runtimes-build /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=416.881293

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-8-cmake-build-only running on rocm-docker-rhel-8 while building openmp at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/204/builds/19418

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
CMake Warning at /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/offload/unittests/Conformance/tests/CMakeLists.txt:2 (message):
  Cannot run conformance tests without the LLVM C library


-- quadmath.h found in Clang's selected GCC installation
-- Configuring done (1.0s)
-- Generating done (0.2s)
-- Build files have been written to: /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-bins
[8023/8026] Performing build step for 'runtimes'
ninja: error: '/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it
FAILED: runtimes/runtimes-stamps/runtimes-build /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
-- Building the llvm-omp-kernel-replay tool
-- Building offloading runtime library libomptarget.
CMake Warning at /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/offload/unittests/Conformance/tests/CMakeLists.txt:2 (message):
  Cannot run conformance tests without the LLVM C library
-- quadmath.h found in Clang's selected GCC installation
-- Configuring done (1.0s)
-- Generating done (0.2s)
-- Build files have been written to: /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-bins
[8023/8026] Performing build step for 'runtimes'
ninja: error: '/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it
FAILED: runtimes/runtimes-stamps/runtimes-build /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=394.750182

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-9-cmake-build-only running on rocm-docker-rhel-9 while building openmp at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/19395

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
  Cannot run conformance tests without the LLVM C library


-- quadmath.h found in Clang's selected GCC installation
-- Configuring done (1.5s)
-- Generating done (0.2s)
-- Build files have been written to: /home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/runtimes/runtimes-bins
[8022/8026] Linking CXX executable bin/bbc
[8023/8026] Performing build step for 'runtimes'
ninja: error: '/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it
FAILED: runtimes/runtimes-stamps/runtimes-build /home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
-- Building offloading runtime library libomptarget.
CMake Warning at /home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-project/offload/unittests/Conformance/tests/CMakeLists.txt:2 (message):
  Cannot run conformance tests without the LLVM C library
-- quadmath.h found in Clang's selected GCC installation
-- Configuring done (1.5s)
-- Generating done (0.2s)
-- Build files have been written to: /home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/runtimes/runtimes-bins
[8022/8026] Linking CXX executable bin/bbc
[8023/8026] Performing build step for 'runtimes'
ninja: error: '/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it
FAILED: runtimes/runtimes-stamps/runtimes-build /home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=444.009501

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Aug 21, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-dylib running on linaro-flang-aarch64-dylib while building openmp at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/15478

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
278.048 [169/19/671] Building ASM object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/sysv_reenter.x86-64.S.o
278.064 [169/18/672] Building ASM object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/elfnix_tls.x86-64.S.o
278.082 [169/17/673] Building ASM object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/elfnix_tls.ppc64.S.o
278.160 [169/16/674] Generating omp_lib.mod, omp_lib_kinds.mod
278.383 [169/15/675] Building ASM object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/elfnix_tls.aarch64.S.o
278.842 [169/14/676] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/InternalEventOperators.cpp.o
278.936 [169/13/677] Building C object openmp/libompd/gdb-plugin/CMakeFiles/ompdModule.dir/ompdModule.c.o
280.221 [169/12/678] Building CXX object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/resolve.cpp.o
280.343 [161/19/679] Building CXX object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/dlfcn_wrapper.cpp.o
280.807 [155/24/680] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o
FAILED: openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domptest_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/tools/omptest/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC -UNDEBUG -MD -MT openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -MF openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o.d -o openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/tools/omptest/src/OmptTester.cpp
In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/tools/omptest/src/OmptTester.cpp:17:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/tools/omptest/include/OmptTester.h:49:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/tools/omptest/include/OmptTesterGoogleTest.h:27:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest.h:64:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-assertion-result.h:46:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-message.h:57:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/gtest-port.h:312:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h:37:
/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h:43:10: fatal error: 'llvm/Support/raw_os_ostream.h' file not found
   43 | #include "llvm/Support/raw_os_ostream.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
280.838 [155/23/681] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o
280.927 [155/22/682] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_itt.cpp.o
280.975 [155/21/683] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_debug.cpp.o
281.076 [155/20/684] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptAssertEvent.cpp.o
/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/tools/omptest/src/OmptAssertEvent.cpp:27:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
   27 |   default:
      |   ^
1 warning generated.
281.142 [155/19/685] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_environment.cpp.o
281.224 [155/18/686] Building CXX object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/run_program_wrapper.cpp.o
281.237 [155/17/687] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_io.cpp.o
281.270 [155/16/688] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/Logging.cpp.o
281.278 [155/15/689] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_error.cpp.o
281.322 [155/14/690] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_i18n.cpp.o
281.744 [155/13/691] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_str.cpp.o
281.756 [155/12/692] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptCallbackHandler.cpp.o
282.093 [155/11/693] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_alloc.cpp.o
282.405 [155/10/694] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/InternalEvent.cpp.o
283.192 [155/9/695] Building CXX object openmp/tools/archer/CMakeFiles/archer_static.dir/ompt-tsan.cpp.o
283.243 [155/8/696] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o
283.536 [155/7/697] Building CXX object openmp/tools/archer/CMakeFiles/archer.dir/ompt-tsan.cpp.o
283.687 [155/6/698] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptAsserter.cpp.o
284.457 [155/5/699] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_tasking.cpp.o
284.650 [155/4/700] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_runtime.cpp.o
284.947 [155/3/701] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-release running on linaro-flang-aarch64-release while building openmp at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/172/builds/14637

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
363.066 [133/3/723] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptAssertEvent.cpp.o
/home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/openmp/tools/omptest/src/OmptAssertEvent.cpp:27:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
   27 |   default:
      |   ^
1 warning generated.
363.732 [133/2/724] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/Logging.cpp.o
366.042 [132/2/725] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptAsserter.cpp.o
367.619 [132/1/726] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptCallbackHandler.cpp.o
371.098 [130/2/727] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/TargetValue.cpp.o
371.780 [130/1/728] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o
FAILED: openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-release/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domptest_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/openmp/tools/omptest/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC -MD -MT openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -MF openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o.d -o openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/openmp/tools/omptest/src/OmptTester.cpp
In file included from /home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/openmp/tools/omptest/src/OmptTester.cpp:17:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/openmp/tools/omptest/include/OmptTester.h:49:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/openmp/tools/omptest/include/OmptTesterGoogleTest.h:27:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest.h:64:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-assertion-result.h:46:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-message.h:57:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/gtest-port.h:312:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h:37:
/home/tcwg-buildbot/worker/flang-aarch64-release/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h:43:10: fatal error: 'llvm/Support/raw_os_ostream.h' file not found
   43 | #include "llvm/Support/raw_os_ostream.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
FAILED: runtimes/runtimes-stamps/runtimes-build /home/tcwg-buildbot/worker/flang-aarch64-release/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/tcwg-buildbot/worker/flang-aarch64-release/build/runtimes/runtimes-bins && /usr/local/bin/cmake --build .
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-sharedlibs running on linaro-flang-aarch64-sharedlibs while building openmp at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/80/builds/15531

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
-- Found Backtrace: /usr/include  
-- Looking for sinl in m
-- Looking for sinl in m - found
-- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS
-- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS - Success
-- Configuring done (156.7s)
-- Generating done (1.8s)
-- Build files have been written to: /home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/runtimes/runtimes-bins
5048.580 [2/1/7832] Performing build step for 'runtimes'
ninja: error: '/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it
FAILED: runtimes/runtimes-stamps/runtimes-build /home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/runtimes/runtimes-bins && /usr/local/bin/cmake --build .
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-rel-assert running on linaro-flang-aarch64-rel-assert while building openmp at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/29/builds/16021

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
5.169 [152/72/635] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptAssertEvent.cpp.o
/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/tools/omptest/src/OmptAssertEvent.cpp:27:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
   27 |   default:
      |   ^
1 warning generated.
5.229 [152/71/636] Building CXX object compiler-rt/lib/xray/CMakeFiles/RTXrayFDR.aarch64.dir/xray_fdr_logging.cpp.o
5.296 [152/70/637] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/internal-unit.cpp.o
5.301 [152/69/638] Building CXX object compiler-rt/lib/hwasan/CMakeFiles/RTHwasan_dynamic.aarch64.dir/hwasan_interceptors.cpp.o
5.392 [152/68/639] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/derived-api.cpp.o
5.422 [152/67/640] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o
FAILED: openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domptest_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/tools/omptest/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC -UNDEBUG -MD -MT openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -MF openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o.d -o openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/tools/omptest/src/OmptTester.cpp
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/tools/omptest/src/OmptTester.cpp:17:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/tools/omptest/include/OmptTester.h:49:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/tools/omptest/include/OmptTesterGoogleTest.h:27:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest.h:64:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-assertion-result.h:46:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-message.h:57:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/gtest-port.h:312:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h:37:
/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h:43:10: fatal error: 'llvm/Support/raw_os_ostream.h' file not found
   43 | #include "llvm/Support/raw_os_ostream.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
5.461 [152/66/641] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerCrossOver.cpp.o
5.483 [152/65/642] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-aarch64.dir/wrappers_cpp.cpp.o
5.590 [152/64/643] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerUtilLinux.cpp.o
5.604 [152/63/644] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-aarch64.dir/wrappers_c.cpp.o
5.658 [152/62/645] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/environment.cpp.o
5.660 [152/61/646] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/array-constructor.cpp.o
5.683 [152/60/647] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/Logging.cpp.o
5.692 [152/59/648] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerUtilPosix.cpp.o
5.754 [152/58/649] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/io-error.cpp.o
5.766 [152/57/650] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptCallbackHandler.cpp.o
5.782 [152/56/651] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerIO.cpp.o
5.891 [152/55/652] Building CXX object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/run_program_wrapper.cpp.o
5.925 [152/54/653] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/file.cpp.o
5.948 [152/53/654] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/ragged.cpp.o
5.960 [152/52/655] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-aarch64.dir/wrappers_c.cpp.o
5.972 [152/51/656] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/stat.cpp.o
5.993 [152/50/657] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerUtil.cpp.o
6.204 [152/49/658] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/memory.cpp.o
6.233 [152/48/659] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/inquiry.cpp.o
6.242 [152/47/660] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/misc-intrinsic.cpp.o
6.372 [152/46/661] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/InternalEvent.cpp.o
6.400 [152/45/662] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/flang/lib/Decimal/binary-to-decimal.cpp.o
6.501 [152/44/663] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/flang/lib/Decimal/decimal-to-binary.cpp.o
6.541 [152/43/664] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/pointer.cpp.o
6.547 [152/42/665] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/numeric.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 21, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-debug-reverse-iteration running on linaro-flang-aarch64-debug-reverse-iteration while building openmp at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/20/builds/12854

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
163.135 [134/81/644] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCxxWrappers.aarch64.dir/wrappers_cpp.cpp.o
163.675 [131/83/645] Generating version list for clang_rt.hwasan-dynamic-aarch64
164.396 [131/82/646] Generating exported symbols for clang_rt.dfsan-aarch64
164.579 [131/81/647] Generating exported symbols for clang_rt.hwasan-aarch64
165.543 [131/80/648] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/work-queue.cpp.o
165.935 [131/79/649] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/Logging.cpp.o
166.710 [131/78/650] Building CXX object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/run_program_wrapper.cpp.o
167.395 [131/77/651] Building CXX object compiler-rt/lib/hwasan/CMakeFiles/RTHwasan_dynamic.aarch64.dir/hwasan_interceptors.cpp.o
170.310 [131/76/652] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptCallbackHandler.cpp.o
172.918 [131/75/653] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o
FAILED: openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domptest_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/openmp/tools/omptest/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -g -std=c++17 -fPIC -MD -MT openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -MF openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o.d -o openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/openmp/tools/omptest/src/OmptTester.cpp
In file included from /home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/openmp/tools/omptest/src/OmptTester.cpp:17:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/openmp/tools/omptest/include/OmptTester.h:49:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/openmp/tools/omptest/include/OmptTesterGoogleTest.h:27:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest.h:64:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-assertion-result.h:46:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-message.h:57:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/gtest-port.h:312:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h:37:
/home/tcwg-buildbot/worker/flang-aarch64-debug-reverse-iteration/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h:43:10: fatal error: 'llvm/Support/raw_os_ostream.h' file not found
   43 | #include "llvm/Support/raw_os_ostream.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
174.081 [131/74/654] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/derived-api.cpp.o
177.776 [131/73/655] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerUtilLinux.cpp.o
178.302 [131/72/656] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/complex-powi.cpp.o
178.388 [131/71/657] Building CXX object compiler-rt/lib/orc/CMakeFiles/RTOrc.aarch64.dir/resolve.cpp.o
179.021 [131/70/658] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/environment.cpp.o
180.205 [131/69/659] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/connection.cpp.o
180.584 [131/68/660] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-aarch64.dir/wrappers_cpp.cpp.o
182.746 [131/67/661] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/edit-input.cpp.o
183.855 [131/66/662] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-aarch64.dir/wrappers_c.cpp.o
184.357 [131/65/663] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/inquiry.cpp.o
184.921 [131/64/664] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerCrossOver.cpp.o
185.344 [131/63/665] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/ragged.cpp.o
185.449 [131/62/666] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-aarch64.dir/wrappers_c.cpp.o
186.267 [131/61/667] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/io-error.cpp.o
186.311 [131/60/668] Building CXX object compiler-rt/lib/scudo/standalone/CMakeFiles/RTScudoStandaloneCWrappers.aarch64.dir/wrappers_c.cpp.o
188.649 [131/59/669] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/memory.cpp.o
189.046 [131/58/670] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerIO.cpp.o
190.341 [131/57/671] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/type-info.cpp.o
190.602 [131/56/672] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/pointer.cpp.o
191.082 [131/55/673] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/stat.cpp.o
191.291 [131/54/674] Building CXX object compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.aarch64.dir/FuzzerUtil.cpp.o
191.640 [131/53/675] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/time-intrinsic.cpp.o
191.691 [131/52/676] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/random.cpp.o
192.522 [131/51/677] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/misc-intrinsic.cpp.o
193.268 [131/50/678] Building CXX object openmp/tools/archer/CMakeFiles/archer_static.dir/ompt-tsan.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 22, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-latest-gcc running on linaro-flang-aarch64-latest-gcc while building openmp at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/15043

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
-- Found Backtrace: /usr/include  
-- Looking for sinl in m
-- Looking for sinl in m - found
-- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS
-- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS - Success
-- Configuring done (518.6s)
-- Generating done (0.4s)
-- Build files have been written to: /home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/runtimes/runtimes-bins
3208.149 [2/1/7638] Performing build step for 'runtimes'
ninja: error: '/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/lib/libllvm_gtest.a', needed by 'openmp/tools/omptest/libomptest.so', missing and no known rule to make it
FAILED: runtimes/runtimes-stamps/runtimes-build /home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/runtimes/runtimes-bins && /usr/local/bin/cmake --build .
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 22, 2025

LLVM Buildbot has detected a new failure on builder ppc64le-flang-rhel-clang running on ppc64le-flang-rhel-test while building openmp at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/37474

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
5.761 [6/74/53] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/omp-icv.cpp.o
6.006 [6/73/54] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/ragged.cpp.o
6.087 [6/72/55] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/derived-api.cpp.o
6.124 [6/71/56] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/environment.cpp.o
6.171 [6/70/57] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/thirdparty/ittnotify/ittnotify_static.cpp.o
6.216 [6/69/58] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/io-error.cpp.o
6.232 [6/68/59] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/stat.cpp.o
6.253 [6/67/60] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_sched.cpp.o
6.356 [6/66/61] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/internal-unit.cpp.o
6.369 [6/65/62] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o
FAILED: openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/bin/clang++ --target=powerpc64le-unknown-linux-gnu -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domptest_EXPORTS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/openmp/tools/omptest/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC -UNDEBUG -MD -MT openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -MF openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o.d -o openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptTester.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/openmp/tools/omptest/src/OmptTester.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/openmp/tools/omptest/src/OmptTester.cpp:17:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/openmp/tools/omptest/include/OmptTester.h:49:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/openmp/tools/omptest/include/OmptTesterGoogleTest.h:27:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest.h:64:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-assertion-result.h:46:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-message.h:57:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/gtest-port.h:312:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h:37:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h:43:10: fatal error: 'llvm/Support/raw_os_ostream.h' file not found
   43 | #include "llvm/Support/raw_os_ostream.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
6.384 [6/64/63] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_collapse.cpp.o
6.407 [6/63/64] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/array-constructor.cpp.o
6.433 [6/62/65] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o
6.485 [6/61/66] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/work-queue.cpp.o
6.562 [6/60/67] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/file.cpp.o
6.605 [6/59/68] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptAssertEvent.cpp.o
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/openmp/tools/omptest/src/OmptAssertEvent.cpp:27:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
   27 |   default:
      |   ^
1 warning generated.
6.713 [6/58/69] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/misc-intrinsic.cpp.o
6.880 [6/57/70] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/memory.cpp.o
6.941 [6/56/71] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/command.cpp.o
7.097 [6/55/72] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o
7.320 [6/54/73] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o
7.337 [6/53/74] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/pointer.cpp.o
7.421 [6/52/75] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/execute.cpp.o
7.516 [6/51/76] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/inquiry.cpp.o
7.537 [6/50/77] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/TargetValue.cpp.o
7.612 [6/49/78] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/Logging.cpp.o
7.685 [6/48/79] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/type-info.cpp.o
7.689 [6/47/80] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/stop.cpp.o
7.715 [6/46/81] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/descriptor.cpp.o
7.898 [6/45/82] Building CXX object openmp/tools/omptest/CMakeFiles/omptest.dir/src/OmptCallbackHandler.cpp.o
7.952 [6/44/83] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/pseudo-unit.cpp.o

jplehr added a commit that referenced this pull request Aug 22, 2025
Reland of #147381

Added changes to fix observed BuildBot failures:
 * CMake version (reduced minimum to `3.20`, was: `3.22`)
 * GoogleTest linking (missing `./build/lib/libllvm_gtest.a`)
* Related header issue (missing `#include
"llvm/Support/raw_os_ostream.h"`)

Original message

Description
===========
OpenMP Tooling Interface Testing Library (ompTest) ompTest is a unit testing framework for testing OpenMP implementations. It offers a simple-to-use framework that allows a tester to check for OMPT events in addition to regular unit testing code, supported by linking against GoogleTest by default. It also facilitates writing concise tests while bridging the semantic gap between the unit under test and the OMPT-event testing.

Background
==========
This library has been developed to provide the means of testing OMPT implementations with reasonable effort. Especially, asynchronous or unordered events are supported and can be verified with ease, which may prove to be challenging with LIT-based tests. Additionally, since the assertions are part of the code being tested, ompTest can reference all corresponding variables during assertion.

Basic Usage
===========
OMPT event assertions are placed before the code, which shall be tested. These assertion can either be provided as one block or interleaved with the test code. There are two types of asserters: (1) sequenced "order-sensitive" and (2) set "unordered" assserters. Once the test is being run, the corresponding events are triggered by the OpenMP runtime and can be observed. Each of these observed events notifies asserters, which then determine if the test should pass or fail.

Example (partial, interleaved)
==============================
```c++
  int N = 100000;
  int a[N];
  int b[N];

  OMPT_ASSERT_SEQUENCE(Target, TARGET, BEGIN, 0);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, ALLOC, N * sizeof(int)); // a ?
  OMPT_ASSERT_SEQUENCE(TargetDataOp, H2D, N * sizeof(int), &a);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, ALLOC, N * sizeof(int)); // b ?
  OMPT_ASSERT_SEQUENCE(TargetDataOp, H2D, N * sizeof(int), &b);
  OMPT_ASSERT_SEQUENCE(TargetSubmit, 1);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, D2H, N * sizeof(int), nullptr, &b);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, D2H, N * sizeof(int), nullptr, &a);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, DELETE);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, DELETE);
  OMPT_ASSERT_SEQUENCE(Target, TARGET, END, 0);

#pragma omp target parallel for
  {
    for (int j = 0; j < N; j++)
      a[j] = b[j];
  }
```

References
==========
This work has been presented at SC'24 workshops, see: https://ieeexplore.ieee.org/document/10820689

Current State and Future Work
=============================
ompTest's development was mostly device-centric and aimed at OMPT device callbacks and device-side tracing. Consequentially, a substantial part of host-related events or features may not be supported in its current state. However, we are confident that the related functionality can be added and ompTest provides a general foundation for future OpenMP and especially OMPT testing. This PR will allow us to upstream the corresponding features, like OMPT device-side tracing in the future with significantly reduced risk of introducing regressions in the process.

Build
=====
ompTest is linked against LLVM's GoogleTest by default, but can also be built 'standalone'. Additionally, it comes with a set of unit tests, which in turn require GoogleTest (overriding a standalone build). The unit tests are added to the `check-openmp` target.

Use the following parameters to perform the corresponding build: 
`LIBOMPTEST_BUILD_STANDALONE` (Default: ${OPENMP_STANDALONE_BUILD})
`LIBOMPTEST_BUILD_UNITTESTS` (Default: OFF)

---------

Co-authored-by: Jan-Patrick Lehr <JanPatrick.Lehr@amd.com>
Co-authored-by: Joachim <protze@rz.rwth-aachen.de>
Co-authored-by: Joachim Jenke <jenke@itc.rwth-aachen.de>
searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Aug 22, 2025
This is a downstream PR replacing upstream: llvm#147381

Description
===========
OpenMP Tooling Interface Testing Library (ompTest) ompTest is a unit testing framework for testing OpenMP implementations. It offers a simple-to-use framework that allows a tester to check for OMPT events in addition to regular unit testing code, supported by linking against GoogleTest by default. It also facilitates writing concise tests while bridging the semantic gap between the unit under test and the OMPT-event testing.

Background
==========
This library has been developed to provide the means of testing OMPT implementations with reasonable effort. Especially, asynchronous or unordered events are supported and can be verified with ease, which may prove to be challenging with LIT-based tests. Additionally, since the assertions are part of the code being tested, ompTest can reference all corresponding variables during assertion.

Basic Usage
===========
OMPT event assertions are placed before the code, which shall be tested. These assertion can either be provided as one block or interleaved with the test code. There are two types of asserters: (1) sequenced "order-sensitive" and (2) set "unordered" assserters. Once the test is being run, the corresponding events are triggered by the OpenMP runtime and can be observed. Each of these observed events notifies asserters, which then determine if the test should pass or fail.

Example (partial, interleaved)
==============================

```c++
  int N = 100000;
  int a[N];
  int b[N];

  OMPT_ASSERT_SEQUENCE(Target, TARGET, BEGIN, 0);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, ALLOC, N * sizeof(int)); // a ?
  OMPT_ASSERT_SEQUENCE(TargetDataOp, H2D, N * sizeof(int), &a);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, ALLOC, N * sizeof(int)); // b ?
  OMPT_ASSERT_SEQUENCE(TargetDataOp, H2D, N * sizeof(int), &b);
  OMPT_ASSERT_SEQUENCE(TargetSubmit, 1);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, D2H, N * sizeof(int), nullptr, &b);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, D2H, N * sizeof(int), nullptr, &a);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, DELETE);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, DELETE);
  OMPT_ASSERT_SEQUENCE(Target, TARGET, END, 0);

#pragma omp target parallel for
  {
    for (int j = 0; j < N; j++)
      a[j] = b[j];
  }
```

References
==========
This work has been presented at SC'24 workshops, see: https://ieeexplore.ieee.org/document/10820689

Current State and Future Work
=============================
ompTest's development was mostly device-centric and aimed at OMPT device callbacks and device-side tracing. Consequentially, a substantial part of host-related events or features may not be supported in its current state. However, we are confident that the related functionality can be added and ompTest provides a general foundation for future OpenMP and especially OMPT testing. This PR will allow us to upstream the corresponding features, like OMPT device-side tracing in the future with significantly reduced risk of introducing regressions in the process.

Build
=====
ompTest is linked against LLVM's GoogleTest by default, but can also be built 'standalone'. Additionally, it comes with a set of unit tests, which in turn require GoogleTest (overriding a standalone build). The unit tests are added to the `check-openmp` target.

Use the following parameters to perform the corresponding build:
`LIBOMPTEST_BUILD_STANDALONE` (Default: OFF)
`LIBOMPTEST_BUILD_UNITTESTS` (Default: OFF)

---------

Depends: ROCm/aomp#1535
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Aug 22, 2025
Reland of llvm/llvm-project#147381

Added changes to fix observed BuildBot failures:
 * CMake version (reduced minimum to `3.20`, was: `3.22`)
 * GoogleTest linking (missing `./build/lib/libllvm_gtest.a`)
* Related header issue (missing `#include
"llvm/Support/raw_os_ostream.h"`)

Original message

Description
===========
OpenMP Tooling Interface Testing Library (ompTest) ompTest is a unit testing framework for testing OpenMP implementations. It offers a simple-to-use framework that allows a tester to check for OMPT events in addition to regular unit testing code, supported by linking against GoogleTest by default. It also facilitates writing concise tests while bridging the semantic gap between the unit under test and the OMPT-event testing.

Background
==========
This library has been developed to provide the means of testing OMPT implementations with reasonable effort. Especially, asynchronous or unordered events are supported and can be verified with ease, which may prove to be challenging with LIT-based tests. Additionally, since the assertions are part of the code being tested, ompTest can reference all corresponding variables during assertion.

Basic Usage
===========
OMPT event assertions are placed before the code, which shall be tested. These assertion can either be provided as one block or interleaved with the test code. There are two types of asserters: (1) sequenced "order-sensitive" and (2) set "unordered" assserters. Once the test is being run, the corresponding events are triggered by the OpenMP runtime and can be observed. Each of these observed events notifies asserters, which then determine if the test should pass or fail.

Example (partial, interleaved)
==============================
```c++
  int N = 100000;
  int a[N];
  int b[N];

  OMPT_ASSERT_SEQUENCE(Target, TARGET, BEGIN, 0);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, ALLOC, N * sizeof(int)); // a ?
  OMPT_ASSERT_SEQUENCE(TargetDataOp, H2D, N * sizeof(int), &a);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, ALLOC, N * sizeof(int)); // b ?
  OMPT_ASSERT_SEQUENCE(TargetDataOp, H2D, N * sizeof(int), &b);
  OMPT_ASSERT_SEQUENCE(TargetSubmit, 1);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, D2H, N * sizeof(int), nullptr, &b);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, D2H, N * sizeof(int), nullptr, &a);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, DELETE);
  OMPT_ASSERT_SEQUENCE(TargetDataOp, DELETE);
  OMPT_ASSERT_SEQUENCE(Target, TARGET, END, 0);

#pragma omp target parallel for
  {
    for (int j = 0; j < N; j++)
      a[j] = b[j];
  }
```

References
==========
This work has been presented at SC'24 workshops, see: https://ieeexplore.ieee.org/document/10820689

Current State and Future Work
=============================
ompTest's development was mostly device-centric and aimed at OMPT device callbacks and device-side tracing. Consequentially, a substantial part of host-related events or features may not be supported in its current state. However, we are confident that the related functionality can be added and ompTest provides a general foundation for future OpenMP and especially OMPT testing. This PR will allow us to upstream the corresponding features, like OMPT device-side tracing in the future with significantly reduced risk of introducing regressions in the process.

Build
=====
ompTest is linked against LLVM's GoogleTest by default, but can also be built 'standalone'. Additionally, it comes with a set of unit tests, which in turn require GoogleTest (overriding a standalone build). The unit tests are added to the `check-openmp` target.

Use the following parameters to perform the corresponding build:
`LIBOMPTEST_BUILD_STANDALONE` (Default: ${OPENMP_STANDALONE_BUILD})
`LIBOMPTEST_BUILD_UNITTESTS` (Default: OFF)

---------

Co-authored-by: Jan-Patrick Lehr <JanPatrick.Lehr@amd.com>
Co-authored-by: Joachim <protze@rz.rwth-aachen.de>
Co-authored-by: Joachim Jenke <jenke@itc.rwth-aachen.de>
# Install library and export targets.
# Note: find_package(omptest) may require setting of PATH_SUFFIXES
# Example: "lib/cmake/openmp/omptest", this is due to the install location
install(TARGETS omptest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being installed? If I understand correctly, this is a testing library for implementors (i.e. for use by LLVM developers) not for openmp users, so I would not expect it to get installed, just like other testing libraries and binaries.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhalk I agree, it should not be installed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, agreed, I'll guard it so it is only installed when people actively request it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out, PR is up: #155433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants