<?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 floating point exception in mkl fft with AVX512 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224210#M30260</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code shows a floating point overflow in FFT when AVX512 is enabled.&amp;nbsp; If I disable AVX512 before running the program (setenv MKL_ENABLE_INSTRUCTIONS AVX2) it runs successfully.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;program mkl_test

  USE MKL_DFTI

  include  'mkl.fi'

  parameter (len=110)
  real values_in(len)
  real values_out(len)
  real :: temp_r
  integer :: ieee_flags
  character*16 :: out
  integer :: i, j,   status
  type(dfti_descriptor), pointer :: My_Desc1_Handle
!---------------------------------------------------------------------------------------------------  

  open(unit =2, file='data_inc.txt')
  do i=1, 110
     read(2, * ) values_in(i)
  enddo
  close(unit)

  i = ieee_flags('set', 'exception', 'overflow', out)
  status = DftiCreateDescriptor(My_Desc1_Handle,DFTI_SINGLE,DFTI_REAL,1,len-2)
  status = DftiSetValue(My_Desc1_Handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
  status = DftiSetValue(My_Desc1_Handle, DFTI_NUMBER_OF_TRANSFORMS, 1);
  status = DftiCommitDescriptor(My_Desc1_Handle);

  status = DftiComputeForward( My_Desc1_Handle, values_in, values_out )

  print*, "Finished successfully." ,status

end program mkl_test
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running the program on&amp;nbsp;Xeon W-2145 CPU @ 3.70GHz&lt;/P&gt;
&lt;P&gt;My link command as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/opt/intel/19/bin/ifort reproduce.f90 -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl -I${MKLROOT}/include/ -g&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please also find attached the input required to reproduce the problem (data_inc.txt).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Oct 2020 19:46:04 GMT</pubDate>
    <dc:creator>gn164</dc:creator>
    <dc:date>2020-10-30T19:46:04Z</dc:date>
    <item>
      <title>floating point exception in mkl fft with AVX512</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224210#M30260</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code shows a floating point overflow in FFT when AVX512 is enabled.&amp;nbsp; If I disable AVX512 before running the program (setenv MKL_ENABLE_INSTRUCTIONS AVX2) it runs successfully.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;program mkl_test

  USE MKL_DFTI

  include  'mkl.fi'

  parameter (len=110)
  real values_in(len)
  real values_out(len)
  real :: temp_r
  integer :: ieee_flags
  character*16 :: out
  integer :: i, j,   status
  type(dfti_descriptor), pointer :: My_Desc1_Handle
!---------------------------------------------------------------------------------------------------  

  open(unit =2, file='data_inc.txt')
  do i=1, 110
     read(2, * ) values_in(i)
  enddo
  close(unit)

  i = ieee_flags('set', 'exception', 'overflow', out)
  status = DftiCreateDescriptor(My_Desc1_Handle,DFTI_SINGLE,DFTI_REAL,1,len-2)
  status = DftiSetValue(My_Desc1_Handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
  status = DftiSetValue(My_Desc1_Handle, DFTI_NUMBER_OF_TRANSFORMS, 1);
  status = DftiCommitDescriptor(My_Desc1_Handle);

  status = DftiComputeForward( My_Desc1_Handle, values_in, values_out )

  print*, "Finished successfully." ,status

end program mkl_test
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running the program on&amp;nbsp;Xeon W-2145 CPU @ 3.70GHz&lt;/P&gt;
&lt;P&gt;My link command as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/opt/intel/19/bin/ifort reproduce.f90 -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl -I${MKLROOT}/include/ -g&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please also find attached the input required to reproduce the problem (data_inc.txt).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 19:46:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224210#M30260</guid>
      <dc:creator>gn164</dc:creator>
      <dc:date>2020-10-30T19:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: floating point exception in mkl fft with AVX512</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224391#M30266</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An update that I have also tried to use MKL 2020 update 4 and the issue persists using that as well.&lt;/P&gt;
&lt;P&gt;It is worth to note that this looks like a data dependent issue. The FFT works fine with different&amp;nbsp; input but something in this data seems to trigger the FPE under avx512.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Oct 2020 23:31:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224391#M30266</guid>
      <dc:creator>gn164</dc:creator>
      <dc:date>2020-10-31T23:31:37Z</dc:date>
    </item>
    <item>
      <title>Re:floating point exception in mkl fft with AVX512</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224455#M30267</link>
      <description>&lt;P&gt;thanks for the case. We will check and keep you updated with the status of this issue.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 01 Nov 2020 16:10:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224455#M30267</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-01T16:10:40Z</dc:date>
    </item>
    <item>
      <title>Re:floating point exception in mkl fft with AVX512</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224622#M30268</link>
      <description>&lt;P&gt;I see no issues with the latest mkl version 2020 u4. &lt;/P&gt;&lt;P&gt;Here is the log file I see with MKL_VERBOSE mode enabled.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;export MKL_VERBOSE=1&lt;/P&gt;&lt;P&gt;$ ./a.out&lt;/P&gt;&lt;P&gt;MKL_VERBOSE Intel(R) MKL 2020.0 Update 4 Product build 20200917 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 512 &lt;B&gt;(Intel(R) AVX-512&lt;/B&gt;) enabled processors, Lnx 2.50GHz intel_thread&lt;/P&gt;&lt;P&gt;MKL_VERBOSE FFT(srfo108,pack:ccs,tLim:1,unaligned_input,unaligned_output,desc:0x43f3600) 11.88us CNR:OFF Dyn:1 FastMM:1 TID:0&amp;nbsp;NThr:112&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;B&gt;Finished successfully.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Nov 2020 07:53:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224622#M30268</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-02T07:53:55Z</dc:date>
    </item>
    <item>
      <title>Re:floating point exception in mkl fft with AVX512</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224624#M30269</link>
      <description>&lt;P&gt;ifort --version&lt;/P&gt;&lt;P&gt;ifort (IFORT) 19.1.3.302 20200925&lt;/P&gt;&lt;P&gt;Copyright (C) 1985-2020 Intel Corporation.&amp;nbsp;All rights reserved.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;lscpu | grep Model&lt;/P&gt;&lt;P&gt;Model name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Intel(R) Xeon(R) Platinum 8180 CPU @ 2.50GHz&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;OS - RH7.2&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Nov 2020 07:56:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224624#M30269</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-02T07:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re:floating point exception in mkl fft with AVX512</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224653#M30270</link>
      <description>&lt;P&gt;Hi Gennady,&lt;/P&gt;
&lt;P&gt;Thank you for having a look. I do not have access to that particular hardware but can also reproduce the&amp;nbsp;&lt;/P&gt;
&lt;P&gt;problem on a&amp;nbsp;Xeon Silver 4110 CPU @ 2.10GHz.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The program still fails with floating overflow&amp;nbsp; before showing any of the verbose messages.&lt;/P&gt;
&lt;P&gt;If I disable the trap for FPEs (comment out line 22) the verbose information is as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MKL_VERBOSE Intel(R) MKL 2020.0 Update 4 Product build 20200917 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 512 (Intel(R) AVX-512) enabled processors, Lnx 2.10GHz intel_thread
MKL_VERBOSE FFT(srfo108,pack:ccs,tLim:1,desc:0x31865c0) 8.96us CNR:OFF Dyn:1 FastMM:1 TID:0 NThr:8
Finished successfully. 0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it helps, I am also copying the stack of the failing program.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Program received signal SIGFPE, Arithmetic exception.
0x00000000013e8721 in mkl_dft_avx512_ownsrDftFwdRecombine_32f ()
(gdb) bt
#0 0x00000000013e8721 in mkl_dft_avx512_ownsrDftFwdRecombine_32f ()
#1 0x00000000005ad164 in mkl_dft_avx512_ippsDFTFwd_RToCCS_32f ()
#2 0x00000000004afb2a in compute_1d_small_fwd ()
#3 0x0000000000405409 in mkl_dft_dfti_compute_forward_ss ()
#4 0x0000000000404dcd in mkl_avx512 () at reproduce.f90:30
#5 0x0000000000404ae2 in main ()
#6 0x00002aaaab80b2e1 in __libc_start_main (main=0x404ab0 &amp;lt;main&amp;gt;, argc=1, argv=0x7fffffffea68, 
init=&amp;lt;optimized out&amp;gt;, fini=&amp;lt;optimized out&amp;gt;, rtld_fini=&amp;lt;optimized out&amp;gt;, stack_end=0x7fffffffea58)
at ../csu/libc-start.c:291
#7 0x00000000004049aa in _start ()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 09:42:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1224653#M30270</guid>
      <dc:creator>gn164</dc:creator>
      <dc:date>2020-11-02T09:42:50Z</dc:date>
    </item>
    <item>
      <title>Re:floating point exception in mkl fft with AVX512</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1226259#M30301</link>
      <description>&lt;P&gt;running the same code built with mkl 2020 u4 (statically) on the very similar system ( Model name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz), I see no segfault there:&lt;/P&gt;&lt;P&gt;MKL_VERBOSE Intel(R) &lt;B&gt;MKL 2020.0 Update 4&lt;/B&gt; Product build 20200917 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 512 (Intel(R) AVX-512) enabled processors, Lnx 2.10GHz intel_thread&lt;/P&gt;&lt;P&gt;MKL_VERBOSE FFT(srfo108,pack:ccs,tLim:1,unaligned_input,unaligned_output,desc:0x335c840) 8.65us CNR:OFF Dyn:1 FastMM:1 TID:0&amp;nbsp;NThr:24&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;B&gt;Finished successfully.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 07 Nov 2020 05:00:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1226259#M30301</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-07T05:00:11Z</dc:date>
    </item>
    <item>
      <title>Re:floating point exception in mkl fft with AVX512</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1270746#M31114</link>
      <description>&lt;P&gt;The issue is closing and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2021 03:45:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/floating-point-exception-in-mkl-fft-with-AVX512/m-p/1270746#M31114</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-04-05T03:45:01Z</dc:date>
    </item>
  </channel>
</rss>

