<?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 Hi Harry, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067471#M21991</link>
    <description>&lt;P&gt;Hi Harry,&lt;/P&gt;

&lt;P&gt;Eigenvectors returned by DGEEV are normalized and have largest component real, but the sign of the eigenvectors is not defined.&lt;/P&gt;

&lt;P&gt;If you need bitwise reproducible results (perhaps at a performance tradeoff), please refer to conditional numerical reproducibility feature of Intel MKL, &lt;A href="https://software.intel.com/en-us/articles/introduction-to-the-conditional-numerical-reproducibility-cnr"&gt;here&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Dima&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2016 09:23:15 GMT</pubDate>
    <dc:creator>Dmitry_B_Intel</dc:creator>
    <dc:date>2016-05-19T09:23:15Z</dc:date>
    <item>
      <title>LAPACKE_dgeev result differences on different CPU architectures</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067470#M21990</link>
      <description>&lt;P&gt;Hi, I am using MKL 11.1 to find eigen vectors with and am having issues with the results changing sign depending on which machine I run this. This gives completely different results in the end for an ellipse fitting algorithm and, thus, failures in automated tests.&lt;/P&gt;

&lt;P&gt;Given the following matrix in row major order:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;PRE class="brush:cpp;"&gt;-8747596.5053710938      -316030.00427246094       1615084.5202636719
-5749756.8850097656      -667037.37084960938       632059.98022460938
 52358865.204467773       2874878.4188232422      -8747596.5129394531&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The following call is made:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;auto squareSize = 3;
auto info = LAPACKE_dgeev( LAPACK_ROW_MAJOR, 'N', 'V', squareSize, 
  inputArrayOutput.Data(), squareSize, 
  realEigenValues.Data(), imaginaryEigenValues.Data(), 
  nullptr, squareSize, rightEigenVectors.Data(), squareSize );
&lt;/PRE&gt;

&lt;P&gt;Running this on machines that give the "correct" or expected result will give.&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;inputAndOutput
-18162659.389763702       -4492507.6042798907      -5290349.3859531470
 0.00000000000000000       214.50030177488844       915701.07938791020
 0.00000000000000000      -0.0070577840503023292    214.50030177488844
real eigenvalues
-18162659.389763702        214.50030177488844       214.50030177488844 
imag eigenvalues
0.00000000000000000        80.391669176281070      -80.391669176281070  
right eigenvectors
 0.17135077952698607       0.15755967091010539     -6.3641462760426620e-06
 0.091750438224901587     -0.67430368000587571      0.00013608158502213653
-0.98092852310503897       0.72144956765842805      0.00000000000000000
&lt;/PRE&gt;

&lt;P&gt;But on a "failing" machine this will give something like:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;inputAndOutput
-18162659.389763702        4492507.6042798860      -5290349.3859531470
 0.00000000000000000       214.50030177486741      -915701.07938790950
 0.00000000000000000       0.0070577836735623567    214.50030177486741
real eigenvalues
-18162659.389763702        214.50030177486741       214.50030177486741 
imag eigenvalues
 0.00000000000000000       80.391667030653210      -80.391667030653210 
right eigenvectors
 0.17135077952698605      -0.15755967091010534      6.3641461061856458e-06
 0.091750438224901559      0.67430368000587682     -0.00013608158139016290
-0.98092852310503875      -0.72144956765842760      0.00000000000000000&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;As can be seen the sign of the last two right eigen vectors changes. The question then is why? And how can one correct this sign change so the result will always have the same sign? It seems to be correlated to the output in "inputAndOutput" but how?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Or is this in fact a bug and would a later MKL version fix this?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 08:49:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067470#M21990</guid>
      <dc:creator>Harry_F_</dc:creator>
      <dc:date>2016-05-19T08:49:55Z</dc:date>
    </item>
    <item>
      <title>Hi Harry,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067471#M21991</link>
      <description>&lt;P&gt;Hi Harry,&lt;/P&gt;

&lt;P&gt;Eigenvectors returned by DGEEV are normalized and have largest component real, but the sign of the eigenvectors is not defined.&lt;/P&gt;

&lt;P&gt;If you need bitwise reproducible results (perhaps at a performance tradeoff), please refer to conditional numerical reproducibility feature of Intel MKL, &lt;A href="https://software.intel.com/en-us/articles/introduction-to-the-conditional-numerical-reproducibility-cnr"&gt;here&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Dima&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 09:23:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067471#M21991</guid>
      <dc:creator>Dmitry_B_Intel</dc:creator>
      <dc:date>2016-05-19T09:23:15Z</dc:date>
    </item>
    <item>
      <title>Hi Dmitry, thanks for the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067472#M21992</link>
      <description>&lt;P&gt;Hi Dmitry, thanks for the reply. Ok I should try that then, since we are targetting SSE2 or later processors I assume I should call "&lt;SPAN style="color: rgb(102, 102, 102); font-family: 'Courier New', 'DejaVu Sans Mono', monospace, sans-serif; font-size: 14px; line-height: 22.4px;"&gt;mkl_cbwr_set(MKL_CBWR_SSE2)". Any data on how much slower this might be?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 09:42:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067472#M21992</guid>
      <dc:creator>Harry_F_</dc:creator>
      <dc:date>2016-05-19T09:42:00Z</dc:date>
    </item>
    <item>
      <title>Hi, we have examining this</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067473#M21993</link>
      <description>&lt;P&gt;Hi, we have examining this more closely and it appears this issue only occurs when MKL is run on a virtual machine, are there any known issues with regard to using MKL on virtual machines? Does CPU dispatching not work?&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2016 08:35:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067473#M21993</guid>
      <dc:creator>Harry_F_</dc:creator>
      <dc:date>2016-05-22T08:35:52Z</dc:date>
    </item>
    <item>
      <title>Hi Harry,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067474#M21994</link>
      <description>&lt;P&gt;Hi Harry,&lt;/P&gt;

&lt;P&gt;Intel MKL supports only so-called run-to-run reproducibility of results. It means that running twice your application on any particular machine, you'll get bit-wise identical results (keeping the enviroment the same). There's no guarantee that you'll be able to get this on different machines even with CBWR feature set to the same value (as many parameters like number of threads, cache size etc. matter).&lt;/P&gt;

&lt;P&gt;So, I recommend you to use&amp;nbsp;&lt;SPAN style="font-weight: bold; color: rgb(106, 106, 106); font-family: arial, sans-serif; font-size: small; line-height: 18.2px;"&gt;MKL_CBWR_AUTO &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;as it will work for any instruction set you're running at the moment. For example, at AVX2 machines it will give much better performance comparing to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: rgb(106, 106, 106); font-family: arial, sans-serif; font-size: small; font-weight: bold; line-height: 18.2px;"&gt;MKL_CBWR_SSE2.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Regards, Konstantin&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 06:01:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeev-result-differences-on-different-CPU-architectures/m-p/1067474#M21994</guid>
      <dc:creator>Konstantin_A_Intel</dc:creator>
      <dc:date>2016-05-24T06:01:36Z</dc:date>
    </item>
  </channel>
</rss>

