<?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 Ahmadi, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144901#M26625</link>
    <description>&lt;P&gt;Hi Ahmadi,&lt;/P&gt;

&lt;P&gt;Thank you for the post. We will investigate the problem and get back to you later. Could you pleas also submit the issue to &lt;A href="https://supporttickets.intel.com/?lang=en-US​" target="_blank"&gt;https://supporttickets.intel.com/?lang=en-US​&lt;/A&gt;, where we can track the details, like compiler/mkl version , bug etc.&lt;BR /&gt;
	Thanks&lt;/P&gt;

&lt;P&gt;​Ying&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2018 03:10:55 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2018-02-26T03:10:55Z</dc:date>
    <item>
      <title>Error in mkl_sparse_z_set_value</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144900#M26624</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am struggling to change a single value of a matrix in internal Intel Sparse BLAS format using the mkl_sparse_z_set_value function. Most of the time&amp;nbsp; this function returns a value of 3. However, it does work some times! I have checked the status of memory allocation and also mkl_sparse_z_create_csr and there is no problem with them. Any idea why this issue is happening? Here is the code:&lt;/P&gt;

&lt;P&gt;// Matrix size is Mat_Size x Mat_Size&lt;BR /&gt;
	// This matrix is going to be a diagonal matrix so the maximum number of non-zeros will be equal to Mat_Size&lt;/P&gt;

&lt;P&gt;int Mat_Size = 10;&lt;/P&gt;

&lt;P&gt;sparse_matrix_t&amp;nbsp; Ysh_CSR = NULL;&lt;BR /&gt;
	MKL_Complex16 *Ysh_val = NULL;&lt;BR /&gt;
	MKL_INT *Ysh_col = NULL;&lt;BR /&gt;
	MKL_INT *Ysh_row = NULL;&lt;/P&gt;

&lt;P&gt;Ysh_val = (MKL_Complex16 *)mkl_malloc(Mat_Size * sizeof(MKL_Complex16), 64);&lt;BR /&gt;
	Ysh_col = (MKL_INT *)mkl_malloc(Mat_Size * sizeof(MKL_INT), 64);&lt;BR /&gt;
	Ysh_row = (MKL_INT *)mkl_malloc((Mat_Size + 1) * sizeof(MKL_INT), 64); // +1 is because we are using 3-aaray variation&lt;/P&gt;

&lt;P&gt;mkl_sparse_z_create_csr(&amp;amp;Ysh_CSR, SPARSE_INDEX_BASE_ZERO, Mat_Size, Mat_Size, Ysh_row, Ysh_row + 1, Ysh_col, Ysh_val);&lt;/P&gt;

&lt;P&gt;MKL_Complex16 temp;&lt;BR /&gt;
	temp.real = 2 ;&lt;BR /&gt;
	temp.imag = 3 ;&lt;/P&gt;

&lt;P&gt;int info = mkl_sparse_z_set_value(Ysh_CSR, 1, 1, temp); // set the value of Ysh_CSR[1][1] to temp&lt;/P&gt;

&lt;P&gt;printf("info is %i", info);&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2018 23:44:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144900#M26624</guid>
      <dc:creator>Ahmadi__Afshin</dc:creator>
      <dc:date>2018-02-25T23:44:02Z</dc:date>
    </item>
    <item>
      <title>Hi Ahmadi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144901#M26625</link>
      <description>&lt;P&gt;Hi Ahmadi,&lt;/P&gt;

&lt;P&gt;Thank you for the post. We will investigate the problem and get back to you later. Could you pleas also submit the issue to &lt;A href="https://supporttickets.intel.com/?lang=en-US​" target="_blank"&gt;https://supporttickets.intel.com/?lang=en-US​&lt;/A&gt;, where we can track the details, like compiler/mkl version , bug etc.&lt;BR /&gt;
	Thanks&lt;/P&gt;

&lt;P&gt;​Ying&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 03:10:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144901#M26625</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-02-26T03:10:55Z</dc:date>
    </item>
    <item>
      <title>Quote:Ying H. (Intel) wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144902#M26626</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 Ahmadi,&lt;/P&gt;

&lt;P&gt;Thank you for the post. We will investigate the problem and get back to you later. Could you pleas also submit the issue to &lt;A href="https://supporttickets.intel.com/?lang=en-US"&gt;https://supporttickets.intel.com/?lang=en-US&lt;/A&gt;​, where we can track the details, like compiler/mkl version , bug etc.&lt;BR /&gt;
	Thanks&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;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Dear Ying,&lt;/P&gt;

&lt;P&gt;Were you able to investigate the problem?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 23:24:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144902#M26626</guid>
      <dc:creator>Ahmadi__Afshin</dc:creator>
      <dc:date>2018-02-28T23:24:41Z</dc:date>
    </item>
    <item>
      <title>Hi Ahmadi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144903#M26627</link>
      <description>&lt;P&gt;Hi Ahmadi,&lt;BR /&gt;
	​Yes, we can reproduce the problem. So did you&amp;nbsp;create a ticket&amp;nbsp; in &lt;A href="https://supporttickets.intel.com/?lang=en-US"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://supporttickets.intel.com/?lang=en-US" target="_blank"&gt;https://supporttickets.intel.com/?lang=en-US&lt;/A&gt; ? please let me know the ticket number.&lt;BR /&gt;
	Best Regards,&lt;BR /&gt;
	​Ying&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 00:44:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144903#M26627</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-03-01T00:44:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Ying H. (Intel) wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144904#M26628</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 Ahmadi,&lt;BR /&gt;
	​Yes, we can reproduce the problem. So did you&amp;nbsp;create a ticket&amp;nbsp; in &lt;A href="https://supporttickets.intel.com/?lang=en-US"&gt;https://supporttickets.intel.com/?lang=en-US&lt;/A&gt; ? please let me know the ticket number.&lt;BR /&gt;
	Best Regards,&lt;BR /&gt;
	​Ying&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 Ying,&lt;/P&gt;

&lt;P&gt;The ticket number is &lt;SPAN class="value"&gt;03319553. How long do you think it is going to take to fix the issue?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Best,&lt;/P&gt;

&lt;P&gt;Afshin&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 02:34:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144904#M26628</guid>
      <dc:creator>Ahmadi__Afshin</dc:creator>
      <dc:date>2018-03-01T02:34:38Z</dc:date>
    </item>
    <item>
      <title>Hi  Afshin,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144905#M26629</link>
      <description>&lt;P&gt;Hi &amp;nbsp;Afshin,&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#2f4f4f" face="Consolas" size="2"&gt;&lt;FONT color="#2f4f4f" face="Consolas" size="2"&gt;&lt;FONT color="#2f4f4f" face="Consolas" size="2"&gt;Please refer to the reply from the 03319553. It seems you are creating a&amp;nbsp;csr handle, but&amp;nbsp;with invalid matrix value.&amp;nbsp;If&amp;nbsp;there are&amp;nbsp;exact value for the &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;Ysh_row, , Ysh_col, Ysh_val, then&amp;nbsp;your code will work.&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#2f4f4f" face="Consolas" size="2"&gt;&lt;FONT color="#2f4f4f" face="Consolas" size="2"&gt;&lt;FONT color="#2f4f4f" face="Consolas" size="2"&gt;SPARSE_STATUS_INVALID_VALUE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = 3, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;/* invalid input value */&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;Best Regards&lt;BR /&gt;
	&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;Ying &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 05:55:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144905#M26629</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-03-01T05:55:57Z</dc:date>
    </item>
    <item>
      <title>Quote:Ying H. (Intel) wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144906#M26630</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 &amp;nbsp;Afshin,&lt;/P&gt;

&lt;P&gt;Please refer to the reply from the 03319553. It seems you are creating a&amp;nbsp;csr handle, but&amp;nbsp;with invalid matrix value.&amp;nbsp;If&amp;nbsp;there are&amp;nbsp;exact value for the Ysh_row, , Ysh_col, Ysh_val, then&amp;nbsp;your code will work.&lt;/P&gt;

&lt;P&gt;SPARSE_STATUS_INVALID_VALUE = 3, /* invalid input value */&lt;/P&gt;

&lt;P&gt;Best Regards&lt;BR /&gt;
	Ying&lt;BR /&gt;
	&amp;nbsp;&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;Hi Yin,&lt;/P&gt;

&lt;P&gt;My code is actually fine and there is not problem with creating the CSR handle. Ysh_$ are just empty arrays with the right memory size to keep the future sparse matrix information. However, what is wrong is that the mkl_sparse_z_set_value function can only be used after the CSR handle has been filled with values (e.g., after converting the dense matrix to sparse and storing the results in the CSR handle). I believe the language of MKL manual is vague in explaining this function. I also think Intel should include a similar function to retrieve an element from the sparse function. For example, if you add two sparse matrices together and you want to read diagonal elements of the resulting function, there is no function for that.&lt;/P&gt;

&lt;P&gt;Anyway, I really appreciate your help in this matter.&lt;/P&gt;

&lt;P&gt;Best,&lt;/P&gt;

&lt;P&gt;Afshin&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 19:48:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144906#M26630</guid>
      <dc:creator>Ahmadi__Afshin</dc:creator>
      <dc:date>2018-03-01T19:48:10Z</dc:date>
    </item>
    <item>
      <title>Hello Afshin,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144907#M26631</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;Afshin,&lt;BR /&gt;
	&lt;BR /&gt;
	You're right, &lt;EM&gt;mkl_sparse_?_create_csr&lt;/EM&gt; is supposed to be used only if one allocated and initialized all&lt;EM&gt; rows_start(_end)/col_indx&lt;/EM&gt; and values arrays. On the basis of this information CSR handle will be created and can be used with all IE SpBLAS functionality.&lt;BR /&gt;
	&lt;EM&gt;mkl_sparse_?_set_value&lt;/EM&gt; routine can only change one of the existing values from matrix to another (please, refer to &lt;/SPAN&gt;&lt;A href="https://software.intel.com/en-us/mkl-developer-reference-c-mkl-sparse-set-value)" target="_blank"&gt;https://software.intel.com/en-us/mkl-developer-reference-c-mkl-sparse-set-value)&lt;/A&gt;&lt;SPAN style="font-size: 12px;"&gt;. That explains why there was an error related to invalid input when passing non-initialized arrays to &lt;EM&gt;mkl_sparse_?_create_csr&lt;/EM&gt; and then to &lt;EM&gt;mkl_sparse_?_set_value&lt;/EM&gt; routines.&lt;BR /&gt;
	In order to retrieve an element from the resulting matrix you can use &lt;EM&gt;mkl_sparse_?_export_csr&lt;/EM&gt;, however it's currently not supported to export only the part of the matrix from CSR Handle.&lt;BR /&gt;
	&lt;BR /&gt;
	Hope this was helpful!&lt;BR /&gt;
	&lt;BR /&gt;
	Best regards,&lt;BR /&gt;
	Maria&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 21:20:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-in-mkl-sparse-z-set-value/m-p/1144907#M26631</guid>
      <dc:creator>MariaZh</dc:creator>
      <dc:date>2018-03-01T21:20:12Z</dc:date>
    </item>
  </channel>
</rss>

