<?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 sparse matrix sparse matrix multiplication in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sparse-matrix-sparse-matrix-multiplication/m-p/763741#M91</link>
    <description>Hi All,&lt;BR /&gt; I want to multiply sparse matrix with a sparse matrix. Both matrices are stored in CSR format. The suitable function to do this operation is mkl_scsrmultcsr. I wrote a sample code but I'm getting incorrect result. Can you please help me in debugging the program or provide an example to use this function.&lt;BR /&gt;&lt;BR /&gt;I'm having a i7 980x processor and fc13 OS.&lt;BR /&gt;&lt;BR /&gt;The command I used for compiling is &lt;BR /&gt;&lt;BR /&gt;gcc multiplication.c -L/opt/intel/mkl/lib/intel64 -Wl,--start-group -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -Wl,--end-group -fopenmp -lpthread -lm&lt;BR /&gt;&lt;BR /&gt;The program is here &lt;A href="http://pastebin.com/pf3pJwE8" target="_blank"&gt;http://pastebin.com/pf3pJwE8&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The output matrix should be [4,0;0,9] ( [2,0;0,3] * [2,0;0,3] ) but the output the program is giving is &lt;BR /&gt;&lt;BR /&gt;Result nnz = 1&lt;BR /&gt;ic[0] = 1&lt;BR /&gt;ic[1] = 1&lt;BR /&gt;ic[2] = 1&lt;BR /&gt;0.000000 0&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards,&lt;BR /&gt;M. Kiran Kumar.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 13 Apr 2011 19:14:35 GMT</pubDate>
    <dc:creator>kirankumarm</dc:creator>
    <dc:date>2011-04-13T19:14:35Z</dc:date>
    <item>
      <title>sparse matrix sparse matrix multiplication</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sparse-matrix-sparse-matrix-multiplication/m-p/763741#M91</link>
      <description>Hi All,&lt;BR /&gt; I want to multiply sparse matrix with a sparse matrix. Both matrices are stored in CSR format. The suitable function to do this operation is mkl_scsrmultcsr. I wrote a sample code but I'm getting incorrect result. Can you please help me in debugging the program or provide an example to use this function.&lt;BR /&gt;&lt;BR /&gt;I'm having a i7 980x processor and fc13 OS.&lt;BR /&gt;&lt;BR /&gt;The command I used for compiling is &lt;BR /&gt;&lt;BR /&gt;gcc multiplication.c -L/opt/intel/mkl/lib/intel64 -Wl,--start-group -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -Wl,--end-group -fopenmp -lpthread -lm&lt;BR /&gt;&lt;BR /&gt;The program is here &lt;A href="http://pastebin.com/pf3pJwE8" target="_blank"&gt;http://pastebin.com/pf3pJwE8&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The output matrix should be [4,0;0,9] ( [2,0;0,3] * [2,0;0,3] ) but the output the program is giving is &lt;BR /&gt;&lt;BR /&gt;Result nnz = 1&lt;BR /&gt;ic[0] = 1&lt;BR /&gt;ic[1] = 1&lt;BR /&gt;ic[2] = 1&lt;BR /&gt;0.000000 0&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards,&lt;BR /&gt;M. Kiran Kumar.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Apr 2011 19:14:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sparse-matrix-sparse-matrix-multiplication/m-p/763741#M91</guid>
      <dc:creator>kirankumarm</dc:creator>
      <dc:date>2011-04-13T19:14:35Z</dc:date>
    </item>
    <item>
      <title>sparse matrix sparse matrix multiplication</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sparse-matrix-sparse-matrix-multiplication/m-p/763742#M92</link>
      <description>Hi,&lt;DIV&gt;It's seems that you use zero-based indexing in arrays ia and ja in one-based functionmkl_scsrmultcsr. I've change arrays ia and ja in your code from&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;int ja[] = {0,1};&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;int ia[] = {0,1,2};&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;to&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;int ja[] = {1,2};&lt;/DIV&gt;&lt;DIV&gt;int ia[] = {1,2,3};&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;and got output from your example:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;4.000000 1&lt;/DIV&gt;&lt;DIV&gt;9.000000 2&lt;/DIV&gt;&lt;DIV&gt;0.000000 0&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;With best regards,&lt;/DIV&gt;&lt;DIV&gt;Alexander Kalinkin&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Apr 2011 01:15:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/sparse-matrix-sparse-matrix-multiplication/m-p/763742#M92</guid>
      <dc:creator>Alexander_K_Intel2</dc:creator>
      <dc:date>2011-04-14T01:15:22Z</dc:date>
    </item>
  </channel>
</rss>

