<?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 another question: I observed in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136232#M26021</link>
    <description>another question: I observed some strange behavior from the sparse_matrix_t handle.
here is what I did:
I exported the pointers to the internal structure via mkl_sparse_?_export_csr and changed some values.
To check if the changes were successful I exported the internal data again. The values seem to have changed.

But when I call mkl_sparse_?_mv afterwards the old values are used.
I have to create a new handle right before the call to mkl_sparse_?_mv so that the new values are used.
I couldn't find any detailed information on sparse_matrix_t handles, I've searched the C-reference manual and the user guide. I can also provide some code if necessary.</description>
    <pubDate>Mon, 01 Oct 2018 23:57:35 GMT</pubDate>
    <dc:creator>Robert_E_</dc:creator>
    <dc:date>2018-10-01T23:57:35Z</dc:date>
    <item>
      <title>operate on diagonal of a sparse matrix in csr format</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136230#M26019</link>
      <description>hi,

I want to efficiently operate only on the diagonal of a large non-singular sparse_status_t matrix (in csr format).

More precisely, if 'A' is my matrix then I want to do:

A - alpha*I

where 'alpha' is a positive scalar and 'I' is the Identity.
I could create the matrix alpha*I and do a sparse matrix - sparse matrix - multiplication, but that would take too much space and time. Is there a better way to do this?

best regards, Franz</description>
      <pubDate>Thu, 27 Sep 2018 18:35:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136230#M26019</guid>
      <dc:creator>Robert_E_</dc:creator>
      <dc:date>2018-09-27T18:35:36Z</dc:date>
    </item>
    <item>
      <title>First of all, the CSR</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136231#M26020</link>
      <description>&lt;P&gt;First of all, the CSR representation of A is a compact representation, and may have only a few or no diagonal elements at all. Therefore, if you wish to modify the diagonal, you must already have a full diagonal, possibly many or all elements of which are filled with zero values.&lt;/P&gt;

&lt;P&gt;If you wish to do the diagonal update repeatedly, it would be efficient to pre-compute and store a separate array, say, ID(1:N), containing the column indices of the diagonal elements -- the subset of JA corresponding to the diagonal.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 21:38:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136231#M26020</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-09-27T21:38:00Z</dc:date>
    </item>
    <item>
      <title>another question: I observed</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136232#M26021</link>
      <description>another question: I observed some strange behavior from the sparse_matrix_t handle.
here is what I did:
I exported the pointers to the internal structure via mkl_sparse_?_export_csr and changed some values.
To check if the changes were successful I exported the internal data again. The values seem to have changed.

But when I call mkl_sparse_?_mv afterwards the old values are used.
I have to create a new handle right before the call to mkl_sparse_?_mv so that the new values are used.
I couldn't find any detailed information on sparse_matrix_t handles, I've searched the C-reference manual and the user guide. I can also provide some code if necessary.</description>
      <pubDate>Mon, 01 Oct 2018 23:57:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136232#M26021</guid>
      <dc:creator>Robert_E_</dc:creator>
      <dc:date>2018-10-01T23:57:35Z</dc:date>
    </item>
    <item>
      <title>Hi Franz,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136233#M26022</link>
      <description>&lt;P&gt;Hi Franz,&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;It is an expected behavior in your case.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;IE SpBLAS perform a lot of different optimizations on a user's data. However, the data itself will not be changed during calls (one exception here is mkl_sparse_order routine).&lt;BR /&gt;
	mkl_sparse_?_export_csr allows one to export the initial pointers or to get CSR representation of resulting matrix (e.g. after mkl_sparse_spmm).&lt;BR /&gt;
	If you need to change several values in the handle you can use mkl_sparse_?_set_value routine. Please, refer to&amp;nbsp;https://software.intel.com/en-us/mkl-developer-reference-c-mkl-sparse-set-value&lt;/P&gt;

&lt;P&gt;Hope, this will help!&lt;BR /&gt;
	Best regards,&lt;BR /&gt;
	Maria&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 00:27:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136233#M26022</guid>
      <dc:creator>MariaZh</dc:creator>
      <dc:date>2018-10-02T00:27:50Z</dc:date>
    </item>
    <item>
      <title>Hi Maria,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136234#M26023</link>
      <description>Hi Maria,

Thanks for the advice. I tried the set_value routine but that didn't change anything. The problem was that my tiny 9x9 test-matrix had too many non-zero entries (only 2-3 zeros). So I guess the mkl library is expecting the matrix to be sparse independent of its size. Using a sparser matrix resolved the issue even without incorporating the set_value routine.

Kind regards,
Franz</description>
      <pubDate>Tue, 02 Oct 2018 08:11:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/operate-on-diagonal-of-a-sparse-matrix-in-csr-format/m-p/1136234#M26023</guid>
      <dc:creator>Robert_E_</dc:creator>
      <dc:date>2018-10-02T08:11:04Z</dc:date>
    </item>
  </channel>
</rss>

