<?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 Hello Dmitry, in Intel® Distribution for Python*</title>
    <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066015#M135</link>
    <description>&lt;P&gt;Hello Dmitry,&lt;/P&gt;

&lt;P&gt;Thank you for reporting the issue. We're trying to reproduce. Will come back soon with initial analysis.&lt;/P&gt;

&lt;P&gt;Sergey&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2017 05:36:31 GMT</pubDate>
    <dc:creator>Sergey_M_Intel2</dc:creator>
    <dc:date>2017-03-28T05:36:31Z</dc:date>
    <item>
      <title>Different results on different computers when using Scipy stack compiled with MKL</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066012#M132</link>
      <description>&lt;P&gt;Hi, I've noticed that my code gives different results on two different computers on the same inputs.&lt;/P&gt;

&lt;P&gt;It is a python code which in a nutshell performs SVD on the large input matrix, truncates SVD-produced matrices, constructs a new small matrix, and finally, finds eigenvalues of this small matrix and dumps only one of these eigenvalues in a deterministic way. Hence, the code depends heavily on the functions from scipy.linalg package. I also add some noise to the input matrix in the beginning of computations, but I set the seed before doing that, so the noise&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;should be the same for each run.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Two different computers are:&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;1) Lenovo D30 with Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz;&lt;BR /&gt;
	2) Dell Precision T7500 with&amp;nbsp;&lt;/SPAN&gt;Intel(R) Xeon(R) CPU X5650 &amp;nbsp;@ 2.67GHz&lt;/P&gt;

&lt;P&gt;I run the code on both machines with environment variable OMP_NUM_THREADS set to 1 to make sure that the discrepancy is not due to parallelism.&lt;/P&gt;

&lt;P&gt;So, I run my code on these two computers and with two different Python distributions: Continuum Anaconda 4.2 and Intel Python Distribution 2017u2.&lt;/P&gt;

&lt;P&gt;The results are attached (they are in a table form; couldn't find the way to write tables into the post itself). You can see from the results that for Anaconda I have such a strange behavior that for Case 2 on one computer the real part of the eigenvalue is negative, and on another one it's positive. For Intel Python, the biggest difference is for Case 1, where real parts significantly different (50 %).&lt;/P&gt;

&lt;P&gt;Could you please explain to me, why the results are different? Can it be a bug in MKL?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://community.intel.com/legacyfs/online/drupal_files/543667"&gt;543667&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2017 14:25:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066012#M132</guid>
      <dc:creator>Dmitry_K_</dc:creator>
      <dc:date>2017-03-25T14:25:29Z</dc:date>
    </item>
    <item>
      <title>Dmitry,</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066013#M133</link>
      <description>&lt;P&gt;Dmitry,&lt;/P&gt;

&lt;P&gt;I know you probably cannot. However, the question doesn't hurt. Are you able to share the code?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 01:46:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066013#M133</guid>
      <dc:creator>gaston-hillar</dc:creator>
      <dc:date>2017-03-28T01:46:43Z</dc:date>
    </item>
    <item>
      <title>jamie Howarth</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066014#M134</link>
      <description>&lt;P&gt;jamie Howarth&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; -webkit-text-size-adjust: 100%;"&gt;Dmitry -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Your problem seems to be quite similar to mine ... and your knowledge of DVD manipulation is possible of use to me and my company. I hope it's not inappropriate for me to ask if we could be put in touch?&lt;/P&gt;

&lt;P&gt;Jamie Howarth - Plangent Processes&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 04:19:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066014#M134</guid>
      <dc:creator>Jamie_H_</dc:creator>
      <dc:date>2017-03-28T04:19:34Z</dc:date>
    </item>
    <item>
      <title>Hello Dmitry,</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066015#M135</link>
      <description>&lt;P&gt;Hello Dmitry,&lt;/P&gt;

&lt;P&gt;Thank you for reporting the issue. We're trying to reproduce. Will come back soon with initial analysis.&lt;/P&gt;

&lt;P&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 05:36:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066015#M135</guid>
      <dc:creator>Sergey_M_Intel2</dc:creator>
      <dc:date>2017-03-28T05:36:31Z</dc:date>
    </item>
    <item>
      <title>Dmitry, </title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066016#M136</link>
      <description>&lt;P&gt;Dmitry,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Without having a reproducer there is little that can be said about the root cause of the observed discrepancy.&lt;BR /&gt;
	&lt;BR /&gt;
	Here are the steps I would take towards debugging.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;1. Please try using numpy.save to save the smaller truncated matrix to a file in both editions, and then try comparing them with np.allclose(mat1, mat2).&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;2. If both matrices are the same, please attach the file to this ticket, since this is the reproducer we need.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;3. If matrices turn out to be different, we need to proceed further upstream to pin-point which operation caused the discrepancy.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 12:59:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066016#M136</guid>
      <dc:creator>Oleksandr_P_Intel</dc:creator>
      <dc:date>2017-03-28T12:59:10Z</dc:date>
    </item>
    <item>
      <title>Dear Dmitry, </title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066017#M137</link>
      <description>&lt;P&gt;Dear Dmitry,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Please check if the discrepancy goes away if the python script is executed in an environment with MKL_CBWR=AUTO, which enables conditional numerical reproducibility mode.&lt;BR /&gt;
	&lt;BR /&gt;
	See artciles &lt;A href="https://software.intel.com/en-us/node/528408"&gt;https://software.intel.com/en-us/node/528408&lt;/A&gt; and&amp;nbsp;&amp;nbsp;&lt;A href="https://software.intel.com/en-us/node/528409"&gt;https://software.intel.com/en-us/node/528409&lt;/A&gt; for more details.&lt;/P&gt;

&lt;P&gt;Thank you,&lt;BR /&gt;
	Oleksandr&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 12:28:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066017#M137</guid>
      <dc:creator>Oleksandr_P_Intel</dc:creator>
      <dc:date>2017-03-30T12:28:55Z</dc:date>
    </item>
    <item>
      <title>I've got a permission to</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066018#M138</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;I've got a permission to share the code with Intel employees but privately because it's a research code. Currently, the code is in a private GitHub repo (along with inputs and results). What is the best way to share it with you, Sergey or Oleksandr? If you know my email address, feel free to contact me through email.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Oleksandr, using&amp;nbsp;​&lt;SPAN style="font-size: 12px;"&gt;MKL_CBWR=AUTO I get exactly the same results as I get without setting this environment variable.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Gaston, if you are affiliated with Intel, I think I can share the code with you as well.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 15:29:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066018#M138</guid>
      <dc:creator>Dmitry_K_</dc:creator>
      <dc:date>2017-03-30T15:29:00Z</dc:date>
    </item>
    <item>
      <title>Dmitry K.,</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066019#M139</link>
      <description>&lt;P&gt;Dmitry K.,&lt;/P&gt;

&lt;P&gt;This is an open forum. If somebody searches on Google, they will find everything that is posted in this forum.&lt;/P&gt;

&lt;P&gt;Most of the people that ask for answers in the public forums share their code so that they can receive help from Intel® Engineers and from others that are not from Intel® but are working with Intel® products.&lt;/P&gt;

&lt;P&gt;I understand that you cannot share research code. However, I just wanted to let you know you are in a public forum, just in case you share things here by mistake.&lt;/P&gt;

&lt;P&gt;As you don't share the code, I won't be able to provide you my experience using Intel Distribution for Python. I'm sure Intel® Engineers will be able to help you.&lt;/P&gt;

&lt;P&gt;However, in case you cannot share things about your solution, you might probably want to consider buying a license and using the private forums. When you buy licenses, you have premium support options where Intel® Engineers are able to provide premium support for your cases in which you can share code privately with them. Just in case you didn't know.&lt;/P&gt;

&lt;P&gt;I don't earn a referral fee on any license sold. However, I thought it was probably helpful for you to know about additional support options. Good luck with the solution to your issue.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2017 16:44:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066019#M139</guid>
      <dc:creator>gaston-hillar</dc:creator>
      <dc:date>2017-04-01T16:44:36Z</dc:date>
    </item>
    <item>
      <title>Thank you, Gastón.</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066020#M140</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 13.008px;"&gt;Gastón.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 13.008px;"&gt;Unfortunately, I didn't get the permission to make the code public for everybody. Hopefully, the Intel engineers will fix the problem soon.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2017 17:07:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066020#M140</guid>
      <dc:creator>Dmitry_K_</dc:creator>
      <dc:date>2017-04-01T17:07:08Z</dc:date>
    </item>
    <item>
      <title>Hello Gastón,</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066021#M141</link>
      <description>&lt;P&gt;Hello Gastón,&lt;/P&gt;

&lt;P&gt;We're still root causing the issue.&lt;/P&gt;

&lt;P&gt;Despite Dmitry cannot share the code publicly I can reassure you that Intel engineers will publicly report back what&amp;nbsp;was wrong with Intel Python.&lt;/P&gt;

&lt;P&gt;Current hypothesis (confirmed by Oleksandr's experiments) is that the wrong code path in MKL is chosen when Dmitry calls one of NumPy/SciPy functions. We do not know yet what function misbehaves, which is bad news. The good news is that we reproduced the misbehavior. Interestingly the behavior is only reproduced with certain versions&amp;nbsp;of MKL.&lt;/P&gt;

&lt;P&gt;Keep you all updated,&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;

&lt;P&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2017 19:02:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066021#M141</guid>
      <dc:creator>Sergey_M_Intel2</dc:creator>
      <dc:date>2017-04-01T19:02:58Z</dc:date>
    </item>
    <item>
      <title>Sergey,</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066022#M142</link>
      <description>&lt;P&gt;Sergey,&lt;/P&gt;

&lt;P&gt;It's great to know that Intel engineers will publicly report back if something was wrong. I'm working hard with the same stack and it will also be helpful for me to know the results of this thread.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2017 18:47:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066022#M142</guid>
      <dc:creator>gaston-hillar</dc:creator>
      <dc:date>2017-04-02T18:47:55Z</dc:date>
    </item>
    <item>
      <title>Quote:Dmitry K. wrote:</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066023#M143</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Dmitry K. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thank you,&amp;nbsp;Gastón.&lt;/P&gt;

&lt;P&gt;Unfortunately, I didn't get the permission to make the code public for everybody. Hopefully, the Intel engineers will fix the problem soon.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Dmitry, I completely understand. I also work with code pieces that are under dozens of NDAs. :)&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2017 18:49:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066023#M143</guid>
      <dc:creator>gaston-hillar</dc:creator>
      <dc:date>2017-04-02T18:49:01Z</dc:date>
    </item>
    <item>
      <title>After receiving the code from</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066024#M144</link>
      <description>&lt;P&gt;After receiving the code from Dmitry I was able to reproduce exact same different results by using &lt;A href="https://software.intel.com/en-us/articles/introduction-to-the-conditional-numerical-reproducibility-cnr"&gt;conditional numeric reproducibility&lt;/A&gt; flag MKL_CBWR.&lt;/P&gt;

&lt;P&gt;The processor Intel(R) Xeon(R) CPU E5-2680 v2 from Lenovo computer supports extended processor instruction set AVX (see &lt;A href="http://ark.intel.com/products/75277/Intel-Xeon-Processor-E5-2680-v2-25M-Cache-2_80-GHz"&gt;http://ark.intel.com/products/75277/Intel-Xeon-Processor-E5-2680-v2-25M-Cache-2_80-GHz&lt;/A&gt;), while the older processor from the Dell computer only supports SSE4.2 set (&lt;A href="http://ark.intel.com/products/47922/Intel-Xeon-Processor-X5650-12M-Cache-2_66-GHz-6_40-GTs-Intel-QPI"&gt;http://ark.intel.com/products/47922/Intel-Xeon-Processor-X5650-12M-Cache-2_66-GHz-6_40-GTs-Intel-QPI&lt;/A&gt;).&lt;/P&gt;

&lt;P&gt;Setting environmental variables MKL_CBWR=AVX and OMP_NUM_THREADS=1 and running Dmitry’s scripts, I obtained exact same outputs down to the last decimal digit, reported for Lenovo.&lt;/P&gt;

&lt;P&gt;Setting MKL_CBWR=SSE4_2 and OMP_NUM_THREADS=1, I obtained outputs reported for Dell.&lt;/P&gt;

&lt;P&gt;As alluded to by Dmitry the code performs singular value decomposition of a rectangular array, that has most of its eigenvalues close to the machine epsilon, while few others are on the scale of 1, making the input very ill-conditioned.&lt;/P&gt;

&lt;P&gt;Exercising different implementations of the same decomposition algorithm introduces different round-off errors, leading to different values of very small singular values, and most importantly to different associated orthogonal vectors.&lt;/P&gt;

&lt;P&gt;The orthogonal vectors are used to perform dimensional reduction. The relatively small error in orthogonal vectors is further amplified by dividing results of its dot-product by the associated small singular value, leading to discrepancies.&lt;/P&gt;

&lt;P&gt;In short the computational problem arising in Dmitry’s code is ill-conditioned, and expected discrepancies are naturally amplified during the run of the algorithm.&lt;/P&gt;

&lt;P&gt;In other words, my conclusion is that the difference is not due to any bug in the Intel Distribution for Python.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 02:35:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/Different-results-on-different-computers-when-using-Scipy-stack/m-p/1066024#M144</guid>
      <dc:creator>Oleksandr_P_Intel</dc:creator>
      <dc:date>2017-04-15T02:35:00Z</dc:date>
    </item>
  </channel>
</rss>

