<?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 Quote:duan, burness wrote: in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175120#M28862</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;duan, burness wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG class="quote-header"&gt;Quote:&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE class="quote-msg quote-nest-1 odd"&gt;
	&lt;DIV class="quote-author"&gt;&lt;EM class="placeholder"&gt;duan, burness&lt;/EM&gt; wrote:&lt;/DIV&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P&gt;&lt;STRONG&gt;引文：&lt;/STRONG&gt;&lt;/P&gt;

	&lt;BLOCKQUOTE&gt;
		&lt;P&gt;&lt;EM&gt;Ying H. (Intel)&lt;/EM&gt; 写道：&lt;/P&gt;

		&lt;P&gt;&amp;nbsp;&lt;/P&gt;

		&lt;P&gt;Hello,&lt;/P&gt;

		&lt;P&gt;Hmm, if csc format,&amp;nbsp;&amp;nbsp; then how about first call&amp;nbsp; mkl_sparse_s_create_csc&amp;nbsp; based on your B array.&amp;nbsp; , then call&lt;/P&gt;

		&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;STRONG&gt;mkl_sparse_convert_csr&amp;nbsp; (you don't need create any new&amp;nbsp;array, just sparse&amp;nbsp;matrix * ) &lt;/STRONG&gt;&lt;BR /&gt;
			&amp;nbsp;then call &lt;STRONG&gt;mkl_sparse_spmm&lt;/STRONG&gt;&lt;/P&gt;

		&lt;P&gt;&lt;STRONG&gt;best Regards,&lt;/STRONG&gt;&lt;/P&gt;

		&lt;P&gt;&lt;STRONG&gt;Ying &lt;/STRONG&gt;&lt;/P&gt;

		&lt;P&gt;&amp;nbsp;&lt;/P&gt;

		&lt;P&gt;&amp;nbsp;&lt;/P&gt;
	&lt;/BLOCKQUOTE&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P&gt;I will try first , but isn't it cause OOM?&lt;/P&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;hi Ying:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; I have try the method you share, but it seems that when I&amp;nbsp; run the code before&amp;nbsp;mkl_sparse_convert_csr. It happen OOM&lt;/P&gt;

&lt;P&gt;maybe&amp;nbsp; when I convert to csr, it will new a 5billion+1 array? Could you help me with this problem?&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;First of all for your matrices it is better to use spmmd function - it's look like your result is dense.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;However, right now this function supported only csr format and transposition of first matrix only. So the only way i see is to divide both matrices on chanks, convert second matrix from csc to csr, call spmmd, add result in accum and remove temp data, something like it (pseudocode):&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;divide matrix A and B on several chunks (with 1 millions of rows, for example)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;for (i in chunk) {&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; font-style: italic;"&gt;mkl_sparse_s_create_csc(B_i);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;mkl_sparse_convert_csr(B_i, Bcsr_i);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;&amp;nbsp;mkl_sparse_d_spmmd(&lt;/SPAN&gt;SPARSE_OPERATION_NON_TRANSPOSE,&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;A_i, Bcsr_i, C_i);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;C +=C_i;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;mkl_sparse_delete(Bcsr_i);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Alex&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 02:31:50 GMT</pubDate>
    <dc:creator>Alexander_K_Intel2</dc:creator>
    <dc:date>2018-01-17T02:31:50Z</dc:date>
    <item>
      <title>A large Sparse Matrix and Sparse Matrix multipy?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175111#M28853</link>
      <description>&lt;P&gt;C=A*B&lt;/P&gt;

&lt;P&gt;A is a large sparse matrix 10*5000000000, and B is a Sparse matrix with 5000000000*10.&lt;/P&gt;

&lt;P&gt;A is created with csr, and B is create with csc.&lt;/P&gt;

&lt;P&gt;each matrix may only have a few elements (NNZ=10)&lt;/P&gt;

&lt;P&gt;How I can do this multipy? Did&amp;nbsp;mkl_sparse_spmm support the multipy between csr and csc?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 10:05:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175111#M28853</guid>
      <dc:creator>duan__burness</dc:creator>
      <dc:date>2017-12-19T10:05:43Z</dc:date>
    </item>
    <item>
      <title>I do not know of any routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175112#M28854</link>
      <description>&lt;P&gt;I do not know of any routine to do exactly what you ask for.&lt;/P&gt;

&lt;P&gt;The problem with multiplying sparse matrices is that, in general, their product is unlikely to be sparse, or at least not as sparse as the individual matrices and, what is more of a problem, the pattern of non-zero entries in the product matrix is neither known nor easy to compute. It is best to avoid forming the product of sparse matrices, if that is at all possible.&lt;/P&gt;

&lt;P&gt;The CSR representation of A is the same as the CSC representation of A&lt;SUP&gt;T&lt;/SUP&gt;. This property can be used in two ways. If the matrix is being formed from a COO representation or otherwise, interchanging the row/column coordinates is all that needs to be done to obtain the CSR representation instead of the CSC representation. Secondly, many BLAS level 2 and 3 routines give you an option to transpose one of the input matrices before performing an operation such as ?AXPY.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 14:30:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175112#M28854</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2017-12-19T14:30:21Z</dc:date>
    </item>
    <item>
      <title>Hi Burness,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175113#M28855</link>
      <description>&lt;P&gt;Hi Burness,&lt;/P&gt;

&lt;P&gt;I recalled,&amp;nbsp; the c&lt;SPAN class="fontstyle0"&gt;&lt;FONT face="Verdana" size="2"&gt;omputational routines required CSR or BSR model.&amp;nbsp; But it is convenient to use COO format.&amp;nbsp;&amp;nbsp;for example,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="fontstyle0"&gt;&lt;STRONG&gt;&lt;FONT color="#0860a8" size="3"&gt;first &amp;nbsp;mkl_sparse_?_create_coo&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN class="fontstyle1"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;Creates a handle for a matrix in COO format.&lt;/FONT&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="fontstyle1"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;&amp;nbsp;then &lt;/FONT&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN class="fontstyle0"&gt;&lt;STRONG&gt;&lt;FONT color="#0860a8" size="3"&gt;mkl_sparse_convert_csr&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR style="text-transform: none; line-height: normal; text-indent: 0px; letter-spacing: normal; font-style: normal; font-variant: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" /&gt;
	then &lt;SPAN class="fontstyle0"&gt;&lt;STRONG&gt;&lt;FONT color="#0860a8" size="3"&gt;mkl_sparse_spmm, will do your sparse matrix multiply. &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN class="fontstyle1"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;Computes the product of two sparse matrices and&lt;BR /&gt;
	stores the result as a sparse matrix.&lt;/FONT&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="fontstyle1"&gt;&lt;FONT size="2"&gt;MKL provide sample code under MKL install folder, for example&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;/opt/intel/mkl/examples/examples_core_c.tgz . unzip&amp;nbsp;them. in Spblas*&lt;BR /&gt;
	&lt;SPAN class="fontstyle1"&gt;&lt;FONT size="2"&gt;You can refer to them. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 02:13:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175113#M28855</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2017-12-20T02:13:19Z</dc:date>
    </item>
    <item>
      <title>引文：Ying H. (Intel) 写道：</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175114#M28856</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Ying H. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi Burness,&lt;/P&gt;

&lt;P&gt;I recalled,&amp;nbsp; the computational routines required CSR or BSR model.&amp;nbsp; But it is convenient to use COO format.&amp;nbsp;&amp;nbsp;for example,&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;first &amp;nbsp;mkl_sparse_?_create_coo&lt;/STRONG&gt;&lt;BR /&gt;
	&lt;EM&gt;Creates a handle for a matrix in COO format.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;nbsp;then &lt;/EM&gt;&lt;STRONG&gt;mkl_sparse_convert_csr&lt;/STRONG&gt;&lt;BR /&gt;
	then &lt;STRONG&gt;mkl_sparse_spmm, will do your sparse matrix multiply. &lt;/STRONG&gt;&lt;BR /&gt;
	&lt;EM&gt;Computes the product of two sparse matrices and&lt;BR /&gt;
	stores the result as a sparse matrix.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;MKL provide sample code under MKL install folder, for example&amp;nbsp; /opt/intel/mkl/examples/examples_core_c.tgz . unzip&amp;nbsp;them. in Spblas*&lt;BR /&gt;
	You can refer to them.&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks for your reply!&lt;/P&gt;

&lt;P&gt;I'm sorry that I have not explain it clearly.&lt;/P&gt;

&lt;P&gt;Suppose I have 2*5billion Matrix A and 5billion*2 Matrix B multipy:&lt;/P&gt;

&lt;P&gt;first i will init these two matrix, for 2*5billion it is ok to new the A with csr, but for 5billion*2 if we new with csr, we must new a array to store 5billion+1 colIndex(OOM), but if we new with csc, it returns 'SPARSE_STATUS_NOT_SUPPORTED'&amp;nbsp; when we use&amp;nbsp;&lt;SPAN style="font-weight: 700; font-size: 13.008px;"&gt;mkl_sparse_spmm.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;B&gt;Is there a method to solve this problem?&lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 03:46:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175114#M28856</guid>
      <dc:creator>duan__burness</dc:creator>
      <dc:date>2017-12-20T03:46:00Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175115#M28857</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="fontstyle0"&gt;&lt;FONT size="2"&gt;Hmm, if csc format,&amp;nbsp;&amp;nbsp; then how about first call&amp;nbsp; mkl_sparse_s_create_csc&amp;nbsp; based on your B array.&amp;nbsp; , then call &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;STRONG&gt;mkl_sparse_convert_csr&amp;nbsp; (you don't need create any new&amp;nbsp;array, just sparse&amp;nbsp;matrix * ) &lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp;then call &lt;STRONG&gt;mkl_sparse_spmm&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;best Regards,&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Ying &lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 05:30:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175115#M28857</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2017-12-20T05:30:20Z</dc:date>
    </item>
    <item>
      <title>引文：Ying H. (Intel) 写道：</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175116#M28858</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Ying H. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Hmm, if csc format,&amp;nbsp;&amp;nbsp; then how about first call&amp;nbsp; mkl_sparse_s_create_csc&amp;nbsp; based on your B array.&amp;nbsp; , then call&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;STRONG&gt;mkl_sparse_convert_csr&amp;nbsp; (you don't need create any new&amp;nbsp;array, just sparse&amp;nbsp;matrix * ) &lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp;then call &lt;STRONG&gt;mkl_sparse_spmm&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;best Regards,&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Ying &lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I will try first , but isn't it cause OOM?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 06:25:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175116#M28858</guid>
      <dc:creator>duan__burness</dc:creator>
      <dc:date>2017-12-20T06:25:02Z</dc:date>
    </item>
    <item>
      <title>引文：duan, burness 写道：</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175117#M28859</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;duan, burness wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG class="quote-header"&gt;引文：&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE class="quote-msg quote-nest-1 odd"&gt;
	&lt;DIV class="quote-author"&gt;&lt;EM class="placeholder"&gt;Ying H. (Intel)&lt;/EM&gt; 写道：&lt;/DIV&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P&gt;Hello,&lt;/P&gt;

	&lt;P&gt;Hmm, if csc format,&amp;nbsp;&amp;nbsp; then how about first call&amp;nbsp; mkl_sparse_s_create_csc&amp;nbsp; based on your B array.&amp;nbsp; , then call&lt;/P&gt;

	&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;STRONG&gt;mkl_sparse_convert_csr&amp;nbsp; (you don't need create any new&amp;nbsp;array, just sparse&amp;nbsp;matrix * ) &lt;/STRONG&gt;&lt;BR /&gt;
		&amp;nbsp;then call &lt;STRONG&gt;mkl_sparse_spmm&lt;/STRONG&gt;&lt;/P&gt;

	&lt;P&gt;&lt;STRONG&gt;best Regards,&lt;/STRONG&gt;&lt;/P&gt;

	&lt;P&gt;&lt;STRONG&gt;Ying &lt;/STRONG&gt;&lt;/P&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I will try first , but isn't it cause OOM?&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;hi Ying:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; I have try the method you share, but it seems that when I&amp;nbsp; run the code before&amp;nbsp;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;mkl_sparse_convert_csr. It happen OOM&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;maybe&amp;nbsp; when I convert to csr, it will new a 5billion+1 array? Could you help me with this problem?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 09:36:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175117#M28859</guid>
      <dc:creator>duan__burness</dc:creator>
      <dc:date>2017-12-20T09:36:52Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175118#M28860</link>
      <description>&lt;H2&gt;Hello,&lt;/H2&gt;

&lt;P&gt;​As i see,&amp;nbsp;here&amp;nbsp;the key problem is that&amp;nbsp;large matrix, so cause Out of memory, right? .&lt;/P&gt;

&lt;P&gt;But you had mentioned,&amp;nbsp; 2*5billion Matrix A and 5billion*2 Matrix B multiply, each matrix may only have a few elements (NNZ=10), then&amp;nbsp;you don't need to&amp;nbsp;call mkl function, thus avoid the big array&amp;nbsp;malloc , just do&amp;nbsp;multiply manually, is it ok?&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Second consideration about the large matrix, 2*5billion Matrix A and 5billion*2 Matrix B multiply, how many memory on your machine and how do you store and load/ operate&amp;nbsp;the matrix in&amp;nbsp;your application?&lt;/P&gt;

&lt;P&gt;If suppose 4 byte,&amp;nbsp; one index&amp;nbsp;array will take at least 1*5 *10^9 * 4 byte =20G memory. if you have to operation such big matrix, what i can recommend for such matrix maybe consider big data solution,&amp;nbsp; like cluster sparse blas or&amp;nbsp;pblas&amp;nbsp;in MKL and anther sister library data analysis accelerate library, there are some algorithms to support distributed CSR sparse matrix, like SVD, PCA&amp;nbsp;etc.&amp;nbsp;&lt;/P&gt;

&lt;H2&gt;&lt;A href="https://software.intel.com/en-us/intel-daal" target="_blank" h="ID=SERP,5132.1"&gt;&lt;STRONG&gt;&lt;I data-bm="38"&gt;&lt;I class="01"&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt;Intel&lt;/U&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt;® &lt;/U&gt;&lt;/FONT&gt;&lt;I class="01"&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt;Data&lt;/U&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt; &lt;/U&gt;&lt;/FONT&gt;&lt;I class="01"&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt;Analytics&lt;/U&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt; &lt;/U&gt;&lt;/FONT&gt;&lt;I&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt;Acceleration&lt;/U&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt; &lt;/U&gt;&lt;/FONT&gt;&lt;I&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt;Library&lt;/U&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;I data-bm="39"&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt; (&lt;/U&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;STRONG&gt;&lt;I data-bm="40"&gt;&lt;I&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt;Intel&lt;/U&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt;® &lt;/U&gt;&lt;/FONT&gt;&lt;I&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt;DAAL&lt;/U&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;I data-bm="41"&gt;&lt;FONT color="#001ba0"&gt;&lt;U&gt; …&lt;/U&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/A&gt;&lt;/H2&gt;

&lt;DIV class="b_caption"&gt;
	&lt;DIV class="b_attribution" u="1|5047|4803828190675974|znMV22pQGguIhx7ujrPRM1DKXJjCEp-n"&gt;&lt;CITE&gt;&lt;FONT color="#006d21"&gt;&lt;A href="https://software" target="_blank"&gt;https://software&lt;/A&gt;.&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#006d21"&gt;intel&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#006d21"&gt;.com/en-us/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#006d21"&gt;intel-daal&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/CITE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 04:01:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175118#M28860</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-01-05T04:01:50Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175119#M28861</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I had a similar issue where the CSR became more hindering than memory saving, in my case I didn't have billions of dimensions but still annoying because I had to perform the operation repeatedly and all the memory allocation and initialisation for no reason just costs a lot of time.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Since the number of nonzero entries is quite small in comparison to the dimension you'll most likely want to implement it by hand. In that case you'll be most efficient doing it in the coordinate representation in which case each of your matrices would be fully described by 20 indices, 10 values and the dimensions, i.e. 32 numbers rather than 5*10^9+10+10. Since your nnz is actually small you might even achieve some performance by sorting the entries of A and B appropriately apriori.&lt;/P&gt;

&lt;P&gt;The&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;SPARSE_STATUS_NOT_SUPPORTED&amp;nbsp; is returned because you tried to use anything but CSR format for the matrix-matrix multiplication - at least that is what I made of it when I last attempted to use the COO representation of two matrices to compute a sparse product.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;From what I can tell, the mkl_sparse_spmm function is a pretty interface to the mkl_?csrmultcsr sblas routine, i.e. it can compute the product of CSR-CSR (and potentially in extension CSC-CSC), if you try anything more exotic you get the not supported status. I believe, the analogue is true for the relationship between mkl_sparse_?_add and mkl_?csradd. This is based on my experience and I don't really know what happens behind the mkl_sparse_spmm call, perhaps someone could confirm or correct my statement?&lt;/P&gt;

&lt;P&gt;Best,&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;Manuel&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 11:10:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175119#M28861</guid>
      <dc:creator>Manuel_S_1</dc:creator>
      <dc:date>2018-01-05T11:10:58Z</dc:date>
    </item>
    <item>
      <title>Quote:duan, burness wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175120#M28862</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;duan, burness wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG class="quote-header"&gt;Quote:&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE class="quote-msg quote-nest-1 odd"&gt;
	&lt;DIV class="quote-author"&gt;&lt;EM class="placeholder"&gt;duan, burness&lt;/EM&gt; wrote:&lt;/DIV&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P&gt;&lt;STRONG&gt;引文：&lt;/STRONG&gt;&lt;/P&gt;

	&lt;BLOCKQUOTE&gt;
		&lt;P&gt;&lt;EM&gt;Ying H. (Intel)&lt;/EM&gt; 写道：&lt;/P&gt;

		&lt;P&gt;&amp;nbsp;&lt;/P&gt;

		&lt;P&gt;Hello,&lt;/P&gt;

		&lt;P&gt;Hmm, if csc format,&amp;nbsp;&amp;nbsp; then how about first call&amp;nbsp; mkl_sparse_s_create_csc&amp;nbsp; based on your B array.&amp;nbsp; , then call&lt;/P&gt;

		&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;STRONG&gt;mkl_sparse_convert_csr&amp;nbsp; (you don't need create any new&amp;nbsp;array, just sparse&amp;nbsp;matrix * ) &lt;/STRONG&gt;&lt;BR /&gt;
			&amp;nbsp;then call &lt;STRONG&gt;mkl_sparse_spmm&lt;/STRONG&gt;&lt;/P&gt;

		&lt;P&gt;&lt;STRONG&gt;best Regards,&lt;/STRONG&gt;&lt;/P&gt;

		&lt;P&gt;&lt;STRONG&gt;Ying &lt;/STRONG&gt;&lt;/P&gt;

		&lt;P&gt;&amp;nbsp;&lt;/P&gt;

		&lt;P&gt;&amp;nbsp;&lt;/P&gt;
	&lt;/BLOCKQUOTE&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P&gt;I will try first , but isn't it cause OOM?&lt;/P&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;hi Ying:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; I have try the method you share, but it seems that when I&amp;nbsp; run the code before&amp;nbsp;mkl_sparse_convert_csr. It happen OOM&lt;/P&gt;

&lt;P&gt;maybe&amp;nbsp; when I convert to csr, it will new a 5billion+1 array? Could you help me with this problem?&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;First of all for your matrices it is better to use spmmd function - it's look like your result is dense.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;However, right now this function supported only csr format and transposition of first matrix only. So the only way i see is to divide both matrices on chanks, convert second matrix from csc to csr, call spmmd, add result in accum and remove temp data, something like it (pseudocode):&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;divide matrix A and B on several chunks (with 1 millions of rows, for example)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;for (i in chunk) {&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; font-style: italic;"&gt;mkl_sparse_s_create_csc(B_i);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;mkl_sparse_convert_csr(B_i, Bcsr_i);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;&amp;nbsp;mkl_sparse_d_spmmd(&lt;/SPAN&gt;SPARSE_OPERATION_NON_TRANSPOSE,&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;A_i, Bcsr_i, C_i);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;C +=C_i;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; font-style: italic;"&gt;mkl_sparse_delete(Bcsr_i);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 02:31:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175120#M28862</guid>
      <dc:creator>Alexander_K_Intel2</dc:creator>
      <dc:date>2018-01-17T02:31:50Z</dc:date>
    </item>
    <item>
      <title>Quote:Manuel S. wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175121#M28863</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Manuel S. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I had a similar issue where the CSR became more hindering than memory saving, in my case I didn't have billions of dimensions but still annoying because I had to perform the operation repeatedly and all the memory allocation and initialisation for no reason just costs a lot of time.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Manuel&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hi Manuel,&lt;/P&gt;

&lt;P&gt;Can i ask which function you call repeatedly to understand how we can reduce number of memory allocation in your case?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 02:33:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-large-Sparse-Matrix-and-Sparse-Matrix-multipy/m-p/1175121#M28863</guid>
      <dc:creator>Alexander_K_Intel2</dc:creator>
      <dc:date>2018-01-17T02:33:02Z</dc:date>
    </item>
  </channel>
</rss>

