<?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 Hi in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930834#M13725</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have two questions.&lt;/P&gt;

&lt;P&gt;Could you provide your hardware information?&lt;/P&gt;

&lt;P&gt;Do&amp;nbsp;you store full matrix(lower + upper part),&amp;nbsp;or store only lower, or story only upper part of the matrix?&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Victor&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2014 10:38:31 GMT</pubDate>
    <dc:creator>Victor_Gladkikh</dc:creator>
    <dc:date>2014-02-28T10:38:31Z</dc:date>
    <item>
      <title>Symmetric sparse matrix - dense matrix multiplication</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930833#M13724</link>
      <description>&lt;P&gt;I need to multiply a symmetric sparse matrix A with a dense matrix X (Y = A*X) using multi-thread/core. The matrices I'm using are the adjacency matrix of graphs, with large number of nodes (up to 2 million nodes).&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 1.5; font-size: 1em"&gt;I have tried two approaches:&lt;/SPAN&gt;&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;mkl_dcsrmm() with matdescra[0] set to 's'.&lt;/LI&gt;
	&lt;LI&gt;mkl_dcsrsymv() in a for-loop, looping over the column vectors of X. Below is the code I used.&lt;/LI&gt;
&lt;/OL&gt;

&lt;PRE class="brush:cpp;"&gt;
#pragma omp parallel for schedule(static)
for(int i=0; i&amp;lt;n; i++) {
  mkl_dcsrsymv(&amp;amp;matdescra[1], &amp;amp;m, values, rowIndex, columns, X&lt;I&gt;, Y&lt;I&gt;);
}
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;Initially, I thought that the first option (Sparse BLAS level 3) should be faster than the second one. But, I'm getting the opposite timing results.&lt;/P&gt;

&lt;P&gt;Below is an example of a symmetric sparse matrix A with about 1.7M rows/columns and&amp;nbsp;42M non-zero entries and a dense matrix X with the same number of rows and 100 columns. Running on number of threads set to 2, 4, and 8, respectively.&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;option1:&amp;nbsp;19.17sec,&amp;nbsp;9.38sec,&amp;nbsp;5.20sec&lt;/LI&gt;
	&lt;LI&gt;option2:&amp;nbsp;13.26sec,&amp;nbsp;6.83sec,&amp;nbsp;3.84sec&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Is there any particular reason for this or am I missing something? Because, it seems that mkl_dcsrmm() should be doing things more efficiently than my for-loop.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 1.5; font-size: 1em"&gt;I compiled the code with the following command;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5; font-family: Consolas, 'Lucida Console', Menlo, Monaco, 'DejaVu Sans Mono', monospace, sans-serif; font-size: 1em"&gt;icpc -mkl=parallel -I$(MKLROOT)/include -O3 -openmp -o test test.cpp -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2014 00:07:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930833#M13724</guid>
      <dc:creator>Donghyuk_S_</dc:creator>
      <dc:date>2014-02-28T00:07:15Z</dc:date>
    </item>
    <item>
      <title>Hi</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930834#M13725</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have two questions.&lt;/P&gt;

&lt;P&gt;Could you provide your hardware information?&lt;/P&gt;

&lt;P&gt;Do&amp;nbsp;you store full matrix(lower + upper part),&amp;nbsp;or store only lower, or story only upper part of the matrix?&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Victor&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2014 10:38:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930834#M13725</guid>
      <dc:creator>Victor_Gladkikh</dc:creator>
      <dc:date>2014-02-28T10:38:31Z</dc:date>
    </item>
    <item>
      <title>The hardware I'm running on</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930835#M13726</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;The hardware I'm running on is a server with&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;two Xeon E5-2680 processors (2.7GHz 8 cores/16 threads) and 32GB of memory.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I only store the upper triangular part of the matrix.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2014 14:30:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930835#M13726</guid>
      <dc:creator>Donghyuk_S_</dc:creator>
      <dc:date>2014-02-28T14:30:19Z</dc:date>
    </item>
    <item>
      <title>Hi Donghyuk,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930836#M13727</link>
      <description>&lt;P&gt;Hi Donghyuk,&lt;/P&gt;

&lt;P&gt;Thank you for the reply.&amp;nbsp;It may be a bug. I have escalated it to our developer team. Will update if any updates.&lt;/P&gt;

&lt;P&gt;And if&amp;nbsp;it is conveniet for you,&amp;nbsp;&amp;nbsp;a test case (include test vectors)&amp;nbsp;would be&amp;nbsp;helpful.&amp;nbsp; You can send it by send author a message if the test case is private protected. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 03:04:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930836#M13727</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2014-03-04T03:04:04Z</dc:date>
    </item>
    <item>
      <title>Hi Donghyuk,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930837#M13728</link>
      <description>&lt;P&gt;Hi Donghyuk,&lt;/P&gt;

&lt;P&gt;I'm glad to notify you that we add new API and modify some initialized code on the sparse matrix function in MKL 11.3 beta and MKL 11.2.3.&amp;nbsp; The performance should be keep consistent.&amp;nbsp;You are welcomed to try them.&lt;/P&gt;

&lt;P&gt;I will send the beta invitation letter to you by private message.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 01:46:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Symmetric-sparse-matrix-dense-matrix-multiplication/m-p/930837#M13728</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-04-27T01:46:33Z</dc:date>
    </item>
  </channel>
</rss>

