<?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: dpcpp lacking C++11 features according to Boost in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1399703#M2352</link>
    <description>&lt;P&gt;Thanks for testing on your end. Indeed this specific error is gone with Boost 1.78. The reason is the following change in Boost:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;&lt;EM&gt;Allow Bernoulli code to be used on platforms with no atomic integers.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This however only hides the underlying issue which I now tracked down further: dpcpp handles an if-else preprocessor block that checks for preprocessor variables from &lt;FONT face="courier new,courier"&gt;&amp;lt;atomic&amp;gt;&lt;/FONT&gt; wrong. Here is a minimal reproducer:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;atomic&amp;gt;

#if ATOMIC_INT_LOCK_FREE == 2
# warning int is lock free
#else
# warning int is NOT lock free
#endif&lt;/LI-CODE&gt;
&lt;P&gt;Compiling this with&amp;nbsp;&lt;FONT face="courier new,courier"&gt;icpx -c test.cpp&lt;/FONT&gt; yields the expected warning:&lt;/P&gt;
&lt;PRE&gt;test.cpp:4:3: warning: int is lock free [-W#warnings]&lt;BR /&gt;# warning int is lock free&lt;BR /&gt;^&lt;BR /&gt;1 warning generated.&lt;/PRE&gt;
&lt;P&gt;Compiling with &lt;FONT face="courier new,courier"&gt;dpcpp -c test.cpp&lt;/FONT&gt; outputs both warnings, i.e., it interprets if and else block:&lt;/P&gt;
&lt;PRE&gt;test4.cpp:6:3: warning: int is NOT lock free [-W#warnings]&lt;BR /&gt;# warning int is NOT lock free&lt;BR /&gt;^&lt;BR /&gt;1 warning generated.&lt;BR /&gt;test4.cpp:4:3: warning: int is lock free [-W#warnings]&lt;BR /&gt;# warning int is lock free&lt;BR /&gt;^&lt;BR /&gt;1 warning generated.&lt;/PRE&gt;
&lt;P&gt;This looks very wrong to me. I think this then causes &lt;A href="https://www.boost.org/doc/libs/1_75_0/boost/multiprecision/detail/atomic.hpp" target="_blank" rel="noopener"&gt;boost::multiprecision::detail&lt;/A&gt; to set up preprocessor variables and datatypes the wrong way which leads to the issue originally reported in this thread.&lt;/P&gt;
&lt;P&gt;I was not able to reproduce this with simple custom preprocessor macros, so it may be specific to those macros from &lt;FONT face="courier new,courier"&gt;&amp;lt;atomic&amp;gt;&lt;/FONT&gt;. It seems that a sycl-specific header file is used in oneAPI: &lt;FONT face="courier new,courier"&gt;dpcpp-ct/2022.1.0/include/dpct/atomic.hpp&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 16:52:43 GMT</pubDate>
    <dc:creator>Michael_Lass</dc:creator>
    <dc:date>2022-07-12T16:52:43Z</dc:date>
    <item>
      <title>dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1395632#M2313</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;compiling the following minimal program with dpcpp 2022.1.0.20220316 and Boost 1.77 fails:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;boost/math/distributions/chi_squared.hpp&amp;gt;
int main() {
  return 0;
}&lt;/LI-CODE&gt;
&lt;P&gt;The error messages are:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;/opt/software/pc2/EB-SW/software/Boost/1.77.0-GCC-11.2.0/include/boost/math/special_functions/detail/bernoulli_details.hpp:560:4: error: unknown type name 'atomic_counter_type'
atomic_counter_type m_counter, m_current_precision;
^
/opt/software/pc2/EB-SW/software/Boost/1.77.0-GCC-11.2.0/include/boost/math/special_functions/detail/bernoulli_details.hpp:413:41: error: unknown type name 'atomic_integer_type'
m_counter.store(static_cast&amp;lt;atomic_integer_type&amp;gt;(bn.size()), std::memory_order_release);
^
/opt/software/pc2/EB-SW/software/Boost/1.77.0-GCC-11.2.0/include/boost/math/special_functions/detail/bernoulli_details.hpp:525:41: error: unknown type name 'atomic_integer_type'
m_counter.store(static_cast&amp;lt;atomic_integer_type&amp;gt;(bn.size()), std::memory_order_release);
^
3 errors generated.&lt;/LI-CODE&gt;
&lt;P&gt;Building against Boost 1.76 or older version works properly but throws the following warnings:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;/opt/software/pc2/EB-SW/software/Boost/1.76.0-GCC-10.3.0/include/boost/math/tools/cxx03_warn.hpp:99:1: warning: CAUTION: One or more C++11 features were found to be unavailable [-W#pragma-messages]

/opt/software/pc2/EB-SW/software/Boost/1.76.0-GCC-10.3.0/include/boost/math/tools/cxx03_warn.hpp:100:1: warning: CAUTION: Compiling Boost.Math in pre-C++11 conformance modes is now deprecated and will be removed from March 2021. [-W#pragma-messages]

/opt/software/pc2/EB-SW/software/Boost/1.76.0-GCC-10.3.0/include/boost/math/tools/cxx03_warn.hpp:101:1: warning: CAUTION: Define BOOST_MATH_DISABLE_DEPRECATED_03_WARNING to suppress this message. [-W#pragma-messages]

/opt/software/pc2/EB-SW/software/Boost/1.76.0-GCC-10.3.0/include/boost/math/tools/cxx03_warn.hpp:102:1: warning: CAUTION: This message was generated due to the define: BOOST_NO_CXX11_THREAD_LOCAL [-W#pragma-messages]&lt;/LI-CODE&gt;
&lt;P&gt;Boost seems to think we are using a pre C++11 compiler. The math library in Boost 1.77 then seemingly has dropped support for those.&lt;/P&gt;
&lt;P&gt;Further notes:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The problem only occurs with dpcpp. icpx compiles the program without problems.&lt;/LI&gt;
&lt;LI&gt;Explicitly setting a language standard, e.g., using -std=c++17 does not help.&lt;/LI&gt;
&lt;LI&gt;The operating system here is a RHEL 8.5.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 27 Jun 2022 10:57:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1395632#M2313</guid>
      <dc:creator>Michael_Lass</dc:creator>
      <dc:date>2022-06-27T10:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1395641#M2314</link>
      <description>&lt;P&gt;This might very well be an issue with the Boost compiler and stdlib recognition. Adding&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#define BOOST_NO_STDLIB_CONFIG&lt;/LI-CODE&gt;
&lt;P&gt;to the very top of the test program solves the problem. This is documented here: &lt;A href="https://www.boost.org/doc/libs/master/libs/config/doc/html/index.html" target="_blank"&gt;https://www.boost.org/doc/libs/master/libs/config/doc/html/index.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 11:18:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1395641#M2314</guid>
      <dc:creator>Michael_Lass</dc:creator>
      <dc:date>2022-06-27T11:18:48Z</dc:date>
    </item>
    <item>
      <title>Re:dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1396041#M2315</link>
      <description>&lt;P&gt;Hi Michael,&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;EM&gt;This might very well be an issue with the Boost compiler and stdlib recognition.... solves the problem.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Glad to know that your issue is resolved and thanks for letting us know about it.&lt;/P&gt;&lt;P&gt;As the issue is resolved, could you please confirm if we can close this thread from our end?&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>Tue, 28 Jun 2022 10:13:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1396041#M2315</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-06-28T10:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1396048#M2316</link>
      <description>&lt;P&gt;Sorry, that was phrased ambiguously. Adding that line &lt;EM&gt;circumvents&lt;/EM&gt; the problem, which hints towards where the problem lies. Of course, Boost and dpcpp should work together out of the box. So I would not consider this solved. If the problem is actually on dpcpp's or Boost's side I so far cannot tell.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 10:35:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1396048#M2316</guid>
      <dc:creator>Michael_Lass</dc:creator>
      <dc:date>2022-06-28T10:35:36Z</dc:date>
    </item>
    <item>
      <title>Re:dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1396054#M2317</link>
      <description>&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I apologize for the misunderstanding here.&lt;/P&gt;&lt;P&gt;Yes, as you mentioned the issue is reproducible with dpcpp but it is compiling fine with icpx/icx/icpc compilers.&lt;/P&gt;&lt;P&gt;We are working on your issue, we will get back to you soon.&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>Tue, 28 Jun 2022 10:46:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1396054#M2317</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-06-28T10:46:14Z</dc:date>
    </item>
    <item>
      <title>Re:dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1399628#M2348</link>
      <description>&lt;P&gt;Presumably this was an issue in Boost 1.77. It cannot be reproduced with Boost 1.78 or the latest 1.79. The compilation with the newer Boost versions work out of the box. Please check.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Jul 2022 11:14:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1399628#M2348</guid>
      <dc:creator>Klaus-Dieter_O_Intel</dc:creator>
      <dc:date>2022-07-12T11:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1399703#M2352</link>
      <description>&lt;P&gt;Thanks for testing on your end. Indeed this specific error is gone with Boost 1.78. The reason is the following change in Boost:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;&lt;EM&gt;Allow Bernoulli code to be used on platforms with no atomic integers.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This however only hides the underlying issue which I now tracked down further: dpcpp handles an if-else preprocessor block that checks for preprocessor variables from &lt;FONT face="courier new,courier"&gt;&amp;lt;atomic&amp;gt;&lt;/FONT&gt; wrong. Here is a minimal reproducer:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;atomic&amp;gt;

#if ATOMIC_INT_LOCK_FREE == 2
# warning int is lock free
#else
# warning int is NOT lock free
#endif&lt;/LI-CODE&gt;
&lt;P&gt;Compiling this with&amp;nbsp;&lt;FONT face="courier new,courier"&gt;icpx -c test.cpp&lt;/FONT&gt; yields the expected warning:&lt;/P&gt;
&lt;PRE&gt;test.cpp:4:3: warning: int is lock free [-W#warnings]&lt;BR /&gt;# warning int is lock free&lt;BR /&gt;^&lt;BR /&gt;1 warning generated.&lt;/PRE&gt;
&lt;P&gt;Compiling with &lt;FONT face="courier new,courier"&gt;dpcpp -c test.cpp&lt;/FONT&gt; outputs both warnings, i.e., it interprets if and else block:&lt;/P&gt;
&lt;PRE&gt;test4.cpp:6:3: warning: int is NOT lock free [-W#warnings]&lt;BR /&gt;# warning int is NOT lock free&lt;BR /&gt;^&lt;BR /&gt;1 warning generated.&lt;BR /&gt;test4.cpp:4:3: warning: int is lock free [-W#warnings]&lt;BR /&gt;# warning int is lock free&lt;BR /&gt;^&lt;BR /&gt;1 warning generated.&lt;/PRE&gt;
&lt;P&gt;This looks very wrong to me. I think this then causes &lt;A href="https://www.boost.org/doc/libs/1_75_0/boost/multiprecision/detail/atomic.hpp" target="_blank" rel="noopener"&gt;boost::multiprecision::detail&lt;/A&gt; to set up preprocessor variables and datatypes the wrong way which leads to the issue originally reported in this thread.&lt;/P&gt;
&lt;P&gt;I was not able to reproduce this with simple custom preprocessor macros, so it may be specific to those macros from &lt;FONT face="courier new,courier"&gt;&amp;lt;atomic&amp;gt;&lt;/FONT&gt;. It seems that a sycl-specific header file is used in oneAPI: &lt;FONT face="courier new,courier"&gt;dpcpp-ct/2022.1.0/include/dpct/atomic.hpp&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 16:52:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1399703#M2352</guid>
      <dc:creator>Michael_Lass</dc:creator>
      <dc:date>2022-07-12T16:52:43Z</dc:date>
    </item>
    <item>
      <title>Re:dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1399978#M2354</link>
      <description>&lt;P&gt;The 2 warnings are for the 2 different compilation phases CPU (lock free) and device (NOT lock free). Details for both phases will be shown by using flag "-v" (but not used below):&lt;/P&gt;&lt;P&gt;+ icpc -E test_atomic.cpp -o test_atomic_icpc.i&lt;/P&gt;&lt;P&gt;test_atomic.cpp(4): warning #1224: #warning directive: int is lock free&lt;/P&gt;&lt;P&gt;&amp;nbsp;# warning int is lock free&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;^&lt;/P&gt;&lt;P&gt;+ dpcpp -fno-sycl -E test_atomic.cpp -o test_atomic_dpcpp-fno-sycl.i&lt;/P&gt;&lt;P&gt;test_atomic.cpp:4:3: warning: int is lock free [-W#warnings]&lt;/P&gt;&lt;P&gt;# warning int is lock free&lt;/P&gt;&lt;P&gt;&amp;nbsp;^&lt;/P&gt;&lt;P&gt;1 warning generated.&lt;/P&gt;&lt;P&gt;+ dpcpp -fsycl-device-only -E test_atomic.cpp -o test_atomic_dpcpp-fsycl-device-only.i&lt;/P&gt;&lt;P&gt;test_atomic.cpp:6:3: warning: int is NOT lock free [-W#warnings]&lt;/P&gt;&lt;P&gt;# warning int is NOT lock free&lt;/P&gt;&lt;P&gt;&amp;nbsp;^&lt;/P&gt;&lt;P&gt;1 warning generated.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;dpcpp-ct/2022.1.0/include/dpct/atomic.hpp is not used (also not seen if removing the first match "-m1"):&lt;/P&gt;&lt;P&gt;+ egrep -m1 '/atomic' *.i&lt;/P&gt;&lt;P&gt;test_atomic_dpcpp-fno-sycl.i:# 1 "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/atomic" 1 3&lt;/P&gt;&lt;P&gt;test_atomic_dpcpp-fsycl-device-only.i:# 1 "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/atomic" 1 3&lt;/P&gt;&lt;P&gt;test_atomic_icpc.i:# 1 "/opt/intel/oneapi/compiler/2022.1.0/linux/bin/intel64/../../compiler/include/icc/atomic" 1 3&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jul 2022 11:49:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1399978#M2354</guid>
      <dc:creator>Klaus-Dieter_O_Intel</dc:creator>
      <dc:date>2022-07-13T11:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1399991#M2357</link>
      <description>&lt;P&gt;Thanks for the explanation! That means this behavior in fact was no bug but boost correctly determined that lock free atomic integers are missing (although only for the device and not for the host). Therefore parts of &lt;FONT face="courier new,courier"&gt;boost::math&lt;/FONT&gt; could not be used when compiling with dpcpp. With boost 1.78 they now also work without support for atomic integers.&lt;/P&gt;
&lt;P&gt;I can also confirm that compiling the reproducer in the original post with boost 1.77 using &lt;FONT face="courier new,courier"&gt;dpcpp -fno-sycl&lt;/FONT&gt; works as well.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 12:55:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1399991#M2357</guid>
      <dc:creator>Michael_Lass</dc:creator>
      <dc:date>2022-07-13T12:55:29Z</dc:date>
    </item>
    <item>
      <title>Re:dpcpp lacking C++11 features according to Boost</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1400029#M2359</link>
      <description>&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting the solution.&lt;/P&gt;&lt;P&gt;Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.&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, 13 Jul 2022 15:37:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/dpcpp-lacking-C-11-features-according-to-Boost/m-p/1400029#M2359</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-07-13T15:37:32Z</dc:date>
    </item>
  </channel>
</rss>

