<?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:Math kernel library yields different results to singular problems depending on processors in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1398907#M33377</link>
    <description>&lt;P&gt;Hi Isa,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&lt;/EM&gt;&lt;EM style="font-size: 16px; font-family: intel-clear;"&gt;you can close it&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks for the confirmation.&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;Have a Great 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>Fri, 08 Jul 2022 11:12:53 GMT</pubDate>
    <dc:creator>VidyalathaB_Intel</dc:creator>
    <dc:date>2022-07-08T11:12:53Z</dc:date>
    <item>
      <title>Math kernel library yields different results to singular problems depending on processors</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1397090#M33354</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am using the MKL (2022.0.3) out of the oneAPI Base Toolkit in our product to solve linear equations. In tests artificial equations are inserted into the MKL to test our system.&amp;nbsp; For example the following equation shall be solved:&lt;/P&gt;
&lt;P&gt;A * x = b,&lt;/P&gt;
&lt;P&gt;while A is a 3 x 3 matrix with ones [1, 1, 1; 1, 1, 1; 1, 1, 1, 1] and b is a column vector with values [1; 2; 3]. There exists no unique solution to this problem. The documentation of the function ?&lt;SPAN&gt;geqrf recommends the use of the functions ?geqrf, ormqr and trsm to solve linear equations and that's what we do.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What we realized now is, that the results of the chain of functions&amp;nbsp; (&lt;SPAN&gt;?geqrf, ormqr and trsm) differ depending on the processors the tests are running on. While processors i7-3610QE CPU with 4 Cores and 8 logical processors yield the 'solution' [NaN, NaN, Infinity], the processors i7-1085OH CPU and i7-8700 CPU with 6 Cores and 12 logical processors yield [0, 0, 0].&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Why these results differ?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;The status of&amp;nbsp; the methods ?geqrf and ormqr equal to 0 (success) if we insert the variables as explained above.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Why the library does not use the status of the functions&amp;nbsp;?geqrf and ormqr to propagate the singularity of the problem to reveal the user the uncertainty of the results?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Best regards Isa&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 07:41:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1397090#M33354</guid>
      <dc:creator>IsaPisa</dc:creator>
      <dc:date>2022-07-01T07:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Math kernel library yields different results to singular problems depending on processors</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1397541#M33355</link>
      <description>&lt;P&gt;Hi Isa,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;Why these results differ?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, we request you to provide us with&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&amp;nbsp;the sample reproducer code and&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;steps you have followed (mainly for compilation)&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;the output of MKL_VERBOSE environment variable for both processors&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;(usage:- set MKL_VERBOSE=1 before running your code) so that we can test the same from our end as well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope the compilation command used is the same when running the code on both processors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, I just want to share some information that might be helpful in case you miss it,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a tool named "oneMKL LAPACK Function Finding Advisor", which helps you to find the recommended routines for your particular use case&lt;/P&gt;
&lt;P&gt;Link: &lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-function-finding-advisor.html#gs.5d3h6b" target="_blank" rel="noopener"&gt;https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-function-finding-advisor.html#gs.5d3h6b&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;...that the results of the chain of functions&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;we see that you are using computational routines to solve the system of linear equations, maybe you can also give it a try using the driver routine which combines several tasks in one call&lt;/P&gt;
&lt;P&gt;Link: &lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/lapack-routines/lapack-linear-equation-routines.html" target="_blank" rel="noopener"&gt;https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/lapack-routines/lapack-linear-equation-routines.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Anyways, Please get back to us with the sample reproducer code which will help us to investigate this issue on our end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vidya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 09:29:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1397541#M33355</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-07-04T09:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Math kernel library yields different results to singular problems depending on processors</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1398854#M33373</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;thanks for your advises. I tried to set the environmental variable and succeeded, but I do not know where the additional information is printed. I am writing C# code in Visual Studio 2022.&lt;/P&gt;
&lt;P&gt;Anyway I found out, that setting the architecture via "mkl_cbwr_set" to "MKL_CBWR_AVX" solved my problem. Now the results coincide on all devices.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You asked yourself why we used these computational routines. My task was to translate old algorithms in C++ to new code in C#. In the old version we used a QR decomposition which was part of the IPP long time ago. In the first step I just wanted to translate it into C# language and since the QR decomposition is no longer part of the IPP, I had to switch to MKL.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Isa&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 07:52:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1398854#M33373</guid>
      <dc:creator>IsaPisa</dc:creator>
      <dc:date>2022-07-08T07:52:40Z</dc:date>
    </item>
    <item>
      <title>Re:Math kernel library yields different results to singular problems depending on processors</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1398867#M33375</link>
      <description>&lt;P&gt;Hi Isa,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;EM&gt;Anyway I found out, that setting the architecture via "mkl_cbwr_set" to "MKL_CBWR_AVX" solved my problem. Now the results coincide on all devices.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Yes, you are right, these settings help us to get reproducible results.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To anyone else who is looking into this issue, here are some more details about mkl_cbwr_set function and its usage.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-linux-developer-guide/top/obtaining-numerically-reproducible-results/get-started-with-conditional-num-reproducibility.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/develop/documentation/onemkl-linux-developer-guide/top/obtaining-numerically-reproducible-results/get-started-with-conditional-num-reproducibility.html&lt;/A&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 let us know 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>Fri, 08 Jul 2022 08:50:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1398867#M33375</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-07-08T08:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Math kernel library yields different results to singular problems depending on processors</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1398869#M33376</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you can close it. I am fine with it.&lt;/P&gt;
&lt;P&gt;Have a nice day&lt;/P&gt;
&lt;P&gt;Isa&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 08:55:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1398869#M33376</guid>
      <dc:creator>IsaPisa</dc:creator>
      <dc:date>2022-07-08T08:55:30Z</dc:date>
    </item>
    <item>
      <title>Re:Math kernel library yields different results to singular problems depending on processors</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1398907#M33377</link>
      <description>&lt;P&gt;Hi Isa,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&lt;/EM&gt;&lt;EM style="font-size: 16px; font-family: intel-clear;"&gt;you can close it&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks for the confirmation.&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;Have a Great 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>Fri, 08 Jul 2022 11:12:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Math-kernel-library-yields-different-results-to-singular/m-p/1398907#M33377</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-07-08T11:12:53Z</dc:date>
    </item>
  </channel>
</rss>

