<?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 it's a 1x10 matrix with in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958893#M15696</link>
    <description>&lt;P&gt;it's a 1x10 matrix with leading dim = 2, so data_[1]/[5] should be useless, and 1x10 should be large enough according to the ref man.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;mecej4 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Check in the MKL documentation to see whether you have made the work array large enough. The values of data_[1] and data_[5] arouse suspicion that these may be undefined, and therefore vary from run to run.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jul 2013 17:35:28 GMT</pubDate>
    <dc:creator>kangshiyin</dc:creator>
    <dc:date>2013-07-24T17:35:28Z</dc:date>
    <item>
      <title>bug in MKL 11.0update5 DGESVG</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958891#M15694</link>
      <description>&lt;P&gt;Same code works fine in 11.0update1 but return error (result=-13) in update5&lt;/P&gt;
&lt;P&gt;Linux version CentOS 6.4&lt;BR /&gt;$ uname -a&lt;BR /&gt;Linux 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;code:&lt;/P&gt;
&lt;P&gt;dgesvd(v_job, u_job,&amp;nbsp;&amp;amp;M, &amp;amp;N, data_, &amp;amp;LDA,&amp;nbsp;s-&amp;gt;Data(),&amp;nbsp;V-&amp;gt;Data(), &amp;amp;V_stride,&amp;nbsp;U-&amp;gt;Data(), &amp;amp;U_stride,&amp;nbsp;p_work, &amp;amp;l_work,&amp;nbsp;&amp;amp;result);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;data:&lt;/P&gt;
&lt;P&gt;u_job char * 0x4d4fea "N"&amp;nbsp;&lt;BR /&gt;v_job char * 0x4d4fea "N"&amp;nbsp;&lt;BR /&gt;M KaldiBlasInt 1 &lt;BR /&gt;N KaldiBlasInt 10&amp;nbsp;&lt;BR /&gt;LDA KaldiBlasInt 2&amp;nbsp;&lt;BR /&gt;V_stride KaldiBlasInt 2&amp;nbsp;&lt;BR /&gt;U_stride KaldiBlasInt 2&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data_ double [20] 0x741300 &lt;BR /&gt; data_[0] double 0.78239572048187256 &lt;BR /&gt; data_[1] double 1.0829823019173015e-312 &lt;BR /&gt; data_[2] double -0.50321561098098755 &lt;BR /&gt; data_[3] double 1.5021374629402668 &lt;BR /&gt; data_[4] double 2.4055604934692383 &lt;BR /&gt; data_[5] double 1.0829822489929895e-312 &lt;BR /&gt; data_[6] double -0.79770100116729736 &lt;BR /&gt; data_[7] double 0 &lt;BR /&gt; data_[8] double 0.25807684659957886 &lt;BR /&gt; data_[9] double 0 &lt;BR /&gt; data_[10] double 1.0628244876861572 &lt;BR /&gt; data_[11] double 0 &lt;BR /&gt; data_[12] double 0.30530369281768799 &lt;BR /&gt; data_[13] double 0 &lt;BR /&gt; data_[14] double 0.82724034786224365 &lt;BR /&gt; data_[15] double 0 &lt;BR /&gt; data_[16] double -0.49196150898933411 &lt;BR /&gt; data_[17] double 0 &lt;BR /&gt; data_[18] double -0.21408705413341522 &lt;BR /&gt; data_[19] double -0.10297946631908417&lt;/P&gt;
&lt;P&gt;l_work KaldiBlasInt 5&amp;nbsp;&lt;/P&gt;
&lt;P&gt;p_work double * 0x741460&lt;/P&gt;
&lt;P&gt;result KaldiBlasInt -13&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 17:14:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958891#M15694</guid>
      <dc:creator>kangshiyin</dc:creator>
      <dc:date>2013-07-24T17:14:11Z</dc:date>
    </item>
    <item>
      <title>Check in the MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958892#M15695</link>
      <description>&lt;P&gt;Check in the MKL documentation to see whether you have made the work array large enough. The values of data_[1] and data_[5] arouse suspicion that these may be undefined, and therefore vary from run to run.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 17:27:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958892#M15695</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-07-24T17:27:16Z</dc:date>
    </item>
    <item>
      <title>it's a 1x10 matrix with</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958893#M15696</link>
      <description>&lt;P&gt;it's a 1x10 matrix with leading dim = 2, so data_[1]/[5] should be useless, and 1x10 should be large enough according to the ref man.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;mecej4 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Check in the MKL documentation to see whether you have made the work array large enough. The values of data_[1] and data_[5] arouse suspicion that these may be undefined, and therefore vary from run to run.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 17:35:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958893#M15696</guid>
      <dc:creator>kangshiyin</dc:creator>
      <dc:date>2013-07-24T17:35:28Z</dc:date>
    </item>
    <item>
      <title>The value of l_work in your</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958894#M15697</link>
      <description>&lt;P&gt;The value of l_work in your argument list is given as 5. For m = 1 and n = 10, that value does not satisfy the requirement that&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; l_work&amp;nbsp;≥&amp;nbsp;max(3*min(m,&amp;nbsp;n)+max(m,&amp;nbsp;n), 5*min(m,n)).&lt;/P&gt;
&lt;P&gt;Please edit your first post and change "DGESVG" to "DGESVD" in the thread title so that future users may use the search features to find this page.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 17:50:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958894#M15697</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-07-24T17:50:00Z</dc:date>
    </item>
    <item>
      <title>Thanks for the quick reply.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958895#M15698</link>
      <description>Thanks for the quick reply.
I just reviewed the code and found that l_work=5 is a query result given by dgesvd() itself by setting l_work=-1 first.

I write a simple code to test this issue.
I found the query result of l_work are both 5 for 11.0.1 and 11.0.5,
but 11.0.5 will then give "MKL ERROR: Parameter 13 was incorrect on entry to DGESVD." while 11.0.1 not.
Here is the test code

PS. I cannot find EDIT button for my original post. Should a post a new thread? 

#include
#include

int main()
{
        double data[20] =
        { 2, 7, 5, 9, 3, 6, 2, 5, 4, 8, 5, 6, 3, 4, 6, 3, 7, 2, 3 };
        int m = 1;
        int n = 10;
        int lda = 2;
        int ldvt = 2;
        int ldu = 2;
        int l_work = -1;
        double p_work[100];
        int result;
        double s[100], u[100], vt[100];

        dgesvd("N", "N", &amp;amp;m, &amp;amp;n, data, &amp;amp;lda, s, u, &amp;amp;ldu, vt, &amp;amp;ldvt, p_work, &amp;amp;l_work,
                        &amp;amp;result);
        std::cout &amp;lt;&amp;lt; p_work[0] &amp;lt;&amp;lt; std::endl;

        l_work = (int) p_work[0];
        dgesvd("N", "N", &amp;amp;m, &amp;amp;n, data, &amp;amp;lda, s, u, &amp;amp;ldu, vt, &amp;amp;ldvt, p_work, &amp;amp;l_work,
                        &amp;amp;result);

        std::cout &amp;lt;&amp;lt;"MKL ver: "&amp;lt;&amp;lt; INTEL_MKL_VERSION &amp;lt;&amp;lt; std::endl;

        return 0;
}</description>
      <pubDate>Thu, 25 Jul 2013 02:45:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958895#M15698</guid>
      <dc:creator>kangshiyin</dc:creator>
      <dc:date>2013-07-25T02:45:00Z</dc:date>
    </item>
    <item>
      <title>I cannot understand what your</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958896#M15699</link>
      <description>&lt;P&gt;I cannot understand what your program is trying to do. One difficulty is that you chose to call the Fortran 77 routine &lt;STRONG&gt;dgesvd&lt;/STRONG&gt; from C++, rather than using the better-suited LapackE interface.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The array &lt;STRONG&gt;data&lt;/STRONG&gt; is declared to be of size 20, but the initialization list contains 19 values.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Neither of these numbers equals the product of the specified values of m and n.&lt;/LI&gt;
&lt;LI&gt;The values of lda, ldu, ldvt do not match either m or n, and I see no reason why they should not.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;To untangle the problem, let us back up and state the mathematical problem clearly. You want to compute the decomposition A = U.S.V&lt;SUP&gt;T&lt;/SUP&gt;, what is the size of matrix A, and what are its elements? Once we establish that, we can proceed to implementing the decomposition using MKL.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2013 09:08:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958896#M15699</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-07-25T09:08:19Z</dc:date>
    </item>
    <item>
      <title>The above program is trying</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958897#M15700</link>
      <description>&lt;P&gt;The above program is trying to show there's an implementation bug in MKL 11.0.5&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Using fortran 77 interface in my real code is to enable the code link to other BLAS libs such as ATLAS.&lt;/LI&gt;
&lt;LI&gt;init list with 19 values is a typo, and I will fix it.&lt;/LI&gt;
&lt;LI&gt;lead&amp;nbsp;dimensions like lda ldu ldvt often greater than the length of the rows in a row-major matrix is because we are trying to make the data well aligned. Please refer to &lt;A href="http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_userguide_lnx/GUID-8672C441-6165-4E29-A771-CAB2A0F07652.htm"&gt;this link&lt;/A&gt; for further discussion. &amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;the size of A is 1x10&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;All these details have nothing to do with the bug.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2013 09:32:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958897#M15700</guid>
      <dc:creator>kangshiyin</dc:creator>
      <dc:date>2013-07-25T09:32:52Z</dc:date>
    </item>
    <item>
      <title>Thanks. Using the details</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958898#M15701</link>
      <description>&lt;P&gt;Thanks. Using the details that you just provided, I constructed an easier-to-use reproducer in Fortran and posted it as &lt;A href="http://software.intel.com/en-us/forums/topic/402473" target="_blank"&gt;http://software.intel.com/en-us/forums/topic/402473&lt;/A&gt;, "Incorrect workspace size returned by query to DGESVD in MKL 11.0.5" .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gennady Fedorov (Intel) has responded to that post and they are looking into the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2013 11:27:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958898#M15701</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2013-07-25T11:27:00Z</dc:date>
    </item>
    <item>
      <title>good to know...</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958899#M15702</link>
      <description>&lt;P&gt;good to know...&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2013 17:20:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958899#M15702</guid>
      <dc:creator>kangshiyin</dc:creator>
      <dc:date>2013-07-25T17:20:27Z</dc:date>
    </item>
    <item>
      <title>kangshiyin,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958900#M15703</link>
      <description>&lt;P&gt;kangshiyin,&lt;/P&gt;
&lt;P&gt;Thank you for reporting the issue. Workaround is to set gesvd lwork &amp;nbsp;≥ max(3*min(m, n)+max(m, n), 5*min(m,n)) for real flavors and lwork ≥ 2*min(m, n)+max(m, n) for complex flavors for m and n such that (12*m+n) &amp;lt;160 or (12*n+m) &amp;lt;160.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 09:42:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bug-in-MKL-11-0update5-DGESVG/m-p/958900#M15703</guid>
      <dc:creator>Aleksandr_Z_Intel</dc:creator>
      <dc:date>2013-08-08T09:42:38Z</dc:date>
    </item>
  </channel>
</rss>

