<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GCC thread sanitizer and MKL with Intel OpenMP in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/GCC-thread-sanitizer-and-MKL-with-Intel-OpenMP/m-p/1613968#M3939</link>
    <description>&lt;P&gt;Can you please provide a reproducer to demonstrate what you're trying to achieve?&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;Just based on your description and limited information--it might work, since GCC sanitizer is ported from LLVM, it should be similar to LLVM sanitizer in Intel compiler. If you give it a try and see any errors, you can give us more information on what the errors are.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2024 01:58:25 GMT</pubDate>
    <dc:creator>Alex_Y_Intel</dc:creator>
    <dc:date>2024-07-11T01:58:25Z</dc:date>
    <item>
      <title>GCC thread sanitizer and MKL with Intel OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/GCC-thread-sanitizer-and-MKL-with-Intel-OpenMP/m-p/1611906#M3930</link>
      <description>&lt;P&gt;I got redirected here from the Intel® oneAPI Math Kernel Library forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Is thread sanitizer supposed to work with Intel OpenMP?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I get thousands of errors. Possibly genuine errors as our code is old and has just about never been tested for thread hazards. We're using GCC 5.3 and GCC 13.2. Using the Intel compilers isn't really an option at the moment (it's a fairly big project and we have to integrate with several other projects).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;One of my coleagues and myself have been investigating. He's been trying to use LLVM OpenMP (which I believe Intel OpenMP is based on) and is starting to get things to work when LLVM OpenMP is built for thread sanitizer.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Jul 2024 16:17:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/GCC-thread-sanitizer-and-MKL-with-Intel-OpenMP/m-p/1611906#M3930</guid>
      <dc:creator>paul_f</dc:creator>
      <dc:date>2024-07-03T16:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: GCC thread sanitizer and MKL with Intel OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/GCC-thread-sanitizer-and-MKL-with-Intel-OpenMP/m-p/1613968#M3939</link>
      <description>&lt;P&gt;Can you please provide a reproducer to demonstrate what you're trying to achieve?&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;Just based on your description and limited information--it might work, since GCC sanitizer is ported from LLVM, it should be similar to LLVM sanitizer in Intel compiler. If you give it a try and see any errors, you can give us more information on what the errors are.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 01:58:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/GCC-thread-sanitizer-and-MKL-with-Intel-OpenMP/m-p/1613968#M3939</guid>
      <dc:creator>Alex_Y_Intel</dc:creator>
      <dc:date>2024-07-11T01:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: GCC thread sanitizer and MKL with Intel OpenMP</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/GCC-thread-sanitizer-and-MKL-with-Intel-OpenMP/m-p/1614552#M3944</link>
      <description>&lt;P&gt;Our product is huge so I can't reproduce anything from that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can reproduce errors with one of the Valgrind DRD tests.&lt;/P&gt;&lt;P&gt;&lt;A href="https://sourceware.org/git/?p=valgrind.git;a=blob;f=drd/tests/omp_matinv.c;h=cd402ab0f4e9f3917bdf9cb74381e1946137bc74;hb=HEAD" target="_blank" rel="noopener"&gt;https://sourceware.org/git/?p=valgrind.git;a=blob;f=drd/tests/omp_matinv.c;h=cd402ab0f4e9f3917bdf9cb74381e1946137bc74;hb=HEAD&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that this test should run cleanly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I compile it with&lt;/P&gt;&lt;P&gt;gcc -g -o test omp_matinv.c -fopenmp -fsanitize=thread -Wl,--as-needed -L/path/to/lib/Linux_x86_64 -liomp5 -pthread -lm -Wl,-rpath,/path/to/lib/Linux_x86_64&lt;/P&gt;&lt;P&gt;And run it with&lt;/P&gt;&lt;P&gt;./test -t 15 -q 30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That gives me 8 data races like&lt;/P&gt;&lt;P&gt;WARNING: ThreadSanitizer: data race (pid=441552)&lt;BR /&gt;Read of size 8 at 0x7da000004598 by main thread:&lt;BR /&gt;#0 gj /home/paulf/test/omp_matinv.c:188 (test+0x000000401a8d)&lt;BR /&gt;#1 invert_matrix /home/paulf/test/omp_matinv.c:238 (test+0x000000401d88)&lt;BR /&gt;#2 main /home/paulf/test/omp_matinv.c:327 (test+0x00000040217f)&lt;/P&gt;&lt;P&gt;Previous write of size 8 at 0x7da000004598 by thread T1:&lt;BR /&gt;#0 gj._omp_fn.1 /home/paulf/test/omp_matinv.c:220 (test+0x000000402716)&lt;BR /&gt;#1 __kmp_invoke_microtask &amp;lt;null&amp;gt; (libiomp5.so+0x0000000b0d12)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get similar things with both GCC 5.3 and 13.2.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2024 12:18:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/GCC-thread-sanitizer-and-MKL-with-Intel-OpenMP/m-p/1614552#M3944</guid>
      <dc:creator>paul_f</dc:creator>
      <dc:date>2024-07-12T12:18:35Z</dc:date>
    </item>
  </channel>
</rss>

