<?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: sgels function return different answers for mkl 18.5 and 19.5 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgels-function-return-different-answers-for-mkl-18-5-and-19-5/m-p/1223427#M30252</link>
    <description>&lt;P&gt;The MKL documentation for ?gels says, "&lt;SPAN&gt;It is assumed that&amp;nbsp;&lt;/SPAN&gt;&lt;VAR class="keyword varname"&gt;&lt;/VAR&gt;A&lt;LI-WRAPPER&gt;&lt;VAR class="keyword varname"&gt;&lt;/VAR&gt;&lt;SPAN&gt;&amp;nbsp;has full rank". Your matrix is of size 2 X 2 but its rank is only 1, so the input to the routine is improper. In such cases, what is the point of comparing the output, which could well be meaningless?&lt;/SPAN&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2020 00:46:04 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2020-10-28T00:46:04Z</dc:date>
    <item>
      <title>sgels function return different answers for mkl 18.5 and 19.5</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgels-function-return-different-answers-for-mkl-18-5-and-19-5/m-p/1223413#M30251</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code that calls sgels returns different answers depending on whether I link with mkl 18.5 or 19.5. Also mkl 18.5 seems return different results depending on different machines.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My link command :&lt;/P&gt;
&lt;P&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&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;      program reproduce
        implicit none

        integer :: row_A, col_A, row_B, col_B, info
        integer :: i
        real, allocatable :: A(:,:), B(:,:), work(:,:)

        ! allocate input matrices
        row_A = 2
        col_A = 2
        row_B = 2
        col_B = 1

        allocate(A(row_A,col_A))
        allocate(B(row_B,col_B))
        allocate(work(row_A*row_B,col_A*col_B))

        A = 1
        B = 1490.890

        ! sgels
        call sgels('N', size(A,1), size(A,2), size(B,2), A, size(A,1), B,    &amp;amp;
                              size(B,1), work, size(work), info)

        ! check
        write(*,*) '--&amp;gt; A matrix'
        do i = 1, ubound(A, 1)
           write(*,*) A(i, :)
        end do
        write(*,*) '--&amp;gt; B matrix'
        do i = 1, ubound(B, 1)
           write(*,*) B(i, :)
        end do
        write(*,*) '--&amp;gt; Info'
        write(*,*) info

        deallocate(A, B, work)

      end program&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Output for mkl 19 on skylake (Intel(R) Xeon(R) W-2145 CPU @ 3.70GHz)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;--&amp;gt; A matrix&lt;BR /&gt;-1.414214 -1.414214 &lt;BR /&gt;0.4142135 0.0000000E+00&lt;BR /&gt;--&amp;gt; B matrix&lt;BR /&gt;-2108.437 &lt;BR /&gt;8.2589657E-05&lt;BR /&gt;--&amp;gt; Info&lt;/P&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Output for mkl 18 on skylake (Intel(R) Xeon(R) W-2145 CPU @ 3.70GHz)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;--&amp;gt; A matrix&lt;BR /&gt;-1.414214 -1.414214 &lt;BR /&gt;0.4142135 1.9078982E-08&lt;BR /&gt;--&amp;gt; B matrix&lt;BR /&gt;-2837.939 &lt;BR /&gt;4328.829 &lt;BR /&gt;--&amp;gt; Info&lt;BR /&gt;0&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Output for mkl 18 on sandybridge&amp;nbsp; ( Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;--&amp;gt; A matrix&lt;BR /&gt;-1.414214 -1.414214 &lt;BR /&gt;0.4142135 0.0000000E+00&lt;BR /&gt;--&amp;gt; B matrix&lt;BR /&gt;-2108.437 &lt;BR /&gt;1.2207031E-04&lt;BR /&gt;--&amp;gt; Info&lt;BR /&gt;2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 22:52:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgels-function-return-different-answers-for-mkl-18-5-and-19-5/m-p/1223413#M30251</guid>
      <dc:creator>gn164</dc:creator>
      <dc:date>2020-10-27T22:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: sgels function return different answers for mkl 18.5 and 19.5</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgels-function-return-different-answers-for-mkl-18-5-and-19-5/m-p/1223427#M30252</link>
      <description>&lt;P&gt;The MKL documentation for ?gels says, "&lt;SPAN&gt;It is assumed that&amp;nbsp;&lt;/SPAN&gt;&lt;VAR class="keyword varname"&gt;&lt;/VAR&gt;A&lt;LI-WRAPPER&gt;&lt;VAR class="keyword varname"&gt;&lt;/VAR&gt;&lt;SPAN&gt;&amp;nbsp;has full rank". Your matrix is of size 2 X 2 but its rank is only 1, so the input to the routine is improper. In such cases, what is the point of comparing the output, which could well be meaningless?&lt;/SPAN&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 00:46:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sgels-function-return-different-answers-for-mkl-18-5-and-19-5/m-p/1223427#M30252</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2020-10-28T00:46:04Z</dc:date>
    </item>
  </channel>
</rss>

