<?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: mkl_sparse_d_add Error in addition of sparse matrix in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-d-add-Error-in-addition-of-sparse-matrix/m-p/1423001#M33778</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/228302"&gt;@NEROKAI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us about your issue. I've reviewed the code and the input files.&lt;/P&gt;
&lt;P&gt;There appears to be a problem in your code. I see that you are creating your matrices with the following line:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;mkl_sparse_d_create_csr(&amp;amp;STIF, SPARSE_INDEX_BASE_ONE, &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;guimo + 1&lt;/STRONG&gt;&lt;/FONT&gt;, &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;guimo + 1&lt;/STRONG&gt;&lt;/FONT&gt;, K_hangshouzhibiao, K_hangshouzhibiao + 1, K_lieshu, K_zhi);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;In the above line, you are setting the number of rows and number of columns in your matrix both to "&lt;FONT face="courier new,courier"&gt;guimo+1&lt;/FONT&gt;" instead of (what I believe is the correct size, which is) "&lt;FONT face="courier new,courier"&gt;guimo&lt;/FONT&gt;". The line should have been:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;mkl_sparse_d_create_csr(&amp;amp;STIF, SPARSE_INDEX_BASE_ONE, &lt;STRONG&gt;guimo&lt;/STRONG&gt;, &lt;STRONG&gt;guimo&lt;/STRONG&gt;, K_hangshouzhibiao, K_hangshouzhibiao + 1, K_lieshu, K_zhi);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try making the above change and let us know if that fixes your issue?&lt;/P&gt;
&lt;P&gt;Here's the documentation for in case you need it for clarification:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/inspector-executor-sparse-blas-routines/matrix-manipulation-routines/mkl-sparse-create-csr.html" target="_blank" rel="noopener"&gt;mkl_sparse_?_create_csr&lt;/A&gt;&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this still doesn't fix the problem, please let us know the exact line you use to compile the program and link to oneMKL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Gajanan Choudhary&lt;/P&gt;
&lt;P&gt;Software Engineer&lt;/P&gt;
&lt;P&gt;Intel oneAPI Math Kernel Library (oneMKL)&lt;/P&gt;</description>
    <pubDate>Tue, 18 Oct 2022 16:27:26 GMT</pubDate>
    <dc:creator>Gajanan_Choudhary</dc:creator>
    <dc:date>2022-10-18T16:27:26Z</dc:date>
    <item>
      <title>mkl_sparse_d_add Error in addition of sparse matrix</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-d-add-Error-in-addition-of-sparse-matrix/m-p/1422821#M33775</link>
      <description>&lt;P&gt;Hi，&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; I'm using version 2022.1.0 to compute the addition of a sparse matrix, and I'm running into some problems. I read my matrix information from the txt file and created two sparse matrices, then I want to add the two matrices, I call the mkl_sparse_d_add function, then I can't get the result I want.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; I used sparse_status_t to output the error message and it showed 2. I checked the code and couldn't find the error that appeared. I have put the code that reproduces this error below, thanks for any help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 06:09:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-d-add-Error-in-addition-of-sparse-matrix/m-p/1422821#M33775</guid>
      <dc:creator>NEROKAI</dc:creator>
      <dc:date>2022-10-18T06:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: mkl_sparse_d_add Error in addition of sparse matrix</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-d-add-Error-in-addition-of-sparse-matrix/m-p/1423001#M33778</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/228302"&gt;@NEROKAI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us about your issue. I've reviewed the code and the input files.&lt;/P&gt;
&lt;P&gt;There appears to be a problem in your code. I see that you are creating your matrices with the following line:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;mkl_sparse_d_create_csr(&amp;amp;STIF, SPARSE_INDEX_BASE_ONE, &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;guimo + 1&lt;/STRONG&gt;&lt;/FONT&gt;, &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;guimo + 1&lt;/STRONG&gt;&lt;/FONT&gt;, K_hangshouzhibiao, K_hangshouzhibiao + 1, K_lieshu, K_zhi);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;In the above line, you are setting the number of rows and number of columns in your matrix both to "&lt;FONT face="courier new,courier"&gt;guimo+1&lt;/FONT&gt;" instead of (what I believe is the correct size, which is) "&lt;FONT face="courier new,courier"&gt;guimo&lt;/FONT&gt;". The line should have been:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;mkl_sparse_d_create_csr(&amp;amp;STIF, SPARSE_INDEX_BASE_ONE, &lt;STRONG&gt;guimo&lt;/STRONG&gt;, &lt;STRONG&gt;guimo&lt;/STRONG&gt;, K_hangshouzhibiao, K_hangshouzhibiao + 1, K_lieshu, K_zhi);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try making the above change and let us know if that fixes your issue?&lt;/P&gt;
&lt;P&gt;Here's the documentation for in case you need it for clarification:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/inspector-executor-sparse-blas-routines/matrix-manipulation-routines/mkl-sparse-create-csr.html" target="_blank" rel="noopener"&gt;mkl_sparse_?_create_csr&lt;/A&gt;&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this still doesn't fix the problem, please let us know the exact line you use to compile the program and link to oneMKL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Gajanan Choudhary&lt;/P&gt;
&lt;P&gt;Software Engineer&lt;/P&gt;
&lt;P&gt;Intel oneAPI Math Kernel Library (oneMKL)&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 16:27:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-d-add-Error-in-addition-of-sparse-matrix/m-p/1423001#M33778</guid>
      <dc:creator>Gajanan_Choudhary</dc:creator>
      <dc:date>2022-10-18T16:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: mkl_sparse_d_add Error in addition of sparse matrix</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-d-add-Error-in-addition-of-sparse-matrix/m-p/1423292#M33780</link>
      <description>&lt;P&gt;Hi，&lt;/P&gt;
&lt;P&gt;Thank you very much for your help, I didn't realize this problem, thank you~&lt;/P&gt;
&lt;P&gt;I can now run the code properly&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 11:05:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-d-add-Error-in-addition-of-sparse-matrix/m-p/1423292#M33780</guid>
      <dc:creator>NEROKAI</dc:creator>
      <dc:date>2022-10-19T11:05:15Z</dc:date>
    </item>
    <item>
      <title>Re:mkl_sparse_d_add Error in addition of sparse matrix</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-d-add-Error-in-addition-of-sparse-matrix/m-p/1423294#M33781</link>
      <description>&lt;P&gt;Hi Nero,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;I can now run the code properly&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks for the confirmation.&lt;/P&gt;&lt;P&gt;As the issue is resolved, we are going ahead and closing this thread. Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Oct 2022 11:21:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-d-add-Error-in-addition-of-sparse-matrix/m-p/1423294#M33781</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-10-19T11:21:09Z</dc:date>
    </item>
  </channel>
</rss>

