<?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 mkl_sparse_?_update_values seems not to work in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137024#M26107</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have constructed a sparse matrix in BSR format and try to&amp;nbsp;use the function&amp;nbsp;mkl_sparse_?_update_values to update some values, but it seems that the updated matrix doesn't change the value, dose anybody meet the &amp;nbsp;same problem as me?&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2019 18:51:57 GMT</pubDate>
    <dc:creator>Meng__Xiangyi</dc:creator>
    <dc:date>2019-11-08T18:51:57Z</dc:date>
    <item>
      <title>mkl_sparse_?_update_values seems not to work</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137024#M26107</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have constructed a sparse matrix in BSR format and try to&amp;nbsp;use the function&amp;nbsp;mkl_sparse_?_update_values to update some values, but it seems that the updated matrix doesn't change the value, dose anybody meet the &amp;nbsp;same problem as me?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 18:51:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137024#M26107</guid>
      <dc:creator>Meng__Xiangyi</dc:creator>
      <dc:date>2019-11-08T18:51:57Z</dc:date>
    </item>
    <item>
      <title>This is my test code </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137025#M26108</link>
      <description>&lt;P&gt;This is my test code&amp;nbsp;&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;program main

use mkl_spblas

use iso_c_binding

implicit none

type(SPARSE_MATRIX_T) A, B

type(MATRIX_DESCR) descA

integer :: indexing = SPARSE_INDEX_BASE_ONE

integer :: block_layout = SPARSE_LAYOUT_COLUMN_MAJOR

integer nrows, ncols, block_size, block_size2, nblocks

integer, allocatable :: row_ptr(:), col_indx(:)

real(8), allocatable :: values(:)

type(c_ptr) rows_start_c, rows_end_c, col_indx_c, values_c

integer, pointer :: rows_start_f(:), rows_end_f(:), col_indx_f(:)

real(8), pointer :: values_f(:)

integer stat, i, j

integer :: nvalues = 3, indx(3) = (/3, 5, 6/), indy(3) = (/3, 4, 6/)

real(8) :: values_(3) = (/2.d0, 2.d0, 2.d0/)

nrows = 3

ncols = 3

block_size = 2

block_size2 = block_size * block_size

nblocks = 5

allocate(row_ptr(nrows + 1))

allocate(col_indx(nblocks))

allocate(values(block_size2 * nblocks))

row_ptr = (/ 1, 3, 4, 6 /)

col_indx = (/ 1, 2, 2, 2, 3 /)

values = (/ 1.d0, 2.d0, 0.d0, 1.d0, 6.d0, 8.d0, 7.d0, 2.d0, 1.d0, 5.d0, 4.d0, 1.d0, 4.d0, 0.d0, 3.d0, 0.d0, 7.d0, 0.d0, 2.d0, 0.d0 /)

print *, '---------------------------------------------------'

do i = 1, nrows

print '(1x, a, i2, a)', '-------------block row #', i, '--------------'

do j = row_ptr(i), row_ptr(i + 1) - 1

print '(1x, a, i2)', 'block column #', col_indx(j)

print '(&amp;lt;block_size&amp;gt;f6.2)', transpose(reshape(values((j - 1) * block_size2 + 1 : j * block_size2), (/block_size, block_size/)))

end do

end do

print *, '---------------------------------------------------'

stat = mkl_sparse_d_create_bsr(A, indexing, block_layout, nrows, ncols, block_size, row_ptr, row_ptr(2), col_indx, values)



stat = mkl_sparse_d_update_values(A, nvalues, indx, indy, values_)

stat = mkl_sparse_d_export_bsr(A, indexing, block_layout, nrows, ncols, block_size, rows_start_c, rows_end_c, col_indx_c, values_c)

call c_f_pointer(rows_start_c, rows_start_f, [nrows])

call c_f_pointer(rows_end_c , rows_end_f , [nrows])

call c_f_pointer(col_indx_c , col_indx_f , [rows_end_f(nrows) - 1])

call c_f_pointer(values_c , values_f , [block_size2 * nblocks])

print *, '---------------------------------------------------'

do i = 1, nrows

print '(1x, a, i2, a)', '-------------block row #', i, '--------------'

do j = rows_start_f(i), rows_end_f(i) - 1

print '(1x, a, i2)', 'block column #', col_indx(j)

print '(&amp;lt;block_size&amp;gt;f6.2)', transpose(reshape(values_f((j - 1) * block_size2 + 1 : j * block_size2), (/block_size, block_size/)))

end do

end do

print *, '---------------------------------------------------'

end program main
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and this is the output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---------------------------------------------------&lt;BR /&gt;&amp;nbsp;-------------block row # 1--------------&lt;BR /&gt;&amp;nbsp;block column # 1&lt;BR /&gt;&amp;nbsp; 1.00 &amp;nbsp;0.00&lt;BR /&gt;&amp;nbsp; 2.00 &amp;nbsp;1.00&lt;BR /&gt;&amp;nbsp;block column # 2&lt;BR /&gt;&amp;nbsp; 6.00 &amp;nbsp;7.00&lt;BR /&gt;&amp;nbsp; 8.00 &amp;nbsp;2.00&lt;BR /&gt;&amp;nbsp;-------------block row # 2--------------&lt;BR /&gt;&amp;nbsp;block column # 2&lt;BR /&gt;&amp;nbsp; 1.00 &amp;nbsp;4.00&lt;BR /&gt;&amp;nbsp; 5.00 &amp;nbsp;1.00&lt;BR /&gt;&amp;nbsp;-------------block row # 3--------------&lt;BR /&gt;&amp;nbsp;block column # 2&lt;BR /&gt;&amp;nbsp; 4.00 &amp;nbsp;3.00&lt;BR /&gt;&amp;nbsp; 0.00 &amp;nbsp;0.00&lt;BR /&gt;&amp;nbsp;block column # 3&lt;BR /&gt;&amp;nbsp; 7.00 &amp;nbsp;2.00&lt;BR /&gt;&amp;nbsp; 0.00 &amp;nbsp;0.00&lt;BR /&gt;&amp;nbsp;---------------------------------------------------&lt;BR /&gt;&amp;nbsp;---------------------------------------------------&lt;BR /&gt;&amp;nbsp;-------------block row # 1--------------&lt;BR /&gt;&amp;nbsp;block column # 1&lt;BR /&gt;&amp;nbsp; 1.00 &amp;nbsp;0.00&lt;BR /&gt;&amp;nbsp; 2.00 &amp;nbsp;1.00&lt;BR /&gt;&amp;nbsp;block column # 2&lt;BR /&gt;&amp;nbsp; 6.00 &amp;nbsp;7.00&lt;BR /&gt;&amp;nbsp; 8.00 &amp;nbsp;2.00&lt;BR /&gt;&amp;nbsp;-------------block row # 2--------------&lt;BR /&gt;&amp;nbsp;block column # 2&lt;BR /&gt;&amp;nbsp; 1.00 &amp;nbsp;4.00&lt;BR /&gt;&amp;nbsp; 5.00 &amp;nbsp;1.00&lt;BR /&gt;&amp;nbsp;-------------block row # 3--------------&lt;BR /&gt;&amp;nbsp;block column # 2&lt;BR /&gt;&amp;nbsp; 4.00 &amp;nbsp;3.00&lt;BR /&gt;&amp;nbsp; 0.00 &amp;nbsp;0.00&lt;BR /&gt;&amp;nbsp;block column # 3&lt;BR /&gt;&amp;nbsp; 7.00 &amp;nbsp;2.00&lt;BR /&gt;&amp;nbsp; 0.00 &amp;nbsp;0.00&lt;BR /&gt;&amp;nbsp;---------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 18:55:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137025#M26108</guid>
      <dc:creator>Meng__Xiangyi</dc:creator>
      <dc:date>2019-11-08T18:55:59Z</dc:date>
    </item>
    <item>
      <title>Hi,Can you please check the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137026#M26109</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Can you please check the returned status of the routine and provide a reproducer for your case?&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Maria&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 21:07:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137026#M26109</guid>
      <dc:creator>MariaZh</dc:creator>
      <dc:date>2019-11-08T21:07:04Z</dc:date>
    </item>
    <item>
      <title>Quote:Zhukova, Maria (Intel)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137027#M26110</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Zhukova, Maria (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;BR /&gt;Can you please check the returned status of the routine and provide a reproducer for your case?&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Maria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply, after calling 'stat =&amp;nbsp;mkl_sparse_d_update_values(A, nvalues, indx, indy, values_)', the value of 'stat' is 6, which is associated with&amp;nbsp;SPARSE_STATUS_NOT_SUPPORTED, is there anything wrong with my arguments?&lt;/P&gt;&lt;P&gt;And another question, when I want to update all the values in the matrix, how can I give the arguments? As all the arguments are not declared optional, how can I ignore 'indx' and 'indy' as Reference Developer said?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 21:44:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137027#M26110</guid>
      <dc:creator>Meng__Xiangyi</dc:creator>
      <dc:date>2019-11-08T21:44:49Z</dc:date>
    </item>
    <item>
      <title>Hi,Updating the selected</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137028#M26111</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Updating the selected values of the matrix is not supported currently.&lt;BR /&gt;If you want to update the values of the full matrix, you just need to pass NULL for indx and indy.&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Maria&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 22:26:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-update-values-seems-not-to-work/m-p/1137028#M26111</guid>
      <dc:creator>MariaZh</dc:creator>
      <dc:date>2019-11-08T22:26:57Z</dc:date>
    </item>
  </channel>
</rss>

