<?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: 2025.1 floating point issue in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1683477#M4419</link>
    <description>&lt;P&gt;Could you provide a test case that demonstrates the differences in results?&lt;/P&gt;</description>
    <pubDate>Wed, 16 Apr 2025 17:03:08 GMT</pubDate>
    <dc:creator>Sravani_K_Intel</dc:creator>
    <dc:date>2025-04-16T17:03:08Z</dc:date>
    <item>
      <title>2025.1 floating point issue</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1682685#M4417</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after installing the 2025.1 oneapi basekit and hpckit release I have stumbled over substantial differences in calculation results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After some digging it turned out that the culprit is icpx.&lt;/P&gt;&lt;P&gt;Doing some comparisons for the respective calculations I found that g++ 14.2, clang++ 19.1, icpx 2024.0.2 all deliver the same results irrespective of the floating point model (i.e. irrespective of whether "-ffast-math" is set or not). icpx 2025.1 also delivers the same results but only when using "-O0 -g", or "-O3 -fno-fast-math".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this a bug ....... or is icpx 2025.1 requiring different flags?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The calculations involve multiplication, addition, subtraction, square root, power, and absolute value, where for the last there std::sqrt, std::pow and std::abs is used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OS: Linux&lt;/P&gt;&lt;P&gt;Kernel: 6.14&lt;/P&gt;</description>
      <pubDate>Mon, 14 Apr 2025 05:47:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1682685#M4417</guid>
      <dc:creator>may_ka</dc:creator>
      <dc:date>2025-04-14T05:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: 2025.1 floating point issue</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1683477#M4419</link>
      <description>&lt;P&gt;Could you provide a test case that demonstrates the differences in results?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 17:03:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1683477#M4419</guid>
      <dc:creator>Sravani_K_Intel</dc:creator>
      <dc:date>2025-04-16T17:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: 2025.1 floating point issue</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1687235#M4442</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried hard but could not isolate the problem into a small reproducer. My current code base is &amp;gt;100,000 lines. However, I got to the point that there is something wrong with loop optimization.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have found so far is that options "-O0", "-O1" and "-O2" without any "fp-model" specification do not exhibit the same problem. My understanding is that "-fp-model=fast" is the default invariably of the "-O" setting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However "-O2 -qopenmp" produces wrong results, but "-O2 -qopenmp -fp-model=precise" produces the correct results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering whether I can run test with "-O2" plus successively all options which "-O3" sets.&lt;/P&gt;&lt;P&gt;I have tried to identify all options which "-O3" is setting, but the manual says nothing about it:&lt;/P&gt;&lt;P&gt;"Performs O2 optimizations and enables more aggressive loop&lt;BR /&gt;transformations such as Fusion, Block-Unroll-and-Jam, and collapsing IF&lt;BR /&gt;statements.&lt;BR /&gt;This option may set other options. This is determined by the compiler,&lt;BR /&gt;depending on which operating system and architecture you are using. The&lt;BR /&gt;options that are set may change from release to release."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe you can provide those options.&lt;/P&gt;</description>
      <pubDate>Sat, 03 May 2025 14:05:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1687235#M4442</guid>
      <dc:creator>may_ka</dc:creator>
      <dc:date>2025-05-03T14:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: 2025.1 floating point issue</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1687590#M4444</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The default behavior of&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;fp-model=fast&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;in the oneAPI C/C++ compiler 2024.2 has been updated to honor NaNs and infinities. This is a change from versions 2024.1 and earlier, where&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;fp-model=fast&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;assumed NaN and infinite values would not appear as inputs or outputs. Can you try the options&amp;nbsp;-fno-honor-nans&amp;nbsp;-fno-honor-infinities to see if that helps your case?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 21:56:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1687590#M4444</guid>
      <dc:creator>Sravani_K_Intel</dc:creator>
      <dc:date>2025-05-05T21:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: 2025.1 floating point issue</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1687807#M4447</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with compile flags&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;icpx -march=cascadelake -std=c++20 -fPIE -std=gnu++20 -ferror-limit=4 -frelaxed-template-template-args -O3 -qopenmp -fno-honor-nans -fno-honor-infinities&lt;/LI-CODE&gt;&lt;P&gt;and&lt;/P&gt;&lt;LI-CODE lang="none"&gt;icpx -march=cascadelake -std=c++20 -fPIE -std=gnu++20 -ferror-limit=4 -frelaxed-template-template-args -O3 -fno-honor-nans -fno-honor-infinities&lt;/LI-CODE&gt;&lt;P&gt;and&lt;/P&gt;&lt;LI-CODE lang="none"&gt;icpx -march=cascadelake -std=c++20 -fPIE -std=gnu++20 -ferror-limit=4 -frelaxed-template-template-args -g -D_GLIBCXX_DEBUG_PEDANTIC -g -O0 -fp-model=precise -c&lt;/LI-CODE&gt;&lt;P&gt;where 1 and 2 produce results different from 3 and using g++ and clang++. I.e. your proposed flags did not resolve the issue.&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 10:38:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1687807#M4447</guid>
      <dc:creator>may_ka</dc:creator>
      <dc:date>2025-05-06T10:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: 2025.1 floating point issue</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1687873#M4448</link>
      <description>&lt;P&gt;Thanks for trying. As for the fp-model, the above-mentioned change is the only one that was made in 2024.2 release. We will need a test case to further investigate the behavior you are observing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 15:49:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/2025-1-floating-point-issue/m-p/1687873#M4448</guid>
      <dc:creator>Sravani_K_Intel</dc:creator>
      <dc:date>2025-05-06T15:49:10Z</dc:date>
    </item>
  </channel>
</rss>

