<?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 Exactly. If you wish, after in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153463#M27348</link>
    <description>&lt;P&gt;Exactly. If you wish, after the matrix multiplication is finished, copy the result from that "space" back into matrix C.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Nov 2018 01:53:26 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2018-11-06T01:53:26Z</dc:date>
    <item>
      <title>Questions &amp; Puzzled about mkl_sparse_spmm</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153460#M27345</link>
      <description>&lt;P&gt;Hi, I`m very very very anxious now because of the using of mkl_sparse_spmm function always feedback me an error beyond my understanding. When I trying to compute the product of two sparse matrix created by mkl_sparse_csr_create function, for the foremost, everything tends to be good, but when I tried to compute it again, an Access Conflict error appeared and I have no idea why this error shows.&lt;/P&gt;&lt;P&gt;Here is part of my codes&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;do i = 1, 5&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;!*steps to compute the values needed are ignored,and I `ve tested them to make sure they`re correct*!&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; !create sparse matrix, this step is right and the stat = 0&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;stat=mkl_sparse_z_create_csr(local(i)%Krc%B,sparse_index_base_one,sub(i)%temp, &amp;amp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sub(i)%Noc,local(i)%rows_start,local(i)%rows_end,local(i)%col_indx,local(i)%values)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;write(*,*) stat&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; !create sparse matrix, this step is right and the stat = 0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stat=mkl_sparse_z_create_csr(local(i)%Kcr%A,sparse_index_base_one,&amp;amp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;local(i)%Kcr%rows,local(i)%Kcr%cols,local(i)%Kcr%rows_start,local(i)%Kcr%rows_end,&amp;amp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;local(i)%Kcr%col_indx,local(i)%Kcr%values)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;write(*,*)&amp;nbsp; stat&lt;/P&gt;&lt;P&gt;!compute the product&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;info = mkl_sparse_spmm(sparse_operation_non_transpose,local(i)%Kcr%A,local(i)%Krc%B,local(i)%Kcr%B)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;write(*,*) info&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;end do&lt;/P&gt;&lt;P&gt;At the first loop for i == 1, it seems good, bu when it turns to the loop for i == 2, then the compiler feedback an error of Access Conflict which confuses me most. I can make sure that the sparse matrices are correct. and I did not deallocate the memory or destroy the sparse matrix handle ,so I have no ides why this situation shows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can U help me?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2018 03:16:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153460#M27345</guid>
      <dc:creator>wen_qiang_z_</dc:creator>
      <dc:date>2018-11-05T03:16:51Z</dc:date>
    </item>
    <item>
      <title>In general, when you call a</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153461#M27346</link>
      <description>&lt;P&gt;In general, when you call a matrix routine that takes two input matrices A and B and produces an output matrix C, C should not be the same as A or B. This is because (i) if C is the same as A, for example, some elements of C may be computed and overwritten (into A) and the same elements of A read later, which would cause the results to be wrong; and (ii) in Fortran, there are what are often called "anti-aliasing" rules that say that changes to the contents of an argument may be made only through that argument and not through some other variable that occupies or points to the same memory area. Calls with aliased arguments may work sometimes and fail at other times. To be safe, no actual output argument should be the same as any actual input argument.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2018 17:03:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153461#M27346</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-11-05T17:03:45Z</dc:date>
    </item>
    <item>
      <title>Quote:mecej4 wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153462#M27347</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;mecej4 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, when you call a matrix routine that takes two input matrices A and B and produces an output matrix C, C should not be the same as A or B. This is because (i) if C is the same as A, for example, some elements of C may be computed and overwritten (into A) and the same elements of A read later, which would cause the results to be wrong; and (ii) in Fortran, there are what are often called "anti-aliasing" rules that say that changes to the contents of an argument may be made only through that argument and not through some other variable that occupies or points to the same memory area. Calls with aliased arguments may work sometimes and fail at other times. To be safe, no actual output argument should be the same as any actual input argument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You mean that I should open up other spaces to save the output matrix C instead of saving in the same type`s space? Am I right?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 00:35:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153462#M27347</guid>
      <dc:creator>wen_qiang_z_</dc:creator>
      <dc:date>2018-11-06T00:35:35Z</dc:date>
    </item>
    <item>
      <title>Exactly. If you wish, after</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153463#M27348</link>
      <description>&lt;P&gt;Exactly. If you wish, after the matrix multiplication is finished, copy the result from that "space" back into matrix C.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 01:53:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153463#M27348</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-11-06T01:53:26Z</dc:date>
    </item>
    <item>
      <title>Quote:mecej4 wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153464#M27349</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;mecej4 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exactly. If you wish, after the matrix multiplication is finished, copy the result from that "space" back into matrix C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi, I`ve tried what you said, it didn`t work. It looks like that the CSR matrix A created before the multiplication has some problem in saving its components but the stat information shows that the creation procedure is correct. So thanks for your advice but I still confused&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 06:26:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153464#M27349</guid>
      <dc:creator>wen_qiang_z_</dc:creator>
      <dc:date>2018-11-06T06:26:36Z</dc:date>
    </item>
    <item>
      <title>Please post a small but</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153465#M27350</link>
      <description>&lt;P&gt;Please post a small but complete code example that demonstrates what you said "didn't work", and describe how you compiled, linked and ran the example. State your compiler and MKL versions.&lt;/P&gt;&lt;P&gt;You have not shown the declarations of the variables in your code extracts, but I believe that&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt; info = mkl_sparse_spmm(sparse_operation_non_transpose,local(i)%Kcr%A,local(i)%Krc%B,local(i)%Kcr%B)&lt;/PRE&gt;

&lt;P&gt;should actually have been&lt;/P&gt;

&lt;PRE class="brush:cpp; class-name:dark;"&gt; info = mkl_sparse_spmm(sparse_operation_non_transpose,local(i)%Kcr%A,local(i)%Krc%B,&amp;amp;(local(i)%Kcr%C))&lt;/PRE&gt;

&lt;P&gt;In other words, the last argument should actually be the address to receive a newly created matrix handle, not an existing matrix handle.&lt;/P&gt;
&lt;P&gt;If you have not done so already, please look at the example sparse_spmm.c that is provided with MKL in the .../examples/spblasc directory.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 08:45:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153465#M27350</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-11-06T08:45:00Z</dc:date>
    </item>
    <item>
      <title>Quote:mecej4 wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153466#M27351</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;mecej4 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please post a small but complete code example that demonstrates what you said "didn't work", and describe how you compiled, linked and ran the example. State your compiler and MKL versions.&lt;/P&gt;&lt;P&gt;You have not shown the declarations of the variables in your code extracts, but I believe that&lt;/P&gt;
&lt;PRE&gt; info = mkl_sparse_spmm(sparse_operation_non_transpose,local(i)%Kcr%A,local(i)%Krc%B,local(i)%Kcr%B)&lt;/PRE&gt;

&lt;P&gt;should actually have been&lt;/P&gt;

&lt;PRE&gt; info = mkl_sparse_spmm(sparse_operation_non_transpose,local(i)%Kcr%A,local(i)%Krc%B,&amp;amp;(local(i)%Kcr%C))&lt;/PRE&gt;

&lt;P&gt;In other words, the last argument should actually be the address to receive a newly created matrix handle, not an existing matrix handle.&lt;/P&gt;
&lt;P&gt;If you have not done so already, please look at the example sparse_spmm.c that is provided with MKL in the .../examples/spblasc directory.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thx a lot! And I`ve figured out why this error occurred, thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 11:31:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-Puzzled-about-mkl-sparse-spmm/m-p/1153466#M27351</guid>
      <dc:creator>wen_qiang_z_</dc:creator>
      <dc:date>2018-11-06T11:31:12Z</dc:date>
    </item>
  </channel>
</rss>

