<?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:Cholesky Decomposition for Positive Semidefinite Matrices (LAPACKE_dpstrf) in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cholesky-Decomposition-for-Positive-Semidefinite-Matrices/m-p/1579387#M35904</link>
    <description>&lt;P&gt;MKL 2024.0 returns the following &lt;STRONG&gt;ipiv ( 1,3,2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;see below the verbose output:&lt;/P&gt;&lt;P&gt;MKL_VERBOSE oneMKL 2023.0 Update 2 Product build 20230613 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors, Lnx 2.30GHz lp64 intel_thread&lt;/P&gt;&lt;P&gt;MKL_VERBOSE DPSTRF(U,3,0x7ffd288f1480,3,0x1f3bf00,3,0x7ffd288f13b8,0x1f4d100,0) 2.58ms CNR:OFF Dyn:1 FastMM:1 TID:0&amp;nbsp;NThr:36&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;LAPACKE_dpstrf, info == 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;5.47723, 2.37346, 2.00832,&amp;nbsp;&lt;/P&gt;&lt;P&gt;11, 3.37145, 2.44208,&amp;nbsp;&lt;/P&gt;&lt;P&gt;13, 13, 0.054153,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 11 Mar 2024 12:13:51 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2024-03-11T12:13:51Z</dc:date>
    <item>
      <title>Cholesky Decomposition for Positive Semidefinite Matrices (LAPACKE_dpstrf)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cholesky-Decomposition-for-Positive-Semidefinite-Matrices/m-p/1572090#M35823</link>
      <description>&lt;P&gt;I would like to revisit an older question (see &lt;A href="http://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/incorrect-pivot-index-of-cholesky-decomposition/m-p/1208237#M30044" target="_self"&gt;incorrect pivot index of cholesky decomposition&lt;/A&gt;) which, from my perspective, has not been conclusively answered or for which I may be interpreting the previous answer incorrectly:&lt;/P&gt;&lt;P&gt;For real, symmetric, and positive semidefinite matrices, a Cholesky decomposition can be performed using the LAPACKE_dpstrf(...) function, for example, for the matrix&lt;/P&gt;&lt;P&gt;m = &lt;SPAN class=""&gt;{{30, 11, 13},&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {11, 10, 13},&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {13, 13, 17}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(see code at the end of this message and &lt;A href="http://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/incorrect-pivot-index-of-cholesky-decomposition/m-p/1208237#M30044" target="_self"&gt;incorrect pivot index of cholesky decomposition&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Even with the latest Intel compilers and the corresponding MKL (2024.0) on Ubuntu 20.04, the LAPACKE_dpstrf(...) function appears to produce peculiar values for the permutation matrix, namely piv = (1, 0, 3) in my view. In particular, piv = 0 seems strange to me.&lt;/P&gt;&lt;P&gt;The results computed by LAPACKE_dpstrf(...) would fit with piv = (1, 3, 2), but even MKL (2024.0) erroneously (?) tells me piv = (1, 0, 3).&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;BR /&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;-----------------------------&amp;nbsp; Code&amp;nbsp; -----------------------------&lt;/P&gt;&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#include "mkl_lapacke.h"&lt;BR /&gt;#include "mkl.h"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;int main() {&lt;/P&gt;&lt;P&gt;double a[3*3] = {&lt;BR /&gt;30, 11, 13,&lt;BR /&gt;11, 10, 13,&lt;BR /&gt;13, 13, 17&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;int m=3;&lt;BR /&gt;&lt;BR /&gt;lapack_int* piv = (lapack_int*)mkl_malloc(m*sizeof(lapack_int), 64);&lt;BR /&gt;&lt;BR /&gt;int rank;&lt;BR /&gt;&lt;BR /&gt;int info = LAPACKE_dpstrf(LAPACK_COL_MAJOR, 'U', m, a, m, piv, &amp;amp;rank, -1);&lt;BR /&gt;&lt;BR /&gt;for(int i=1;i&amp;lt;=m;i++){&lt;BR /&gt;for(int j=1;j&amp;lt;=m;j++)&lt;BR /&gt;std::cout &amp;lt;&amp;lt; a[(i-1)+(j-1)*m] &amp;lt;&amp;lt; ", ";&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "\n";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;for(int i=1;i&amp;lt;=m;i++)&lt;BR /&gt;std::cout &amp;lt;&amp;lt; piv[i-1] &amp;lt;&amp;lt; "\n";&lt;BR /&gt;&lt;BR /&gt;mkl_free(piv);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 23:11:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cholesky-Decomposition-for-Positive-Semidefinite-Matrices/m-p/1572090#M35823</guid>
      <dc:creator>Paul_Buettiker</dc:creator>
      <dc:date>2024-02-13T23:11:39Z</dc:date>
    </item>
    <item>
      <title>Re:Cholesky Decomposition for Positive Semidefinite Matrices (LAPACKE_dpstrf)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cholesky-Decomposition-for-Positive-Semidefinite-Matrices/m-p/1579387#M35904</link>
      <description>&lt;P&gt;MKL 2024.0 returns the following &lt;STRONG&gt;ipiv ( 1,3,2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;see below the verbose output:&lt;/P&gt;&lt;P&gt;MKL_VERBOSE oneMKL 2023.0 Update 2 Product build 20230613 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors, Lnx 2.30GHz lp64 intel_thread&lt;/P&gt;&lt;P&gt;MKL_VERBOSE DPSTRF(U,3,0x7ffd288f1480,3,0x1f3bf00,3,0x7ffd288f13b8,0x1f4d100,0) 2.58ms CNR:OFF Dyn:1 FastMM:1 TID:0&amp;nbsp;NThr:36&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;LAPACKE_dpstrf, info == 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;5.47723, 2.37346, 2.00832,&amp;nbsp;&lt;/P&gt;&lt;P&gt;11, 3.37145, 2.44208,&amp;nbsp;&lt;/P&gt;&lt;P&gt;13, 13, 0.054153,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Mar 2024 12:13:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cholesky-Decomposition-for-Positive-Semidefinite-Matrices/m-p/1579387#M35904</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2024-03-11T12:13:51Z</dc:date>
    </item>
  </channel>
</rss>

