<?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 dpotrf arguments in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042432#M20790</link>
    <description>&lt;P&gt;With the help of this great forum and old post, I was able to finally execute my first example on Cholesky factorization. However, I have a question. I call the function like this:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;  dpotrf(
        &amp;amp;'L',
        &amp;amp;N, // A is NxN matrix
        A,
        &amp;amp;N,
        &amp;amp;nInfo
  );
&lt;/PRE&gt;

&lt;P&gt;Since I am planning to do a &lt;EM&gt;&lt;STRONG&gt;distributed factorization&lt;/STRONG&gt;&lt;/EM&gt;, I have to be sure about the arguments. What is the latter 'N' used for? My first thought was about the dimension of the output, but that's the same array, so I am confused.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Moreover, the &lt;A href="https://software.intel.com/en-us/node/521465"&gt;documentation&lt;/A&gt; gives this prototype&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;void pdpotrf (char *uplo , MKL_INT *n , double *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , MKL_INT *info );&lt;/PRE&gt;

&lt;P&gt;In my example, the arguments are less than what the prototype has. Why there are more arguments there?&lt;/P&gt;

&lt;P&gt;Finally, I do not understand ia, ja and desca arguments. Come someone explain to a student like me their use?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jun 2015 10:21:03 GMT</pubDate>
    <dc:creator>Georgios_S_</dc:creator>
    <dc:date>2015-06-17T10:21:03Z</dc:date>
    <item>
      <title>dpotrf arguments</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042432#M20790</link>
      <description>&lt;P&gt;With the help of this great forum and old post, I was able to finally execute my first example on Cholesky factorization. However, I have a question. I call the function like this:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;  dpotrf(
        &amp;amp;'L',
        &amp;amp;N, // A is NxN matrix
        A,
        &amp;amp;N,
        &amp;amp;nInfo
  );
&lt;/PRE&gt;

&lt;P&gt;Since I am planning to do a &lt;EM&gt;&lt;STRONG&gt;distributed factorization&lt;/STRONG&gt;&lt;/EM&gt;, I have to be sure about the arguments. What is the latter 'N' used for? My first thought was about the dimension of the output, but that's the same array, so I am confused.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Moreover, the &lt;A href="https://software.intel.com/en-us/node/521465"&gt;documentation&lt;/A&gt; gives this prototype&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;void pdpotrf (char *uplo , MKL_INT *n , double *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , MKL_INT *info );&lt;/PRE&gt;

&lt;P&gt;In my example, the arguments are less than what the prototype has. Why there are more arguments there?&lt;/P&gt;

&lt;P&gt;Finally, I do not understand ia, ja and desca arguments. Come someone explain to a student like me their use?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2015 10:21:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042432#M20790</guid>
      <dc:creator>Georgios_S_</dc:creator>
      <dc:date>2015-06-17T10:21:03Z</dc:date>
    </item>
    <item>
      <title>Think about how one maps the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042433#M20791</link>
      <description>&lt;P&gt;Think about how one maps the two subscripts of a matrix element to a single offset into memory, and note that often (especially in F77 and earlier, which did not have ALLOCATE) the declared size of an array can be larger than the actual size used in a specific part of the program. To do the mapping, the leading dimension (i.e., the declared column size in Fortran) needs to be known, because most array arguments are passed in F77 and earlier as just the base address of the array, with no additional information regarding the extents of each subscript.&lt;/P&gt;

&lt;P&gt;The argument list that you show is for the special case where the declared array size (the "maximum" size) is the same as the effective size (the size being used in the calculation at the moment), so you see N twice and may find it quixotic. Ask yourself, "how would things be if A was declared larger than N X N?".&lt;/P&gt;

&lt;P&gt;The routine DPOTRF is in Lapack; PDPOTRF is in Scalapack. They are different routines in different libraries, with similar (but not identical) argument lists and objectives.&lt;/P&gt;

&lt;P&gt;DPOTRF (and most Lapack subroutines) work with dense matrices. The routine PDPOTRF is for use with distributed matrices, and the arrays IA, JA, etc. contain details of how the distributed matrix is stored. See, for example, the comments in&amp;nbsp;http://www.netlib.org/scalapack/explore-html/d5/d9e/pdpotrf_8f_source.html .&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:33:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042433#M20791</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-06-17T12:33:00Z</dc:date>
    </item>
    <item>
      <title>Damn it, I understood that I</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042434#M20792</link>
      <description>&lt;P&gt;Damn it, I understood that I had made a mistake in the function I used, just after a while I did the post, however, I wasn't able to update. Sorry about that.&lt;/P&gt;

&lt;P&gt;About&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;DPOTRF, I found this &lt;A href="http://www.netlib.org/lapack/explore-3.1.1-html/dpotrf.f.html"&gt;ref&lt;/A&gt;, which states that N is "The order of the matrix A" and LDA is "The leading dimension of the array A". I do not know any Fortran, I have a strong C/C++ background though I still do not understand the difference between this two parameters, maybe because I approach the problem from a C &lt;/SPAN&gt;perspective&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;About &lt;EM&gt;&lt;STRONG&gt;PDPOTRF&lt;/STRONG&gt;&lt;/EM&gt;, which is the one that I want to use, the Fortran documentation seems a bit bizarre for me. Do you have any C example on this?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;I only found this &lt;A href="http://stackoverflow.com/questions/14147705/cholesky-decomposition-scalapack-error"&gt;SO question&lt;/A&gt;, which contains some code, but it does not have any MKL in it!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2015 21:59:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042434#M20792</guid>
      <dc:creator>Georgios_S_</dc:creator>
      <dc:date>2015-06-18T21:59:10Z</dc:date>
    </item>
    <item>
      <title>You  could translate the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042435#M20793</link>
      <description>You  could translate the posted source code via f2c if you want to understand from a c viewpoint how the arguments are used. As it relates to a 2d Fortran array, it's not a textbook c construct.</description>
      <pubDate>Fri, 19 Jun 2015 00:58:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042435#M20793</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2015-06-19T00:58:17Z</dc:date>
    </item>
    <item>
      <title>I can't understand that " it</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042436#M20794</link>
      <description>&lt;P&gt;I can't understand that "&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;&amp;nbsp;it's not a textbook c construct", sorry.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;EDIT:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;I found this &lt;A href="http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=217"&gt;link&lt;/A&gt;&lt;/SPAN&gt;, which explains the LDA. So, now, I can assume that by order of Matrix, it needs the number of rows.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 01:06:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dpotrf-arguments/m-p/1042436#M20794</guid>
      <dc:creator>Georgios_S_</dc:creator>
      <dc:date>2015-06-19T01:06:00Z</dc:date>
    </item>
  </channel>
</rss>

