<?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 Include MKL header file with oneapi/DPL, TBB error in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Include-MKL-header-file-with-oneapi-DPL-TBB-error/m-p/1347309#M32509</link>
    <description>&lt;P class="sub_section_element_selectors"&gt;Hi,&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;I try to use MKL and DPL, when I include both header file in the same cpp file like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#include &amp;lt;oneapi/mkl.hpp&amp;gt;
#include &amp;lt;oneapi/dpl/execution&amp;gt;
#include &amp;lt;oneapi/dpl/algorithm&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;There will be an error:&lt;/P&gt;
&lt;P&gt;In file included from /opt/intel/oneapi/dpl/2021.5.0/linux/include/oneapi/dpl/execution:23:&lt;BR /&gt;In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/execution:32:&lt;BR /&gt;In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/glue_execution_defs.h:50:&lt;BR /&gt;In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/algorithm_impl.h:22:&lt;BR /&gt;In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/parallel_backend.h:16:&lt;BR /&gt;/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/parallel_backend_tbb.h:70:10: error: no member named 'task' in namespace 'tbb'&lt;BR /&gt;tbb::task::self().group()-&amp;gt;cancel_group_execution();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;However, if i change the order:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#include &amp;lt;oneapi/dpl/execution&amp;gt;
#include &amp;lt;oneapi/dpl/algorithm&amp;gt;
#include &amp;lt;oneapi/mkl.hpp&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;it can be built successfully.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is it a bug? please confirm.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The attachment is my&amp;nbsp;sample. You can run it by:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mkdir build &amp;amp;&amp;amp; cd build
cmake ..
make&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;For my computer, the oneapi version is:&amp;nbsp;2021.4.0.3422&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and system is:&amp;nbsp;Linux tigerlake-i5-1135G7-qwerty 5.11.0-38-generic #42~20.04.1-Ubuntu&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Dec 2021 07:35:09 GMT</pubDate>
    <dc:creator>Qigeng</dc:creator>
    <dc:date>2021-12-29T07:35:09Z</dc:date>
    <item>
      <title>Include MKL header file with oneapi/DPL, TBB error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Include-MKL-header-file-with-oneapi-DPL-TBB-error/m-p/1347309#M32509</link>
      <description>&lt;P class="sub_section_element_selectors"&gt;Hi,&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;I try to use MKL and DPL, when I include both header file in the same cpp file like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#include &amp;lt;oneapi/mkl.hpp&amp;gt;
#include &amp;lt;oneapi/dpl/execution&amp;gt;
#include &amp;lt;oneapi/dpl/algorithm&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;There will be an error:&lt;/P&gt;
&lt;P&gt;In file included from /opt/intel/oneapi/dpl/2021.5.0/linux/include/oneapi/dpl/execution:23:&lt;BR /&gt;In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/execution:32:&lt;BR /&gt;In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/glue_execution_defs.h:50:&lt;BR /&gt;In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/algorithm_impl.h:22:&lt;BR /&gt;In file included from /usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/parallel_backend.h:16:&lt;BR /&gt;/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/parallel_backend_tbb.h:70:10: error: no member named 'task' in namespace 'tbb'&lt;BR /&gt;tbb::task::self().group()-&amp;gt;cancel_group_execution();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;However, if i change the order:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#include &amp;lt;oneapi/dpl/execution&amp;gt;
#include &amp;lt;oneapi/dpl/algorithm&amp;gt;
#include &amp;lt;oneapi/mkl.hpp&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;it can be built successfully.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is it a bug? please confirm.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The attachment is my&amp;nbsp;sample. You can run it by:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mkdir build &amp;amp;&amp;amp; cd build
cmake ..
make&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;For my computer, the oneapi version is:&amp;nbsp;2021.4.0.3422&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and system is:&amp;nbsp;Linux tigerlake-i5-1135G7-qwerty 5.11.0-38-generic #42~20.04.1-Ubuntu&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 07:35:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Include-MKL-header-file-with-oneapi-DPL-TBB-error/m-p/1347309#M32509</guid>
      <dc:creator>Qigeng</dc:creator>
      <dc:date>2021-12-29T07:35:09Z</dc:date>
    </item>
    <item>
      <title>Re:Include MKL header file with oneapi/DPL, TBB error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Include-MKL-header-file-with-oneapi-DPL-TBB-error/m-p/1347373#M32514</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &lt;I&gt;if i change the order...it can be built successfully.Is it a bug? please confirm.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Yes it is a known issue and it is already mentioned in oneTBB release notes&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;An application using Parallel STL algorithms in libstdc++ versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Reordering of the header files is one way to avoid errors as you have mentioned&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and another way is to set the following macros PSTL_USE_PARALLEL_POLICIES (in libstdc++ 9) or _GLIBCXX_USE_TBB_PAR_BACKEND (in libstdc++ 10) to zero.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can set these macros even during compilation as shown below&lt;/P&gt;&lt;P&gt;eg: dpcpp &amp;lt;filename&amp;gt; -DPSTL_USE_PARALLEL_POLICIES=0&amp;nbsp;&amp;nbsp;# for libstdc++ 9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;   dpcpp &amp;lt;filename&amp;gt; -D_GLIBCXX_USE_TBB_PAR_BACKEND=0 # for libstdc++ 10&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please refer to the below link for more details&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-threading-building-blocks-release-notes.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-threading-building-blocks-release-notes.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Hope the provided information helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Dec 2021 15:51:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Include-MKL-header-file-with-oneapi-DPL-TBB-error/m-p/1347373#M32514</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2021-12-29T15:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Include MKL header file with oneapi/DPL, TBB error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Include-MKL-header-file-with-oneapi-DPL-TBB-error/m-p/1347492#M32516</link>
      <description>&lt;P&gt;It can work now with&amp;nbsp;&lt;SPAN&gt;-D_GLIBCXX_USE_TBB_PAR_BACKEND=0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for your support!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 05:49:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Include-MKL-header-file-with-oneapi-DPL-TBB-error/m-p/1347492#M32516</guid>
      <dc:creator>Qigeng</dc:creator>
      <dc:date>2021-12-30T05:49:48Z</dc:date>
    </item>
    <item>
      <title>Re:Include MKL header file with oneapi/DPL, TBB error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Include-MKL-header-file-with-oneapi-DPL-TBB-error/m-p/1347493#M32517</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting our solution.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As the issue is resolved we are closing this thread. If you need any additional assistance from Intel, please post a new question as this thread will no longer be monitored.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a Nice Day!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Dec 2021 05:55:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Include-MKL-header-file-with-oneapi-DPL-TBB-error/m-p/1347493#M32517</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2021-12-30T05:55:24Z</dc:date>
    </item>
  </channel>
</rss>

