<?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:numpy.linalg.eigh fails for large matrices in Intel® Distribution for Python*</title>
    <link>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1543258#M2108</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for sharing the details. We are checking on this internally, will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 13 Nov 2023 12:27:54 GMT</pubDate>
    <dc:creator>AthiraM_Intel</dc:creator>
    <dc:date>2023-11-13T12:27:54Z</dc:date>
    <item>
      <title>numpy.linalg.eigh fails for large matrices</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1539431#M2104</link>
      <description>&lt;P&gt;I find that numpy.linalg.eigh fails for large matrices, returning nonsense, and no error, immediately. On Ubuntu's python it works fine, if slowly. As an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import numpy as np&lt;/P&gt;&lt;P&gt;import numpy.linalg as npl&lt;/P&gt;&lt;P&gt;n=2**16&lt;/P&gt;&lt;P&gt;r=np.random.random((n,n))&lt;/P&gt;&lt;P&gt;w,v=npl.eigh(r)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fails, whereas n=2**15 works. Note that you will need quite a lot of memory to run this -- 256GB might suffice, but 384GB would be better. The more general numpy.linalg.eig works. Try 2**13 and note that eigh takes several seconds to run. For 2**16 it would be expected to take around 500 times as long (i.e. hours), not instantaneous! w ends up containing nonsense tiny values, mostly zero, and they are not even ordered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem observed with both Python 3.9.16 (main, Jun 15 2023, 02:33:25) and Python 3.6.8 |Intel Corporation| (default, Jan 15 2019, 04:34:13).&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 13:24:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1539431#M2104</guid>
      <dc:creator>MJR</dc:creator>
      <dc:date>2023-11-01T13:24:23Z</dc:date>
    </item>
    <item>
      <title>Re:numpy.linalg.eigh fails for large matrices</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1540256#M2105</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting in Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We ran the program with Intel Python 3.9.16. We could see that the time taken to run the program of 2**16 is more compared to 2**15 and that is expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We ran the program on Intel DevCloud for oneAPI (Ubuntu 20.04.6).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you upgrade to the latest version of Intel python and perform your tests.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you see the same issue with the latest Intel Python version, please share the below details:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;OS and Hardware details&lt;/LI&gt;&lt;LI&gt;Expected and actual results&lt;/LI&gt;&lt;LI&gt;Python version after upgrading&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Nov 2023 11:35:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1540256#M2105</guid>
      <dc:creator>AthiraM_Intel</dc:creator>
      <dc:date>2023-11-03T11:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Re:numpy.linalg.eigh fails for large matrices</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1541525#M2106</link>
      <description>&lt;P&gt;Thanks for your suggestions. I have just tried&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import numpy as np&lt;BR /&gt;import numpy.linalg as npl&lt;BR /&gt;import time&lt;/P&gt;&lt;P&gt;start_time=time.time()&lt;BR /&gt;n=2**16&lt;BR /&gt;r=np.random.random((n,n))&lt;BR /&gt;setup_time=time.time()&lt;BR /&gt;print("Setup time ",setup_time-start_time)&lt;BR /&gt;w,v=npl.eigh(r)&lt;BR /&gt;end_time=time.time()&lt;BR /&gt;print("Diagonalisation time ",end_time-setup_time)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With n=2**12 I get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setup time 0.22078585624694824&lt;BR /&gt;Diagonalisation time 1.914717674255371&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but with n=2**16 I get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setup time 53.627641916275024&lt;BR /&gt;Diagonalisation time 0.0010466575622558594&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which cannot be right. I would expect something around an hour or so for the diagonalisation. 'python --version' says&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Python 3.9.16 :: Intel Corporation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which I believe is the latest, the OS is Ubuntu 22.04.1LTS, and the CPU two Xeon Gold 6130. The machine has 192GB, so memory is not an issue. The results on an old dual CPU E5-2660 v3 are similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use Ubuntu's python (with OpenBLAS), then the setup time with n=2**16 is slightly slower at 65s, and the diagonalisation time is more credible (I got bored and stopped it after it had taken one core-hour).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 18:30:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1541525#M2106</guid>
      <dc:creator>MJR</dc:creator>
      <dc:date>2023-11-07T18:30:22Z</dc:date>
    </item>
    <item>
      <title>Re:numpy.linalg.eigh fails for large matrices</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1543258#M2108</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for sharing the details. We are checking on this internally, will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Nov 2023 12:27:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1543258#M2108</guid>
      <dc:creator>AthiraM_Intel</dc:creator>
      <dc:date>2023-11-13T12:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: numpy.linalg.eigh fails for large matrices</title>
      <link>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1566002#M2125</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we suggested to use&amp;nbsp;&lt;SPAN class=""&gt;the scipy.linalg.eigh() to work around this issue, and we tested it with 2**16 matrics in our lab and results is as below, although it have performance&amp;nbsp;&lt;SPAN&gt;penalty problem.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;root cause have been found and fixing is under investigating.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;thanks.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Setup time&amp;nbsp;53.75876045227051&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;[ -147.69128483&amp;nbsp;-147.68194538&amp;nbsp;-147.64563126 ...&amp;nbsp;&amp;nbsp;147.65570254&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;147.73823905 32767.76070977]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;[[ 0.00626784 -0.00164428&amp;nbsp;0.00365509 ... -0.0053086&amp;nbsp;&amp;nbsp;0.00305&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;-0.00392455]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;[-0.00037944 -0.00017431 -0.00150512 ...&amp;nbsp;0.00136626 -0.00402141&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;-0.00390795]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;[-0.00215462 -0.00214957&amp;nbsp;0.00446365 ...&amp;nbsp;0.00082956 -0.00353334&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;-0.00390896]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;[ 0.01007743 -0.00272315&amp;nbsp;0.0032907&amp;nbsp;...&amp;nbsp;0.00482207&amp;nbsp;0.00136076&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;-0.00390707]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;[ 0.00386407&amp;nbsp;0.00561695 -0.00165864 ... -0.00906698&amp;nbsp;0.00055503&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;-0.00389805]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;[-0.00045475&amp;nbsp;0.00196264&amp;nbsp;0.00091735 ...&amp;nbsp;0.00080511&amp;nbsp;0.00602332&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;-0.00389506]]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Diagonalisation time&amp;nbsp;9520.18740272522&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2024 08:23:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-for-Python/numpy-linalg-eigh-fails-for-large-matrices/m-p/1566002#M2125</guid>
      <dc:creator>PengHuang</dc:creator>
      <dc:date>2024-01-25T08:23:18Z</dc:date>
    </item>
  </channel>
</rss>

