<?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 Using LAPACK to invert sparse matrices in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901291#M11274</link>
    <description>I've some small square matrices (so around 100x100) that are sparse. I want to use the LAPACK functions to compute the inverse. To do this, I've tried to use the function dgetrf (in C++). But always the info return value is &amp;gt; 0. I've checked the matrix, but it has no zero values on the diagonals. Because the matrix is square, I can use n=m=lda for the input parameters. Is it right? Is there any trouble known when using sparse matrices with LAPACK? I've also check the matrices in Matlab, they are non-singular. &lt;BR /&gt;&lt;BR /&gt;Thanks for any hints,&lt;BR /&gt;&lt;BR /&gt;Thomas</description>
    <pubDate>Tue, 27 Oct 2009 14:29:21 GMT</pubDate>
    <dc:creator>thomasdd</dc:creator>
    <dc:date>2009-10-27T14:29:21Z</dc:date>
    <item>
      <title>Using LAPACK to invert sparse matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901291#M11274</link>
      <description>I've some small square matrices (so around 100x100) that are sparse. I want to use the LAPACK functions to compute the inverse. To do this, I've tried to use the function dgetrf (in C++). But always the info return value is &amp;gt; 0. I've checked the matrix, but it has no zero values on the diagonals. Because the matrix is square, I can use n=m=lda for the input parameters. Is it right? Is there any trouble known when using sparse matrices with LAPACK? I've also check the matrices in Matlab, they are non-singular. &lt;BR /&gt;&lt;BR /&gt;Thanks for any hints,&lt;BR /&gt;&lt;BR /&gt;Thomas</description>
      <pubDate>Tue, 27 Oct 2009 14:29:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901291#M11274</guid>
      <dc:creator>thomasdd</dc:creator>
      <dc:date>2009-10-27T14:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using LAPACK to invert sparse matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901292#M11275</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/449403"&gt;thomasdd&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;I've some small square matrices (so around 100x100) that are sparse. I want to use the LAPACK functions to compute the inverse. To do this, I've tried to use the function dgetrf (in C++). But always the info return value is &amp;gt; 0. I've checked the matrix, but it has no zero values on the diagonals. Because the matrix is square, I can use n=m=lda for the input parameters. Is it right? Is there any trouble known when using sparse matrices with LAPACK? I've also check the matrices in Matlab, they are non-singular. &lt;BR /&gt;&lt;BR /&gt;Thanks for any hints,&lt;BR /&gt;&lt;BR /&gt;Thomas&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Can you post some example code so that I can see what you are doing? &lt;BR /&gt;</description>
      <pubDate>Tue, 27 Oct 2009 23:28:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901292#M11275</guid>
      <dc:creator>Melvin_Robinson</dc:creator>
      <dc:date>2009-10-27T23:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using LAPACK to invert sparse matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901293#M11276</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/305376"&gt;Melvin&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Can you post some example code so that I can see what you are doing? &lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
A very simple example:&lt;BR /&gt;&lt;BR /&gt; int n = 4, m = 4, lda = 4;&lt;BR /&gt; int ipiv = 0, info = 0;&lt;BR /&gt; double matrix[16] = {1, 0, 0, 0,&lt;BR /&gt; 0, 1, 0, 0,&lt;BR /&gt; 0, 0, 1, 0,&lt;BR /&gt; 0, 0, 0, 1};&lt;BR /&gt; dgetrf(&amp;amp;m, &amp;amp;n, matrix, &amp;amp;lda, &amp;amp;ipiv, &amp;amp;info);&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "INFO = " &amp;lt;&amp;lt; info &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&lt;BR /&gt;In this case, info is 4! Is there anything wrong in the call of dgetrf?&lt;BR /&gt;&lt;BR /&gt;Thomas&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Oct 2009 07:32:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901293#M11276</guid>
      <dc:creator>thomasdd</dc:creator>
      <dc:date>2009-10-28T07:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using LAPACK to invert sparse matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901294#M11277</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/449403"&gt;thomasdd&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/305376"&gt;Melvin&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Can you post some example code so that I can see what you are doing? &lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
A very simple example:&lt;BR /&gt;&lt;BR /&gt; int n = 4, m = 4, lda = 4;&lt;BR /&gt; int ipiv = 0, info = 0;&lt;BR /&gt; double matrix[16] = {1, 0, 0, 0,&lt;BR /&gt; 0, 1, 0, 0,&lt;BR /&gt; 0, 0, 1, 0,&lt;BR /&gt; 0, 0, 0, 1};&lt;BR /&gt; dgetrf(&amp;amp;m, &amp;amp;n, matrix, &amp;amp;lda, &amp;amp;ipiv, &amp;amp;info);&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "INFO = " &amp;lt;&amp;lt; info &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&lt;BR /&gt;In this case, info is 4! Is there anything wrong in the call of dgetrf?&lt;BR /&gt;&lt;BR /&gt;Thomas&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thomas,&lt;BR /&gt;ipiv is the array, but not integer &lt;BR /&gt;the dimention at least max(1,min(m,n)), therefore for your case ipiv[4].&lt;BR /&gt;Please refer to the mkl's reference manual.&lt;BR /&gt;--Gennady &lt;BR /&gt;</description>
      <pubDate>Wed, 28 Oct 2009 15:56:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901294#M11277</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2009-10-28T15:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using LAPACK to invert sparse matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901295#M11278</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/334681"&gt;Gennady Fedorov (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Thomas,&lt;BR /&gt;ipiv is the array, but not integer &lt;BR /&gt;the dimention at least max(1,min(m,n)), therefore for your case ipiv[4].&lt;BR /&gt;Please refer to the mkl's reference manual.&lt;BR /&gt;--Gennady &lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Thank you very much! Now it works fine. I was too fast in reading the reference :)&lt;BR /&gt;&lt;BR /&gt;Thomas&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Oct 2009 07:27:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-LAPACK-to-invert-sparse-matrices/m-p/901295#M11278</guid>
      <dc:creator>thomasdd</dc:creator>
      <dc:date>2009-10-29T07:27:10Z</dc:date>
    </item>
  </channel>
</rss>

