<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">
<div dir="auto">Hi, thanks for quick reply. I have tried lifting the restriction (setting LIBOMP_HAVE_TSAN_SUPPORT to TRUE) in both branches but unfortunately I got 1 or 2 errors when compiling from`llvm-project` or from `PRUNERS/openmp`. For the completeness they are at the bottom of the message. My Clang version is 8.0.0. Is there some plan to support the TSAN on macOS soon? Otherwise I will try to manually compile archer and hope it will work (already tried to install through spack but it failed - was hanging over an hour on installation of perl).
<div dir="auto"><br /></div>
<div dir="auto">Thanks for help.</div>
<div dir="auto"><br /></div>
<div dir="auto">Jan<br />
<div dir="auto"><br /></div>
<div dir="auto">
<div>**pruners/openmp**<br />
CMake Warning (dev):<br />
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake<br />
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to<br />
  set the policy and suppress this warning.<br />
<br />
  MACOSX_RPATH is not specified for the following targets:<br />
<br />
   omptarget<br />
<br />
[ 26%] Building CXX object runtime/src/CMakeFiles/omp.dir/kmp_environment.cpp.o<br />
/Users/janstudeny/metagenome_lossless_dbg/metagraph/experiments/lossless_dbg/playground/openmp/libomptarget/src/omptarget.cpp:75:36: error: field of type 'HostDataToTargetListTy::iterator'<br />
      (aka '__list_iterator') has private constructor<br />
  LookupResult() : Flags({0,0,0}), Entry(0) {}<br />
                                   ^<br />
/usr/local/opt/llvm/bin/../include/c++/v1/list:303:14: note: implicitly declared private here<br />
    explicit __list_iterator(__link_pointer __p) _NOEXCEPT : __ptr_(__p) {}<br />
<br />
[ 92%] Building CXX object runtime/src/CMakeFiles/omp.dir/tsan_annotations.cpp.o<br />
In file included from /Users/janstudeny/metagenome_lossless_dbg/metagraph/experiments/lossless_dbg/playground/openmp/runtime/src/kmp_ftn_cdecl.cpp:33:<br />
/Users/janstudeny/metagenome_lossless_dbg/metagraph/experiments/lossless_dbg/playground/openmp/runtime/src/kmp_ftn_entry.h:939:9: error: definition of builtin function 'omp_is_initial_device'<br />
xexpand(FTN_IS_INITIAL_DEVICE)( void )<br />
        ^<br />
/Users/janstudeny/metagenome_lossless_dbg/metagraph/experiments/lossless_dbg/playground/openmp/runtime/src/kmp_ftn_os.h:110:50: note: expanded from macro 'FTN_IS_INITIAL_DEVICE'<br />
    #define FTN_IS_INITIAL_DEVICE                omp_is_initial_device<br />
<br />
<br />
**llvm-project**<br />
```<br />
[ 50%] Building CXX object runtime/src/CMakeFiles/omp.dir/kmp_threadprivate.cpp.o<br />
/tmp/llvm-project/openmp/runtime/src/kmp_runtime.cpp:8031:52: warning: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For<br />
      SYS_kdebug_trace use kdebug_signpost(). [-Wdeprecated-declarations]<br />
    rc = __kmp_str_buf_print(field_buffer, format, __kmp_gettid());<br />
                                                   ^<br />
/tmp/llvm-project/openmp/runtime/src/kmp_wrapper_getpid.h:25:24: note: expanded from macro '__kmp_gettid'<br />
#define __kmp_gettid() syscall(SYS_thread_selfid)<br />
                       ^<br />
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/unistd.h:745:6: note: 'syscall' has been explicitly marked deprecated here<br />
int      syscall(int, ...);<br />
<br />
<br />
[ 88%] Building CXX object runtime/src/CMakeFiles/omp.dir/kmp_version.cpp.o<br />
In file included from /tmp/llvm-project/openmp/runtime/src/kmp_ftn_cdecl.cpp:31:<br />
/tmp/llvm-project/openmp/runtime/src/kmp_ftn_entry.h:971:33: error: definition of builtin function 'omp_is_initial_device'<br />
int FTN_STDCALL KMP_EXPAND_NAME(FTN_IS_INITIAL_DEVICE)(void) {<br />
                                ^<br />
/tmp/llvm-project/openmp/runtime/src/kmp_ftn_os.h:105:31: note: expanded from macro 'FTN_IS_INITIAL_DEVICE'<br />
#define FTN_IS_INITIAL_DEVICE omp_is_initial_device<br />
```</div>
</div>
</div>
</div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">On 16 May 2019, 15:38 +0200, Joachim Protze <protze.joachim@gmail.com>, wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">Hello Jan,<br />
<br />
the logic to detect whether the TSan annotations might be supported on<br />
your platform is quite simple in the OpenMP runtime. We only tested this<br />
on x86_64 Linux, so this is the only platform that is flagged supported in<br />
<br />
runtime/cmake/config-ix.cmake:280<br />
<br />
You might just remove/modify that lines. But I remember that there are<br />
some issues with the weak implementation workflow in the TSan annotations.<br />
<br />
<br />
I would suggest you to try this branch instead:<br />
<br />
https://github.com/PRUNERS/openmp/tree/archer_80<br />
<br />
I will push this to upstream soon, but did not find the time to update<br />
my patch in phabricator yet.<br />
<br />
Best<br />
Joachim<br />
<br />
On 5/16/19 3:24 PM, Jan Studený via Openmp-dev wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">Hello everyone,<br />
As the default clang is outputting false positives when running openmp<br />
program I wanted to compile openmp with TSAN (thread sanitizer) support.<br />
Unfortunately when I tried to compile openmp I got an error that says:<br />
"TSAN functionality requested but not available". What does it mean not<br />
available? Should I install something extra (what if it is the case)?<br />
(maybe helps: currently when compiling`clang -fsanitize=thread -g<br />
-O1 tiny_race.c` I get no error). Running on macOS 10.14.4 (18E226).<br />
Here is the output of `cmake -DCMAKE_C_COMPILER=clang<br />
-DCMAKE_CXX_COMPILER=clang++ -DLIBOMP_TSAN_SUPPORT=1 ../openmp` (the<br />
openmp repository is cloned from https://github.com/llvm/llvm-project):<br />
<br />
Thank you for any hints how to fix this error.<br />
Regards,<br />
Jan<br />
<br />
-- The C compiler identification is Clang 8.0.0<br />
<br />
-- The CXX compiler identification is Clang 8.0.0<br />
<br />
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang<br />
<br />
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang -- works<br />
<br />
-- Detecting C compiler ABI info<br />
<br />
-- Detecting C compiler ABI info - done<br />
<br />
-- Detecting C compile features<br />
<br />
-- Detecting C compile features - done<br />
<br />
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++<br />
<br />
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ -- works<br />
<br />
-- Detecting CXX compiler ABI info<br />
<br />
-- Detecting CXX compiler ABI info - done<br />
<br />
-- Detecting CXX compile features<br />
<br />
-- Detecting CXX compile features - done<br />
<br />
-- Performing Test OPENMP_HAVE_WERROR_FLAG<br />
<br />
-- Performing Test OPENMP_HAVE_WERROR_FLAG - Success<br />
<br />
-- Performing Test OPENMP_HAVE_STD_GNUPP11_FLAG<br />
<br />
-- Performing Test OPENMP_HAVE_STD_GNUPP11_FLAG - Success<br />
<br />
-- Performing Test OPENMP_HAVE_STD_CPP11_FLAG<br />
<br />
-- Performing Test OPENMP_HAVE_STD_CPP11_FLAG - Success<br />
<br />
-- Found PythonInterp: /usr/bin/python (found version "2.7.10")<br />
<br />
-- Cannot find llvm-lit.<br />
<br />
-- Please put llvm-lit in your PATH, set OPENMP_LLVM_LIT_EXECUTABLE to<br />
its full path, or point OPENMP_LLVM_TOOLS_DIR to its directory.<br />
<br />
CMake Warning at cmake/OpenMPTesting.cmake:22 (message):<br />
<br />
  The check targets will not be available!<br />
<br />
Call Stack (most recent call first):<br />
<br />
  cmake/OpenMPTesting.cmake:40 (find_standalone_test_dependencies)<br />
<br />
  CMakeLists.txt:49 (include)<br />
<br />
<br />
<br />
-- Performing Test LIBOMP_HAVE_FNO_EXCEPTIONS_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_FNO_EXCEPTIONS_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_FNO_RTTI_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_FNO_RTTI_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_X_CPP_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_X_CPP_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WCAST_QUAL_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WCAST_QUAL_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_FUNCTION_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_FUNCTION_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_LOCAL_TYPEDEF_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_LOCAL_TYPEDEF_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_VALUE_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_VALUE_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_VARIABLE_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_VARIABLE_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_SWITCH_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_SWITCH_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_COVERED_SWITCH_DEFAULT_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_COVERED_SWITCH_DEFAULT_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_DEPRECATED_REGISTER_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_DEPRECATED_REGISTER_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_SIGN_COMPARE_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_SIGN_COMPARE_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_GNU_ANONYMOUS_STRUCT_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_GNU_ANONYMOUS_STRUCT_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNKNOWN_PRAGMAS_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_UNKNOWN_PRAGMAS_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_MISSING_FIELD_INITIALIZERS_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_MISSING_FIELD_INITIALIZERS_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_MISSING_BRACES_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_MISSING_BRACES_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_COMMENT_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_COMMENT_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_SELF_ASSIGN_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_SELF_ASSIGN_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_VLA_EXTENSION_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_VLA_EXTENSION_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_FORMAT_PEDANTIC_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WNO_FORMAT_PEDANTIC_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WSTRINGOP_OVERFLOW_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_WSTRINGOP_OVERFLOW_FLAG - Failed<br />
<br />
-- Performing Test LIBOMP_HAVE_MSSE2_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_MSSE2_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_FTLS_MODEL_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_FTLS_MODEL_FLAG - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_MMIC_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_MMIC_FLAG - Failed<br />
<br />
-- Performing Test LIBOMP_HAVE_M32_FLAG<br />
<br />
-- Performing Test LIBOMP_HAVE_M32_FLAG - Failed<br />
<br />
-- Looking for pthread.h<br />
<br />
-- Looking for pthread.h - found<br />
<br />
-- Looking for pthread_create<br />
<br />
-- Looking for pthread_create - found<br />
<br />
-- Found Threads: TRUE<br />
<br />
-- Found Perl: /usr/bin/perl (found version "5.18.2")<br />
<br />
-- Performing Test LIBOMP_HAVE_VERSION_SYMBOLS<br />
<br />
-- Performing Test LIBOMP_HAVE_VERSION_SYMBOLS - Failed<br />
<br />
-- Performing Test LIBOMP_HAVE___BUILTIN_FRAME_ADDRESS<br />
<br />
-- Performing Test LIBOMP_HAVE___BUILTIN_FRAME_ADDRESS - Success<br />
<br />
-- Performing Test LIBOMP_HAVE_WEAK_ATTRIBUTE<br />
<br />
-- Performing Test LIBOMP_HAVE_WEAK_ATTRIBUTE - Success<br />
<br />
-- Looking for include files windows.h, psapi.h<br />
<br />
-- Looking for include files windows.h, psapi.h - not found<br />
<br />
-- Looking for EnumProcessModules in psapi<br />
<br />
-- Looking for EnumProcessModules in psapi - not found<br />
<br />
CMake Error at runtime/cmake/LibompUtils.cmake:26 (message):<br />
<br />
  LIBOMP: TSAN functionality requested but not available<br />
<br />
Call Stack (most recent call first):<br />
<br />
  runtime/CMakeLists.txt:325 (libomp_error_say)<br />
<br />
<br />
<br />
-- Configuring incomplete, errors occurred!<br />
<br />
See also "/tmp/llvm-project/build/CMakeFiles/CMakeOutput.log".<br />
<br />
See also "/tmp/llvm-project/build/CMakeFiles/CMakeError.log".<br />
<br />
<br />
_______________________________________________<br />
Openmp-dev mailing list<br />
Openmp-dev@lists.llvm.org<br />
https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev<br />
<br /></blockquote>
<br /></blockquote>
</div>
</body>
</html>