<?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: dgbsv() and &amp;quot;double* ab&amp;quot; argument, banded matrix format in  in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850125#M6508</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/367365"&gt;tim18&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; In the dgbsv source code listing comments, the expansion rows are shown above the entry data rows (preceding, in C), opposite to what you show here. I think your correspondence between Fortran and C array layout is OK.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
finally, that was it.... thanks very much.
&lt;DIV&gt;I think the MKL manual should definitely describe the placement of the expansion rows.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;thanks again&lt;/DIV&gt;</description>
    <pubDate>Thu, 30 Apr 2009 12:16:58 GMT</pubDate>
    <dc:creator>ozarbit</dc:creator>
    <dc:date>2009-04-30T12:16:58Z</dc:date>
    <item>
      <title>dgbsv() and "double* ab" argument, banded matrix format in C++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850119#M6502</link>
      <description>Hello, I am now playing with the banded matrix form for the Ax=B system and&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;dgbsv() driver function.&lt;/SPAN&gt;
&lt;DIV&gt;&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;I have a 5 band matrix ( 2 upper + diagonal + 2lower )&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;I coulnd't find in the MKL manual the format expected, in C/C++, for banded matrices,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;I couldn't even find the signature explicitely in the manual, but i found it in &lt;MKL_LAPACK.H&gt;...&lt;/MKL_LAPACK.H&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;the double* ab points to the banded matrix.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;double  ab[] = {&lt;BR /&gt; 0., 0., 5., 6. , 7. , 8. , 9. , 10., 11.,  // most upper diagonal&lt;BR /&gt; 0., 5., 6., 7. , 8. , 9. , 10., 11., 12., // upper diagonal&lt;BR /&gt; 5., 6., 7., 8. , 9. , 10., 11., 12., 13., // diagonal&lt;BR /&gt; 6., 7., 8., 9. , 10., 11., 12., 13., 0. , // lower diagonal&lt;BR /&gt; 7., 8., 9., 10., 11., 12., 13., 0. , 0. }; // lowest diagonal&lt;BR /&gt; &lt;BR /&gt; double b[] = &lt;BR /&gt; { 0., 1., 2., 3., 4., 5., 6., 7. , 8. };&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;const MKL_INT n    =sizeof(b)/sizeof(double);&lt;BR /&gt; MKL_INT nn    = n;&lt;BR /&gt; MKL_INT nrhs =1;&lt;BR /&gt; MKL_INT kl   =2;&lt;BR /&gt; MKL_INT ku   =2;&lt;BR /&gt; MKL_INT ldab =5;&lt;BR /&gt; MKL_INT info;&lt;BR /&gt; MKL_INT ipiv&lt;N&gt;;  &lt;BR /&gt;&lt;BR /&gt; LARGE_INTEGER t0, t1;&lt;BR /&gt; dgbsv( &amp;amp;nn, &amp;amp;kl, &amp;amp;ku, &amp;amp;nrhs, ab, &amp;amp;ldab, ipiv, b, &amp;amp;nn, &amp;amp;info );&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/N&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;the error is&lt;/DIV&gt;
&lt;DIV&gt;MKL ERROR: Parameter 6 was incorrect on entry to DGBSV&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;is Parameter 6 ldab (value 5) ?or is it ipiv?&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;regards,&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Apr 2009 16:04:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850119#M6502</guid>
      <dc:creator>ozarbit</dc:creator>
      <dc:date>2009-04-27T16:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: dgbsv() and "double* ab" argument, banded matrix format in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850120#M6503</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/422325"&gt;ozarbit&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;BR /&gt;
&lt;DIV&gt;const MKL_INT n    =sizeof(b)/sizeof(double);&lt;BR /&gt; MKL_INT nn    = n;&lt;BR /&gt; MKL_INT nrhs =1;&lt;BR /&gt; MKL_INT kl   =2;&lt;BR /&gt; MKL_INT ku   =2;&lt;BR /&gt; MKL_INT ldab =5;&lt;BR /&gt; MKL_INT info;&lt;BR /&gt; MKL_INT ipiv&lt;N&gt;;  &lt;BR /&gt;&lt;BR /&gt; LARGE_INTEGER t0, t1;&lt;BR /&gt; dgbsv( &amp;amp;nn, &amp;amp;kl, &amp;amp;ku, &amp;amp;nrhs, ab, &amp;amp;ldab, ipiv, b, &amp;amp;nn, &amp;amp;info );&lt;SPAN style="border-collapse: collapse; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/N&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;the error is&lt;/DIV&gt;
&lt;DIV&gt;MKL ERROR: Parameter 6 was incorrect on entry to DGBSV&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;is Parameter 6 ldab (value 5) ?or is it ipiv?&lt;/DIV&gt;
&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
I suggest referring to the reference source &lt;A href="http://www.netlib.no/netlib/lapack/double/dgbsv.f" target="_blank"&gt;http://www.netlib.no/netlib/lapack/double/dgbsv.f&lt;/A&gt;&lt;BR /&gt;
&lt;PRE&gt;LDAB    (input) INTEGER&lt;BR /&gt;*          The leading dimension of the array AB.  LDAB &amp;gt;= 2*KL+KU+1.&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;so you have violated this documented constraint.&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Apr 2009 17:39:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850120#M6503</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-04-27T17:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: dgbsv() and "double* ab" argument, banded matrix format in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850121#M6504</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/367365"&gt;tim18&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 suggest referring to the reference source &lt;A href="http://www.netlib.no/netlib/lapack/double/dgbsv.f" target="_blank"&gt;http://www.netlib.no/netlib/lapack/double/dgbsv.f&lt;/A&gt;&lt;BR /&gt;
&lt;/EM&gt;&lt;PRE&gt;&lt;EM&gt;LDAB    (input) INTEGER&lt;BR /&gt;*          The leading dimension of the array AB.  LDAB &amp;gt;= 2*KL+KU+1.&lt;BR /&gt;&lt;/EM&gt;&lt;/PRE&gt;
&lt;BR /&gt;so you have violated this documented constraint.&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Hello, I fixed the value of LDAB.&lt;BR /&gt;However the function call crashes now.
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;I am very unsure about the ab argument&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;From the documentation&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;"Band storage: an m-by-n band matrix with kl sub-diagonals and ku superdiagonals is stored compactly in a two-dimensional array ab with kl+ku+1 rows and n columns. Columns of the matrix are stored in the corresponding columns of the array, and diagonals of the matrix are stored in rows of the array."&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;The compact storage is then a 5 rows 9 columns in my case.&lt;/DIV&gt;
&lt;DIV&gt;However, the C function signature expects a double*.&lt;/DIV&gt;
&lt;DIV&gt;What should the ab array layout be? I looked at netlib.no re any remarks for the C layout w/o success.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;regards,&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Apr 2009 15:41:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850121#M6504</guid>
      <dc:creator>ozarbit</dc:creator>
      <dc:date>2009-04-28T15:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: dgbsv() and "double* ab" argument, banded matrix format in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850122#M6505</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/422325"&gt;ozarbit&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;
Hello, I fixed the value of LDAB.&lt;BR /&gt;However the function call crashes now.
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;I am very unsure about the ab argument&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;From the documentation&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;"Band storage: an m-by-n band matrix with kl sub-diagonals and ku superdiagonals is stored compactly in a two-dimensional array ab with kl+ku+1 rows and n columns. Columns of the matrix are stored in the corresponding columns of the array, and diagonals of the matrix are stored in rows of the array."&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;The compact storage is then a 5 rows 9 columns in my case.&lt;/DIV&gt;
&lt;DIV&gt;However, the C function signature expects a double*.&lt;/DIV&gt;
&lt;DIV&gt;What should the ab array layout be? I looked at netlib.no re any remarks for the C layout w/o success.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;regards,&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
No, it seems unlikely anyone has posted a C example of the usage. As you are probably aware, the C view of a 2d Fortran array is a 1d array which runs by columns of the Fortran array. By my reading of the diagram in the source code, it begins with the first column, the first 3 elements of which are "unused," then runs down the second column, and so forth. ending with the last column, with 2 "unused" elements at the end, in that example. This agrees with my reading of your text quote.&lt;BR /&gt;You probably should avoid attempting to interpret the resulting LU decomposition, if at all possible.&lt;BR /&gt;While this organization is backwards from the usage I remember in IMSL from years ago, it is better for data locality.&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Apr 2009 20:58:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850122#M6505</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-04-28T20:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: dgbsv() and "double* ab" argument, banded matrix format in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850123#M6506</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/367365"&gt;tim18&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; No, it seems unlikely anyone has posted a C example of the usage. As you are probably aware, the C view of a 2d Fortran array is a 1d array which runs by columns of the Fortran array. By my reading of the diagram in the source code, it begins with the first column, the first 3 elements of which are "unused," then runs down the second column, and so forth. ending with the last column, with 2 "unused" elements at the end, in that example. This agrees with my reading of your text quote.&lt;BR /&gt;You probably should avoid attempting to interpret the resulting LU decomposition, if at all possible.&lt;BR /&gt;While this organization is backwards from the usage I remember in IMSL from years ago, it is better for data locality.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
I tested on Excel. That initial matrix was singular, I changed it to the following problem.
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;| 10 5 5  0  0   0  0   0   0   |&lt;BR /&gt;| 1  5 56	6  0   0  0   0   0  |&lt;BR /&gt;| 7  7 7  7  7   0  0   0   0  |&lt;BR /&gt;| 0  8 8  8  8   8  0   0   0  |&lt;BR /&gt;| 0  0 9  9  10  9  9   0   0  |   = A&lt;BR /&gt;| 0  0 0  10	10  10 10  10  0  |&lt;BR /&gt;| 0  0 0  0  11  11 11  11 11 |&lt;BR /&gt;| 0  0 0  0  0   12 12  12 12 |&lt;BR /&gt;| 0  0 0  0  0   0  13  13 13 |&lt;/DIV&gt;
&lt;DIV&gt;This a band matrix, 2 upper diagonals and 2 lower diagonals. This actually has determinant !=0 and&lt;/DIV&gt;
&lt;DIV&gt;A*x = b&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;where&lt;/DIV&gt;
&lt;DIV&gt;b = 0&lt;/DIV&gt;
&lt;DIV&gt;  1&lt;/DIV&gt;
&lt;DIV&gt;  2&lt;/DIV&gt;
&lt;DIV&gt;  3&lt;/DIV&gt;
&lt;DIV&gt;  4&lt;/DIV&gt;
&lt;DIV&gt;  5&lt;/DIV&gt;
&lt;DIV&gt;  6&lt;/DIV&gt;
&lt;DIV&gt;  7&lt;/DIV&gt;
&lt;DIV&gt;  8&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;has a solution.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Now, the signature in C of the driver function for Ax=b where A is banded is&lt;/DIV&gt;
&lt;DIV&gt;dgbsv( MKL_INT *n, MKL_INT *kl, MKL_INT *ku, MKL_INT *nrhs, double *ab, MKL_INT *ldab, MKL_INT *ipiv, double *b, MKL_INT *ldb, MKL_INT *info );&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;MKL_INT n = 9;&lt;/DIV&gt;
&lt;DIV&gt;MKL_INT kl = 2;&lt;BR /&gt;MKL_INT ku = 2;&lt;BR /&gt;MKL_INT nrhs =1;&lt;BR /&gt;MKL_INT ldab = 2*kl + ku +1 = 7;&lt;BR /&gt;MKL_INT ipiv&lt;N&gt;;&lt;BR /&gt;MKL_INT ldb = n;&lt;/N&gt;&lt;/DIV&gt;
&lt;DIV&gt;MKL_INT info;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;In fortran, the compact storage of A in ab would be:&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;x  x  5  6  7  8   9  10  11&lt;/DIV&gt;
&lt;DIV&gt;x  5  56 7  8  9   10  11  12&lt;/DIV&gt;
&lt;DIV&gt;10 5 7  8  9  10  11  12  13&lt;/DIV&gt;
&lt;DIV&gt;1  7  8  9  10 11  12  13  x&lt;/DIV&gt;
&lt;DIV&gt;7  8  9  10 11 12  13  x   x&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;But, from the docs, "The second dimension of ab must be at least max(1, n). ", i.e. 9&lt;/DIV&gt;
&lt;DIV&gt;"The first dimension of the array ab. (ldab  2kl + ku +1)", i.e. 7&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;The 1stdimis the number of rows in Fortran, so 7 rows&lt;/DIV&gt;
&lt;DIV&gt;The 2nd dim is the number of columns in Fortran so 9 columns&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;So i change the compact storage to include 2 additional rows (probably required for the LU decomposition)&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;x  x   5  6 7  8  9  10  11&lt;BR /&gt;x  5   56  7 8  9  10 11  12&lt;BR /&gt;10  5  7  8 9  10 11 12  13&lt;BR /&gt;1  7   8  9 10  11 12 13  x&lt;BR /&gt;7  8 9 10  11  12 13  x  x &lt;/DIV&gt;
&lt;DIV&gt;x  x x  x x  x  x  x  x&lt;/DIV&gt;
&lt;DIV&gt;x  x x  x x  x  x  x  x&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Then I transform this 2d array to 1d array in C, based on your reply" which runs by columns of the Fortran array",&lt;/DIV&gt;
&lt;DIV&gt;to give me&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;double  ab[] = {&lt;BR /&gt; 0. , 0. , 10., 1. , 7. , 0., 0.,&lt;BR /&gt; 0. , 5. , 5. , 7. , 8. , 0., 0.,&lt;BR /&gt; 5. , 56., 7. , 8. , 9. , 0., 0.,&lt;BR /&gt; 6. , 7. , 8. , 9. , 10., 0., 0.,&lt;BR /&gt; 7. , 8. , 9. , 10., 11., 0., 0.,&lt;BR /&gt; 8. , 9. , 10., 11., 12., 0., 0.,&lt;BR /&gt; 9. , 10., 11., 12., 13., 0., 0.,&lt;BR /&gt; 10., 11., 12., 13., 0. , 0., 0.,&lt;BR /&gt; 11., 12., 13., 0. , 0. , 0., 0.&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;and&lt;/DIV&gt;
&lt;DIV&gt;double b[] = { 0., 1., 2., 3., 4., 5., 6., 7. , 8. };&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;callingdgbsv( &amp;amp;nn, &amp;amp;kl, &amp;amp;ku, &amp;amp;nrhs, ab, &amp;amp;ldab, ipiv, b, &amp;amp;nn, &amp;amp;info );&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;returns info =8&lt;/DIV&gt;
&lt;DIV&gt;which means U(8,8) is 0 according to docs, however matlab and excel concord in the solution.&lt;/DIV&gt;
&lt;DIV&gt;I deduce that my transposition to the C array is wrong.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;thank you for any advice,&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;best regards,&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Apr 2009 18:08:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850123#M6506</guid>
      <dc:creator>ozarbit</dc:creator>
      <dc:date>2009-04-29T18:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: dgbsv() and "double* ab" argument, banded matrix format in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850124#M6507</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
In the dgbsv source code listing comments, the expansion rows are shown above the entry data rows (preceding, in C), opposite to what you show here. I think your correspondence between Fortran and C array layout is OK.&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Apr 2009 18:18:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850124#M6507</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-04-29T18:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: dgbsv() and "double* ab" argument, banded matrix format in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850125#M6508</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/367365"&gt;tim18&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; In the dgbsv source code listing comments, the expansion rows are shown above the entry data rows (preceding, in C), opposite to what you show here. I think your correspondence between Fortran and C array layout is OK.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
finally, that was it.... thanks very much.
&lt;DIV&gt;I think the MKL manual should definitely describe the placement of the expansion rows.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;thanks again&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Apr 2009 12:16:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850125#M6508</guid>
      <dc:creator>ozarbit</dc:creator>
      <dc:date>2009-04-30T12:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: dgbsv() and "double* ab" argument, banded matrix format in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850126#M6509</link>
      <description>&lt;DIV style="margin:0px;"&gt;Just locate the matrix differently:&lt;BR /&gt;&lt;BR /&gt;double ab[] = {&lt;BR /&gt;0., 0., 0. , 0. , 10., 1. , 7. ,&lt;BR /&gt;0., 0., 0. , 5. , 5. , 7. , 8. ,&lt;BR /&gt;0., 0., 5. , 56., 7. , 8. , 9. ,&lt;BR /&gt;0., 0., 6. , 7. , 8. , 9. , 10.,&lt;BR /&gt;0., 0., 7. , 8. , 9. , 10., 11.,&lt;BR /&gt;0., 0., 8. , 9. , 10., 11., 12.,&lt;BR /&gt;0., 0., 9. , 10., 11., 12., 13.,&lt;BR /&gt;0., 0., 10., 11., 12., 13., 0. ,&lt;BR /&gt;0., 0., 11., 12., 13., 0. , 0.&lt;BR /&gt;};&lt;BR /&gt;&lt;/DIV&gt;
&lt;BR /&gt;Extra kl elements are added to the upper factor U during factorization, therefore the space should be left above the matrix, not below.&lt;BR /&gt;&lt;BR /&gt;There's a description of the banded matrix arguments in Appendix B. Matrix Arguments of MKL manual mklman.pdf, you may refer to it.&lt;BR /&gt;&lt;BR /&gt;Do you feel that the MKL documentation is ambiguous or not sufficient in this case?&lt;BR /&gt;&lt;BR /&gt;Michael.</description>
      <pubDate>Thu, 30 Apr 2009 12:23:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850126#M6509</guid>
      <dc:creator>Michael_C_Intel4</dc:creator>
      <dc:date>2009-04-30T12:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: dgbsv() and "double* ab" argument, banded matrix format in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850127#M6510</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/337852"&gt;Michael Chuvelev (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;Just locate the matrix differently:&lt;BR /&gt;&lt;BR /&gt;double ab[] = {&lt;BR /&gt;0., 0., 0. , 0. , 10., 1. , 7. ,&lt;BR /&gt;0., 0., 0. , 5. , 5. , 7. , 8. ,&lt;BR /&gt;0., 0., 5. , 56., 7. , 8. , 9. ,&lt;BR /&gt;0., 0., 6. , 7. , 8. , 9. , 10.,&lt;BR /&gt;0., 0., 7. , 8. , 9. , 10., 11.,&lt;BR /&gt;0., 0., 8. , 9. , 10., 11., 12.,&lt;BR /&gt;0., 0., 9. , 10., 11., 12., 13.,&lt;BR /&gt;0., 0., 10., 11., 12., 13., 0. ,&lt;BR /&gt;0., 0., 11., 12., 13., 0. , 0.&lt;BR /&gt;};&lt;BR /&gt;&lt;/DIV&gt;
&lt;BR /&gt;Extra kl elements are added to the upper factor U during factorization, therefore the space should be left above the matrix, not below.&lt;BR /&gt;&lt;BR /&gt;There's a description of the banded matrix arguments in Appendix B. Matrix Arguments of MKL manual mklman.pdf, you may refer to it.&lt;BR /&gt;&lt;BR /&gt;Do you feel that the MKL documentation is ambiguous or not sufficient in this case?&lt;BR /&gt;&lt;BR /&gt;Michael.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Thanks Michael.
&lt;DIV&gt;As a matter of a fact, the example in Appendix B Matrix arguments. The expansion rows are visible in the example. It is clear. I apologize.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;The Fortan to C translation for arrays is also probably mentioned somewhere in the manual, but if it isn't, it may be useful to list as well. Thanks again,&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;regards,&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 May 2009 19:11:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgbsv-and-quot-double-ab-quot-argument-banded-matrix-format-in-C/m-p/850127#M6510</guid>
      <dc:creator>ozarbit</dc:creator>
      <dc:date>2009-05-04T19:11:35Z</dc:date>
    </item>
  </channel>
</rss>

