<?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 Please use the enum constants in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-routines-for-upper-triangular-matrices/m-p/1002443#M18632</link>
    <description>&lt;P&gt;Please use the enum constants as named at&amp;nbsp;https://software.intel.com/en-us/node/468386. The MKL documentation is, I think, misleading in that it seems to say that the values 'U' and 'N' are suitable for the Cblas_?trsv argument &lt;STRONG&gt;Uplo&lt;/STRONG&gt;, just the same as for the Fortran BLAS routine ?trsv argument &lt;STRONG&gt;uplo&lt;/STRONG&gt;. In your program, use&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 3, A, 3, b, 1);
&lt;/PRE&gt;

&lt;P&gt;and you will not only get the correct behavior, but the source code will also have better readability.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jul 2014 19:55:00 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2014-07-16T19:55:00Z</dc:date>
    <item>
      <title>mkl routines for upper triangular matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-routines-for-upper-triangular-matrices/m-p/1002442#M18631</link>
      <description>&lt;P&gt;Dear MKL users,&lt;/P&gt;

&lt;P&gt;I am a bit confused with how to use mkl routines for upper triangular matrices. For example. I have the matrix:&lt;/P&gt;

&lt;P&gt;1.000000&amp;nbsp; 2.000000&amp;nbsp; 3.000000 &amp;nbsp;&lt;BR /&gt;
	0.000000&amp;nbsp; 4.000000&amp;nbsp; 5.000000 &amp;nbsp;&lt;BR /&gt;
	0.000000&amp;nbsp; 0.000000&amp;nbsp; 8.000000&lt;/P&gt;

&lt;P&gt;which I store row major format via:&lt;/P&gt;

&lt;P&gt;the array data of size num_columns by num_rows with entry i,j stored as&lt;/P&gt;

&lt;P&gt;data[i*num_cols + j] = value&lt;/P&gt;

&lt;P&gt;I store the full matrix, even the zeros. Then I call the following to get the inverse:&lt;/P&gt;

&lt;P&gt;LAPACKE_dtrtri( LAPACK_ROW_MAJOR, 'U', 'N', num_column, data, num_columns);&lt;/P&gt;

&lt;P&gt;this Lapacke routine works fine and data is overwritten with the inverse matrix, as expected.&lt;/P&gt;

&lt;P&gt;Now I would like to solve the system A x = b with&lt;/P&gt;

&lt;P&gt;double b[3] = {1.,2.,3.}&lt;/P&gt;

&lt;P&gt;cblas_dtrsv (CblasRowMajor, 'u', 'n', 'n', 3, data, 3, b, 1);&lt;/P&gt;

&lt;P&gt;but the output is always:&lt;/P&gt;

&lt;P&gt;Intel MKL ERROR: Parameter 2 was incorrect on entry to cblas_dtrsv&lt;/P&gt;

&lt;P&gt;I tried to store only the nonzero elements in data, i.e. change the data array to be&amp;nbsp;&lt;/P&gt;

&lt;P&gt;double data[6] = {1.,2.,3.,4.,5.,8.}&lt;/P&gt;

&lt;P&gt;but I still get the same error. Can someone explain how I must define my matrix to be recognized as upper triangular for the cblas routine and how the cblas routines are different from the Lapacke ones?&lt;/P&gt;

&lt;P&gt;thanks very much&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 19:01:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-routines-for-upper-triangular-matrices/m-p/1002442#M18631</guid>
      <dc:creator>numerix1</dc:creator>
      <dc:date>2014-07-16T19:01:15Z</dc:date>
    </item>
    <item>
      <title>Please use the enum constants</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-routines-for-upper-triangular-matrices/m-p/1002443#M18632</link>
      <description>&lt;P&gt;Please use the enum constants as named at&amp;nbsp;https://software.intel.com/en-us/node/468386. The MKL documentation is, I think, misleading in that it seems to say that the values 'U' and 'N' are suitable for the Cblas_?trsv argument &lt;STRONG&gt;Uplo&lt;/STRONG&gt;, just the same as for the Fortran BLAS routine ?trsv argument &lt;STRONG&gt;uplo&lt;/STRONG&gt;. In your program, use&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 3, A, 3, b, 1);
&lt;/PRE&gt;

&lt;P&gt;and you will not only get the correct behavior, but the source code will also have better readability.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 19:55:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-routines-for-upper-triangular-matrices/m-p/1002443#M18632</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-07-16T19:55:00Z</dc:date>
    </item>
    <item>
      <title>Replacing the characters by</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-routines-for-upper-triangular-matrices/m-p/1002444#M18633</link>
      <description>&lt;P&gt;Replacing the characters by the enum constants fixed it. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 20:18:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-routines-for-upper-triangular-matrices/m-p/1002444#M18633</guid>
      <dc:creator>numerix1</dc:creator>
      <dc:date>2014-07-16T20:18:28Z</dc:date>
    </item>
  </channel>
</rss>

