<?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 Quote:Did someone else have in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932248#M13837</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Did someone else have similar problem?&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Merely asking that question, instead of describing your problem in sufficient detail, is not likely to lead to answers.&lt;/P&gt;
&lt;P&gt;Here is an example that shows GELSS working correctly for a 100 X 3 matrix. Therefore, the MKL implementation of GELSS works for some inputs. If you have an input for which it fails to give correct results, please publish the example. [fortran] program gelss_example
USE MKL95_LAPACK, ONLY: GELSS
!DEC$ OBJCOMMENT lib:'mkl_lapack95'
implicit none
integer, parameter :: dp=kind(1d0)
integer, parameter :: M=100,N=3
integer :: i,j,k
real(dp) :: A(M,N),x(N),B(M),delta(M)
!
! create test problem
!
call RANDOM_NUMBER(A); call RANDOM_NUMBER(delta)
x(1)=2.718; x(2)=3.1425; x(3)=0.1729
A=(2*A-1)*10          ! random numbers between -10 and +10
B=MATMUL(A,x)+(2*delta-1)*0.01
!
call GELSS(A,B)
write(*,10)x,B(1:N)
10 format(' Original x used to create B: ',3F8.5,/, &amp;amp;
          ' GELSS results for x        : ',3F8.5)
end program gelss_example
 [/fortran]&lt;/P&gt;
&lt;P&gt;Compiling and running on Windows using&lt;/P&gt;
&lt;P&gt;[bash] ifort /Qmkl xgelss.f90[/bash]&lt;/P&gt;
&lt;P&gt;I get the output&lt;/P&gt;
&lt;P&gt;[bash] Original x used to create B:  2.71800 3.14250 0.17290
 GELSS results for x        :  2.71796 3.14250 0.17291 [/bash]&lt;/P&gt;</description>
    <pubDate>Sun, 17 Feb 2013 15:05:00 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2013-02-17T15:05:00Z</dc:date>
    <item>
      <title>dgelss will output incorrect result when matrix = [100, 3]</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932245#M13834</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am using dgelss to simulate same result as pinv() in Matlab. When I set matrix to be [10, 3], the result is correct. But when I change the matrix size to be [100, 3], then the outcome will become a matrix with most elements to be 0.&lt;/P&gt;
&lt;P&gt;Any input will be welcome.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Hai&lt;/P&gt;</description>
      <pubDate>Sun, 03 Feb 2013 22:15:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932245#M13834</guid>
      <dc:creator>Hai</dc:creator>
      <dc:date>2013-02-03T22:15:14Z</dc:date>
    </item>
    <item>
      <title>Hai,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932246#M13835</link>
      <description>&lt;P&gt;Hai,&lt;/P&gt;
&lt;P&gt;Do you have a test code that could show this problem?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chao&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2013 07:22:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932246#M13835</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2013-02-04T07:22:31Z</dc:date>
    </item>
    <item>
      <title>Did someone else have similar</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932247#M13836</link>
      <description>&lt;P&gt;Did someone else have similar problem?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2013 16:38:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932247#M13836</guid>
      <dc:creator>Hai</dc:creator>
      <dc:date>2013-02-14T16:38:42Z</dc:date>
    </item>
    <item>
      <title>Quote:Did someone else have</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932248#M13837</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Did someone else have similar problem?&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Merely asking that question, instead of describing your problem in sufficient detail, is not likely to lead to answers.&lt;/P&gt;
&lt;P&gt;Here is an example that shows GELSS working correctly for a 100 X 3 matrix. Therefore, the MKL implementation of GELSS works for some inputs. If you have an input for which it fails to give correct results, please publish the example. [fortran] program gelss_example
USE MKL95_LAPACK, ONLY: GELSS
!DEC$ OBJCOMMENT lib:'mkl_lapack95'
implicit none
integer, parameter :: dp=kind(1d0)
integer, parameter :: M=100,N=3
integer :: i,j,k
real(dp) :: A(M,N),x(N),B(M),delta(M)
!
! create test problem
!
call RANDOM_NUMBER(A); call RANDOM_NUMBER(delta)
x(1)=2.718; x(2)=3.1425; x(3)=0.1729
A=(2*A-1)*10          ! random numbers between -10 and +10
B=MATMUL(A,x)+(2*delta-1)*0.01
!
call GELSS(A,B)
write(*,10)x,B(1:N)
10 format(' Original x used to create B: ',3F8.5,/, &amp;amp;
          ' GELSS results for x        : ',3F8.5)
end program gelss_example
 [/fortran]&lt;/P&gt;
&lt;P&gt;Compiling and running on Windows using&lt;/P&gt;
&lt;P&gt;[bash] ifort /Qmkl xgelss.f90[/bash]&lt;/P&gt;
&lt;P&gt;I get the output&lt;/P&gt;
&lt;P&gt;[bash] Original x used to create B:  2.71800 3.14250 0.17290
 GELSS results for x        :  2.71796 3.14250 0.17291 [/bash]&lt;/P&gt;</description>
      <pubDate>Sun, 17 Feb 2013 15:05:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932248#M13837</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-02-17T15:05:00Z</dc:date>
    </item>
    <item>
      <title>I already sent my code to</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932249#M13838</link>
      <description>&lt;P&gt;I already sent my code to &lt;A href="http://software.intel.com/en-us/user/22009"&gt;Chao Y&lt;/A&gt; who help me provided a temporary solution which can calculate dgelss correctly for a 100x3 matrix.&lt;/P&gt;
&lt;P&gt;I am not sure how Fortran code works. But my code works fine for a matrix with size 10x3. But when I change the matrix size to 100x3 or larger, the results will be almost zeros.&lt;/P&gt;
&lt;P&gt;Thanks for your input.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 21:31:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932249#M13838</guid>
      <dc:creator>Hai</dc:creator>
      <dc:date>2013-02-20T21:31:15Z</dc:date>
    </item>
    <item>
      <title>Thanks, Hai for the code. </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932250#M13839</link>
      <description>&lt;P&gt;Thanks, Hai for the code.&amp;nbsp; yes, we could verify this is a bug, and will fix it in the future release soon.&amp;nbsp; I am also checking if there is any workaound for this problem.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Chao&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2013 02:35:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932250#M13839</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2013-02-21T02:35:20Z</dc:date>
    </item>
    <item>
      <title>Dear Hai,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932251#M13840</link>
      <description>&lt;P&gt;Dear Hai,&lt;/P&gt;
&lt;P&gt;The problem comes from your code. Your reproducer has internal error: lwork query was done for the parameters differs from those of the second call of functionality.&lt;/P&gt;
&lt;P&gt;According to the MKL Reference Guide &amp;nbsp;the size of work array for dgelss depends on the first three input parameters. You call dgelss for determining the size of workspace for the set (m, n, n)&lt;/P&gt;
&lt;P&gt;dgelss(&amp;amp;m, &amp;amp;n, &amp;amp;n ...&lt;/P&gt;
&lt;P&gt;where m=100 and n=3. Meanwhile the second call is for another set of parameters (m, n, m)&lt;/P&gt;
&lt;P&gt;dgelss(&amp;amp;m, &amp;amp;n, &amp;amp;m, ..&lt;/P&gt;
&lt;P&gt;BUT the values &amp;nbsp;of these parameters must be identical for both calls.&lt;/P&gt;
&lt;P&gt;All the best&lt;/P&gt;
&lt;P&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 10:00:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgelss-will-output-incorrect-result-when-matrix-100-3/m-p/932251#M13840</guid>
      <dc:creator>Sergey_K_Intel1</dc:creator>
      <dc:date>2013-03-05T10:00:04Z</dc:date>
    </item>
  </channel>
</rss>

