<?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:question about MKL matrix-matrix multiplier. in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1243711#M30607</link>
    <description>&lt;P&gt;B has to be positive devined&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 06 Jan 2021 04:40:45 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2021-01-06T04:40:45Z</dc:date>
    <item>
      <title>question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241272#M30585</link>
      <description>&lt;P&gt;I am using Intel MKL (compilers_and_libraries_2020.4.311).&amp;nbsp; "mkl_sparse_d_mm" produces wrong result while "mkl_dcsrmv" and "mkl_sparse_d_mv" produces the correct result. Can anybody tell me what I am doing wrong? I want to use "SPARSE_LAYOUT_COLUMN_MAJOR" for dense matrix. Basically MKL is accessing B matrix differently that I intended to use.&lt;/P&gt;
&lt;P&gt;Sukla&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;#include &amp;lt;sstream&amp;gt;&lt;BR /&gt;#include &amp;lt;iostream&amp;gt;&lt;/P&gt;
&lt;P&gt;#include &amp;lt;mkl.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include &amp;lt;string.h&amp;gt;&lt;/P&gt;
&lt;P&gt;#include &amp;lt;sstream&amp;gt;&lt;/P&gt;
&lt;P&gt;int main(int argc, char ** argv)&lt;BR /&gt;{&lt;BR /&gt;MKL_INT mkl_nrow = 2;&lt;BR /&gt;MKL_INT mkl_ncol = 3;&lt;BR /&gt;MKL_INT mkl_numVec = 2;&lt;BR /&gt;MKL_INT amklIaPtr[4] = {0,2,4,6};&lt;BR /&gt;MKL_INT amklJaPtr[6] = { 0,1,0,1,0,1 };&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;double aValuePtr[6] = { 1.,2.0 ,0.0 ,5.,-1,-2.};&lt;BR /&gt;double bValuePtr[] = { 1.,2.0,5.,2.,3.,-5 ,-.1,-0.2,0.3};&lt;BR /&gt;double resultProd[10] ;&lt;/P&gt;
&lt;P&gt;double alpha = 1.0, beta = 0.;&lt;BR /&gt;char matdescra[6] = { 'S','U','N','C',' ',' ' };&lt;BR /&gt;matdescra[0] = 'G';&lt;BR /&gt;char transa='T';&lt;BR /&gt;for (int icol = 0; icol &amp;lt; mkl_numVec; icol++) {&lt;BR /&gt;mkl_dcsrmv(&amp;amp;transa, &amp;amp;mkl_ncol, &amp;amp;mkl_nrow, &amp;amp;alpha, matdescra, aValuePtr, &amp;amp;amklJaPtr[0], &lt;BR /&gt;&amp;amp;amklIaPtr[0], &amp;amp;amklIaPtr[1], &amp;amp;bValuePtr[icol*mkl_ncol],&lt;BR /&gt;&amp;amp;beta, &amp;amp;resultProd[icol*mkl_nrow]);&lt;BR /&gt;}&lt;BR /&gt;// ************ CORRECT ANSWER *********************&lt;BR /&gt;// resultProd[4] = { -4.0,2.0,7.0,29.0 }; &lt;BR /&gt;// ************ CORRECT ANSWER *********************&lt;/P&gt;
&lt;P&gt;sparse_matrix_t aMatrix;&lt;BR /&gt;sparse_index_base_t indexing = SPARSE_INDEX_BASE_ZERO;&lt;BR /&gt;sparse_status_t status = mkl_sparse_d_create_csc(&lt;BR /&gt;&amp;amp;aMatrix, indexing, /* indexing: C-style or Fortran-style */&lt;BR /&gt;mkl_nrow, mkl_ncol,&lt;BR /&gt;amklIaPtr, &amp;amp;amklIaPtr[1], amklJaPtr, aValuePtr);&lt;BR /&gt;sparse_operation_t spOp = SPARSE_OPERATION_NON_TRANSPOSE;&lt;BR /&gt;matrix_descr descr = { SPARSE_MATRIX_TYPE_GENERAL, SPARSE_FILL_MODE_LOWER, SPARSE_DIAG_NON_UNIT };&lt;BR /&gt;for(int icol=0; icol&amp;lt; mkl_numVec; icol++){&lt;BR /&gt;status = mkl_sparse_d_mv(&lt;BR /&gt;spOp,&lt;BR /&gt;alpha,&lt;BR /&gt;aMatrix,&lt;BR /&gt;descr, /* sparse_matrix_type_t + sparse_fill_mode_t + sparse_diag_type_t */&lt;BR /&gt;&amp;amp;bValuePtr[icol*mkl_ncol],&lt;BR /&gt;beta,&lt;BR /&gt;&amp;amp;resultProd[icol*mkl_nrow]);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;// ************ CORRECT ANSWER *********************&lt;BR /&gt;// resultProd[4] = { -4.0,2.0,7.0,29.0 }; &lt;BR /&gt;// ************ CORRECT ANSWER *********************&lt;/P&gt;
&lt;P&gt;status = mkl_sparse_d_mm(&lt;BR /&gt;spOp,&lt;BR /&gt;alpha,&lt;BR /&gt;aMatrix,&lt;BR /&gt;descr, /* sparse_matrix_type_t + sparse_fill_mode_t + sparse_diag_type_t */&lt;BR /&gt;SPARSE_LAYOUT_COLUMN_MAJOR, /* storage scheme for the dense matrix: C-style or Fortran-style */&lt;BR /&gt;bValuePtr,&lt;BR /&gt;mkl_numVec,&lt;BR /&gt;mkl_ncol, //---&amp;gt; Something Wrong here&lt;BR /&gt;beta,&lt;BR /&gt;resultProd,&lt;BR /&gt;mkl_nrow);&lt;BR /&gt;// ************ WRONG ANSWER *********************&lt;BR /&gt;// resultProd[4] = { 1.1,2.2,12.2,19.4 }; &lt;BR /&gt;// ************ WRONG ANSWER ********************* &lt;BR /&gt;&lt;BR /&gt;return 0;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 17:50:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241272#M30585</guid>
      <dc:creator>SUKLA</dc:creator>
      <dc:date>2020-12-28T17:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241423#M30586</link>
      <description>&lt;P&gt;I have not inspected every line of your code, but it strikes me that the problem you have is that the sparse matrix represented is the transpose of A, rather than A itself. If&amp;nbsp;&lt;SPAN&gt;mkl_nrow = 2, the arrays (using notation in MKL Ref. Man.) pntre[] and pntrb[] should each have 2 entries. The representation is required to be the CSR representation of A, not of its transpose.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 01:31:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241423#M30586</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2020-12-29T01:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241507#M30587</link>
      <description>&lt;P&gt;Mecej,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; However, I am using&amp;nbsp;&lt;SPAN&gt;mkl_sparse_d_create_&lt;FONT color="#FF0000"&gt;csc&lt;/FONT&gt; instead of&amp;nbsp;mkl_sparse_d_create_csr. I do not think I need to do transpose here. Please help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 05:29:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241507#M30587</guid>
      <dc:creator>SUKLA</dc:creator>
      <dc:date>2020-12-29T05:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241508#M30588</link>
      <description>&lt;P&gt;Furthermore, MatrixVector multiplication works without transposing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 05:31:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241508#M30588</guid>
      <dc:creator>SUKLA</dc:creator>
      <dc:date>2020-12-29T05:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241676#M30591</link>
      <description>&lt;P&gt;Sorry, I overlooked the part where you used&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;mkl_sparse_d_create_csc rather than the _csr version.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 15:29:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1241676#M30591</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2020-12-29T15:29:51Z</dc:date>
    </item>
    <item>
      <title>Re:question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1243426#M30605</link>
      <description>&lt;P&gt;Hi Sukla,&lt;/P&gt;&lt;P&gt;We are able to reproduce the issue which you are facing on our end. We are escalating this thread to a Subject Matter Expert(SME) who will guide you further.&lt;/P&gt;&lt;P&gt;Have a Good day!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Goutham&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Jan 2021 12:32:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1243426#M30605</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2021-01-05T12:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re:question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1243645#M30606</link>
      <description>&lt;P&gt;Goutam,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Let me know when I can get new MKL library to test it. I have another question about EFAST. Does the B matrix have to be positive definite? Can it not be semi-positive definite? I can not to get eigenvalue from FEAST if the B matrix is semi-positive definite (I have zero row and columns for particulation degree-of-freedom in B matrix.).&lt;/P&gt;
&lt;P&gt;Sukla&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 00:11:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1243645#M30606</guid>
      <dc:creator>SUKLA</dc:creator>
      <dc:date>2021-01-06T00:11:12Z</dc:date>
    </item>
    <item>
      <title>Re:question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1243711#M30607</link>
      <description>&lt;P&gt;B has to be positive devined&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Jan 2021 04:40:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1243711#M30607</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-01-06T04:40:45Z</dc:date>
    </item>
    <item>
      <title>Re:question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1267998#M31089</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 12px;"&gt;The cause of the issue has been investigated: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 12px;"&gt;The status returned by the mkl_sparse_d_mm() call is == &amp;nbsp;SPARSE_STATUS_SUCCESS even though it should return SPARSE_STATUS_NOT_SUPPORTED. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 12px;"&gt;Please check the documentation - &lt;/SPAN&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/inspector-executor-sparse-blas-routines/inspector-executor-sparse-blas-execution-routines/mkl-sparse-mm.html" rel="noopener noreferrer" target="_blank" style="font-family: Arial, sans-serif; font-size: 12px;"&gt;https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/inspector-executor-sparse-blas-routines/inspector-executor-sparse-blas-execution-routines/mkl-sparse-mm.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 12px;"&gt;You called SPARSE_INDEX_BASE_ZERO&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt; and CSC format but this configuration doesn’t support.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Mar 2021 02:49:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1267998#M31089</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-03-26T02:49:40Z</dc:date>
    </item>
    <item>
      <title>Re:question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1270732#M31106</link>
      <description>&lt;P&gt;The issue is closing and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2021 02:46:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1270732#M31106</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-04-05T02:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Re:question about MKL matrix-matrix multiplier.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1426292#M33807</link>
      <description>&lt;P&gt;Hello Gennady,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;B matrix is symmetry semi-positive definite. Both A and B matrices are large and sparse. I understand the some of the eigenvalues could be infinite. Do you have any suggesion how to use B matrix as semi-positive definite matrix when upper limit is specified?&lt;/P&gt;
&lt;P&gt;Sukla&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 02:24:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/question-about-MKL-matrix-matrix-multiplier/m-p/1426292#M33807</guid>
      <dc:creator>SUKLA</dc:creator>
      <dc:date>2022-10-31T02:24:33Z</dc:date>
    </item>
  </channel>
</rss>

