[flang-commits] [flang] [Flang][runtime] Distinguish CPU time and elapsed time for cpu_time and system_clock (PR #96652)
LLVM Continuous Integration via flang-commits
flang-commits at lists.llvm.org
Tue Jul 2 09:40:34 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `flang` at step 5 "compile-openmp".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/1277
Here is the relevant piece of the build log for the reference:
```
Step 5 (compile-openmp) failure: build (failure)
...
26.462 [903/32/5905] Linking CXX executable bin/llvm-debuginfod
26.464 [902/32/5906] Building CXX object tools/llvm-size/CMakeFiles/llvm-size.dir/llvm-size.cpp.o
26.477 [901/32/5907] Building CXX object tools/llvm-symbolizer/CMakeFiles/llvm-symbolizer.dir/llvm-symbolizer-driver.cpp.o
26.484 [900/32/5908] Building Opts.inc...
26.507 [899/32/5909] Building CXX object tools/llvm-tli-checker/CMakeFiles/llvm-tli-checker.dir/llvm-tli-checker.cpp.o
26.516 [898/32/5910] Building CXX object tools/llvm-strings/CMakeFiles/llvm-strings.dir/llvm-strings.cpp.o
26.520 [897/32/5911] Linking CXX executable bin/f18-parse-demo
26.534 [896/32/5912] Building CXX object tools/llvm-undname/CMakeFiles/llvm-undname.dir/llvm-undname.cpp.o
26.541 [895/32/5913] Linking CXX executable bin/llvm-modextract
26.547 [894/32/5914] Building CXX object tools/flang/runtime/CMakeFiles/obj.FortranRuntime.dir/time-intrinsic.cpp.o
FAILED: tools/flang/runtime/CMakeFiles/obj.FortranRuntime.dir/time-intrinsic.cpp.o
ccache /usr/bin/c++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/flang/runtime -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include -Itools/flang/include -Iinclude -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include -isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/../mlir/include -isystem tools/mlir/include -isystem tools/clang/include -isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/../clang/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -fno-lto -O3 -DNDEBUG -U_GLIBCXX_ASSERTIONS -U_LIBCPP_ENABLE_ASSERTIONS -UNDEBUG -std=c++1z -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/flang/runtime/CMakeFiles/obj.FortranRuntime.dir/time-intrinsic.cpp.o -MF tools/flang/runtime/CMakeFiles/obj.FortranRuntime.dir/time-intrinsic.cpp.o.d -o tools/flang/runtime/CMakeFiles/obj.FortranRuntime.dir/time-intrinsic.cpp.o -c /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:129:53: error: ‘timespec’ in namespace ‘std’ does not name a type
count_t ConvertTimeSpecToCount(int kind, const std::timespec &tspec) {
^~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp: In function ‘{anonymous}::count_t {anonymous}::ConvertTimeSpecToCount(int, const int&)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:131:60: error: request for member ‘tv_sec’ in ‘tspec’, which is of non-class type ‘const int’
unsigned_count_t sec{static_cast<unsigned_count_t>(tspec.tv_sec)};
^~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:132:61: error: request for member ‘tv_nsec’ in ‘tspec’, which is of non-class type ‘const int’
unsigned_count_t nsec{static_cast<unsigned_count_t>(tspec.tv_nsec)};
^~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp: In function ‘{anonymous}::count_t {anonymous}::GetSystemClockCount(int, {anonymous}::fallback_implementation)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:145:8: error: ‘timespec’ is not a member of ‘std’
std::timespec tspec;
^~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:145:8: note: suggested alternative: ‘time_put’
std::timespec tspec;
^~~~~~~~
time_put
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:147:12: error: ‘timespec_get’ is not a member of ‘std’
if (std::timespec_get(&tspec, TIME_UTC) < 0) {
^~~~~~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:147:12: note: suggested alternative: ‘time_put’
if (std::timespec_get(&tspec, TIME_UTC) < 0) {
^~~~~~~~~~~~
time_put
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:147:26: error: ‘tspec’ was not declared in this scope
if (std::timespec_get(&tspec, TIME_UTC) < 0) {
^~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:154:39: error: ‘tspec’ was not declared in this scope
return ConvertTimeSpecToCount(kind, tspec);
^~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp: In function ‘{anonymous}::count_t {anonymous}::GetSystemClockCount(int, {anonymous}::preferred_implementation, T, U*, decltype (clock_gettime(ClockId, Timespec))*)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:182:44: error: invalid initialization of reference of type ‘const int&’ from expression of type ‘timespec’
return ConvertTimeSpecToCount(kind, tspec);
^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/runtime/time-intrinsic.cpp:129:9: note: in passing argument 2 of ‘{anonymous}::count_t {anonymous}::ConvertTimeSpecToCount(int, const int&)’
count_t ConvertTimeSpecToCount(int kind, const std::timespec &tspec) {
```
https://github.com/llvm/llvm-project/pull/96652
More information about the flang-commits
mailing list