<?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 A careful reading of the MKL in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapacke-dpptrf-could-contain-a-bug/m-p/962509#M15974</link>
    <description>&lt;P&gt;A careful reading of the MKL documentation on ?potrf and packed storage shows that there is no place for row-major or column-major packed storage issues. The concepts of row- or column-major apply only to arrays of rank greater than 1.&lt;/P&gt;

&lt;P&gt;There is only one convention for packed storage, and that is &lt;STRONG&gt;by columns&lt;/STRONG&gt;. If one is storing a lower triangular matrix, the packed 1-D array contains n elements from col-1, then n-1 elements from col-2,..., 1 element from col-n. If storing an upper triangular matrix, the packed 1-D array contains 1 element from col-1, then 2 from col-2,..., n elements from col-n.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Jan 2014 18:53:02 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2014-01-18T18:53:02Z</dc:date>
    <item>
      <title>lapacke_dpptrf could contain a bug</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapacke-dpptrf-could-contain-a-bug/m-p/962508#M15973</link>
      <description>Hello,
 using the intel MKL 11.1 for windows, i discovered what seems a bug in LAPACKE C interface to Lapack: calling LAPACKE_dpptrf (Cholesky decomposition) with a packed LT row major matrix does not produce the expected result. Results are correct only passing a column major matrix and thus the LAPACK dpptrf is right and i suspect the LAPACKE interface is not. Searching on the web i found the source file lapacke_dpptrf.c on the netlib site (with intel copyright) and the related lapacke_dpptrf_work.c which, i think, is the source of the bug. (see &lt;A href="http://www.netlib.org/lapack/explore-html/de/ddd/lapacke_8h.html)" target="_blank"&gt;http://www.netlib.org/lapack/explore-html/de/ddd/lapacke_8h.html)&lt;/A&gt; 

In the lapacke_dpptrf_work function a copy ap_t of the working matrix ap is transposed before and after the call of the factorization routine. The double transposition should not really necessary since a packed row major LT matrix has the same linear array representation of a packed column major UT matrix (and viceversa) and thus it would suffice to call LAPACK_dpptrf(&amp;amp;uplo,6n, &amp;amp;ap,&amp;amp;info) with uplo='U' if ap is a row major LT matrix and with uplo='L' if ap is a row major UT matrix. 

The correct code is very simple and does not require temporaries (ap_t) nor transpositions: 

     char tmp_uplo=uplo; 
     if(matrix_order==RowMajor) 
            tmp_uplo=(uplo=='L')?'U':'L';
    LAPACK_dpptrf( &amp;amp;tmp_uplo, &amp;amp;n, &amp;amp;ap_t, &amp;amp;info );

Note that after the factorization it isnt necessary to transpose the factor since it is already correct.
I tested the above code and the factor is the correct one.

Clearly also the companion solver routine LAPACKE_dpptrs_work   should be affected by the same problem and there you make 3 transpositions! one for the working matrix and two for the rhs, while only a pre and a post rhs transposition would suffice (may be a better solution exists).





best regards</description>
      <pubDate>Sat, 18 Jan 2014 15:54:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapacke-dpptrf-could-contain-a-bug/m-p/962508#M15973</guid>
      <dc:creator>igino_p_</dc:creator>
      <dc:date>2014-01-18T15:54:25Z</dc:date>
    </item>
    <item>
      <title>A careful reading of the MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapacke-dpptrf-could-contain-a-bug/m-p/962509#M15974</link>
      <description>&lt;P&gt;A careful reading of the MKL documentation on ?potrf and packed storage shows that there is no place for row-major or column-major packed storage issues. The concepts of row- or column-major apply only to arrays of rank greater than 1.&lt;/P&gt;

&lt;P&gt;There is only one convention for packed storage, and that is &lt;STRONG&gt;by columns&lt;/STRONG&gt;. If one is storing a lower triangular matrix, the packed 1-D array contains n elements from col-1, then n-1 elements from col-2,..., 1 element from col-n. If storing an upper triangular matrix, the packed 1-D array contains 1 element from col-1, then 2 from col-2,..., n elements from col-n.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2014 18:53:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapacke-dpptrf-could-contain-a-bug/m-p/962509#M15974</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-01-18T18:53:02Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapacke-dpptrf-could-contain-a-bug/m-p/962510#M15975</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;It seems there is indeed a bug in LAPACKE transposition for symmetric packed format if it's stored initially in Row major.&lt;/P&gt;

&lt;P&gt;W.B.R.,&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Alexander&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 06:10:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapacke-dpptrf-could-contain-a-bug/m-p/962510#M15975</guid>
      <dc:creator>Alexander_K_Intel3</dc:creator>
      <dc:date>2014-05-23T06:10:36Z</dc:date>
    </item>
    <item>
      <title>igino, please check the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapacke-dpptrf-could-contain-a-bug/m-p/962511#M15976</link>
      <description>&lt;P&gt;igino, please check the latest version 11.2 update 1 where the fix of that problem has been released and let us know the results.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2014 04:59:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapacke-dpptrf-could-contain-a-bug/m-p/962511#M15976</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2014-12-01T04:59:34Z</dc:date>
    </item>
  </channel>
</rss>

