<?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 Permutation vector for dgetrf in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Permutation-vector-for-dgetrf/m-p/869780#M8353</link>
    <description>Yes, that works. Thank you!</description>
    <pubDate>Wed, 17 Mar 2010 23:20:25 GMT</pubDate>
    <dc:creator>Jason_Jones1</dc:creator>
    <dc:date>2010-03-17T23:20:25Z</dc:date>
    <item>
      <title>Permutation vector for dgetrf</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Permutation-vector-for-dgetrf/m-p/869778#M8351</link>
      <description>&lt;P&gt;I am having trouble with the output &lt;I&gt;ipiv&lt;/I&gt; from dgetrf. My understanding is that it should return an array the length of the number of rows of my input matrix. Each member of this array should contain a different number. These numbers are the column in which a 1 would be placed for the corresponding column i.e. if:&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;ipiv =&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;1&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;4&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;5&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;2&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;3&lt;/P&gt;
&lt;P&gt;This would correspond to a permutation matrix that looks like:&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;1 0 0 0 0&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;0 0 0 1 0&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;0 0 0 0 1&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;0 1 0 0 0&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;0 0 1 0 0&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;And that this permutation matrix P*X(my input matrix) = L*U. However, the ipiv outputs I get from dgetrf have many repetititions such as the output below and P*X != L*U:&lt;/P&gt;
&lt;P style="padding-left: 20pt;"&gt;ipiv = 4&lt;BR /&gt;ipiv = 2&lt;BR /&gt;ipiv = 4&lt;BR /&gt;ipiv = 4&lt;BR /&gt;ipiv = 5&lt;/P&gt;
&lt;P&gt;Here is my example program:&lt;/P&gt;
#define M 5&lt;BR /&gt;#define N 5&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;int i,m, n, *ipiv, info;&lt;BR /&gt;double a[M*N] = { 3, 4, 6, 8, 2, 2, 9, 6, 1, 8, 12, 8, 4, 6, 2, 6, 6, 7, 1, 2, 9, 4, 3, 2, 8 };&lt;BR /&gt;ipiv = malloc(M*sizeof(int));&lt;BR /&gt;m = M;&lt;BR /&gt;n = N;&lt;BR /&gt;info = 0;&lt;BR /&gt;&lt;BR /&gt; dgetrf(&amp;amp;m,&amp;amp;n,a,&amp;amp;m,ipiv,&amp;amp;info);&lt;BR /&gt;printf("info = %d\\n",info);&lt;BR /&gt;&lt;BR /&gt;for (i=0;i&lt;M&gt;&lt;/M&gt;{&lt;BR /&gt; printf("ipiv = %d\\n",ipiv&lt;I&gt;);&lt;BR /&gt;}&lt;BR /&gt;return(0);&lt;BR /&gt;}
&lt;P style="padding-left: 40pt;"&gt;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;&lt;/I&gt;</description>
      <pubDate>Mon, 15 Mar 2010 21:09:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Permutation-vector-for-dgetrf/m-p/869778#M8351</guid>
      <dc:creator>Jason_Jones1</dc:creator>
      <dc:date>2010-03-15T21:09:03Z</dc:date>
    </item>
    <item>
      <title>Permutation vector for dgetrf</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Permutation-vector-for-dgetrf/m-p/869779#M8352</link>
      <description>If you wish to understand how this works, you will need to refer to the public netlib source code. I haven't looked for a while, but I believe your output indicates that the pivoting went like:&lt;BR /&gt;swap rows 1 and 4&lt;BR /&gt;continue processing&lt;BR /&gt;swap rows 3 and 4 (which was originally row 1)&lt;BR /&gt;continue...&lt;BR /&gt;The swap vector is intended to be used only by the companion BLAS functions.</description>
      <pubDate>Wed, 17 Mar 2010 17:56:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Permutation-vector-for-dgetrf/m-p/869779#M8352</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-03-17T17:56:52Z</dc:date>
    </item>
    <item>
      <title>Permutation vector for dgetrf</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Permutation-vector-for-dgetrf/m-p/869780#M8353</link>
      <description>Yes, that works. Thank you!</description>
      <pubDate>Wed, 17 Mar 2010 23:20:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Permutation-vector-for-dgetrf/m-p/869780#M8353</guid>
      <dc:creator>Jason_Jones1</dc:creator>
      <dc:date>2010-03-17T23:20:25Z</dc:date>
    </item>
  </channel>
</rss>

