<?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 Re: Getting the status as SPARSE_STATUS_NOT_INITIALIZED when trying to export after spmm in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1426371#M33808</link>
    <description>&lt;P&gt;Team, am able to run the code successfully. However only rows and cols are updated through output handle. Rest are not updated with address. The highlighted variables in red are not populated correctly.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;var c = new mkllib.SparseMatrix();&lt;BR /&gt;var ____arg1 = c.__Instance;&lt;BR /&gt;var outputhandle = new System.IntPtr(&amp;amp;____arg1);&lt;BR /&gt;//var retval = NativeMethods.mkl_sparse_sp2m(NativeMethods.SPARSE_OPERATION.SPARSE_OPERATION_NON_TRANSPOSE, descA, this.sparseHandle, NativeMethods.SPARSE_OPERATION.SPARSE_OPERATION_NON_TRANSPOSE, descB, right.sparseHandle, NativeMethods.SPARSE_MATRIX_REQUEST.SPARSE_STAGE_FULL_MULT, out output.sparseHandle);&lt;BR /&gt;var retval = NativeMethods.mkl_sparse_spmm(NativeMethods.SPARSE_OPERATION.SPARSE_OPERATION_NON_TRANSPOSE, this.sparseHandle, right.sparseHandle, out outputhandle);&lt;/P&gt;
&lt;P&gt;if (retval != NativeMethods.SPARSE_STATUS.SPARSE_STATUS_SUCCESS)&lt;BR /&gt;{&lt;BR /&gt;throw new Exception($"Failed to multiply MKL spblas sparse matrix handle: {retval}");&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;try &lt;BR /&gt;{&lt;BR /&gt;mkllib.SparseStatusT retval1;&lt;BR /&gt;IntelMKL.ILP64.SparseIndexBaseT index = new IntelMKL.ILP64.SparseIndexBaseT();&lt;BR /&gt;IntelMKL.ILP64.SparseIndexBaseT* idx = &amp;amp;index;&lt;BR /&gt;int rows, cols;&lt;BR /&gt;int* row_starts, row_ends, Col_Indices;&lt;BR /&gt;float* values;&lt;BR /&gt;retval1 = IntelMKL.ILP64.SpBlas.__Internal.MklSparseSExportCsr(outputhandle, idx, &amp;amp;rows, &amp;amp;cols, &amp;amp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;row_starts, &amp;amp;row_ends, &amp;amp;Col_Indices, &amp;amp;values);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Console.WriteLine(row_starts[22]);&lt;BR /&gt;Console.WriteLine(values[12]);&lt;BR /&gt;Console.WriteLine(Col_Indices[21]);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;finally&lt;BR /&gt;{ }&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2022 09:23:57 GMT</pubDate>
    <dc:creator>AmmuMadhu</dc:creator>
    <dc:date>2022-10-31T09:23:57Z</dc:date>
    <item>
      <title>Getting the status as SPARSE_STATUS_NOT_INITIALIZED when trying to export after spmm</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1425989#M33804</link>
      <description>&lt;P&gt;Dear Team,&lt;/P&gt;
&lt;P&gt;I am using&amp;nbsp;2022.2.1 version mkl_rt.2.dll to perform a sparse matrix multiplication followed by export of sparse handle to store the results in variables via C#.&lt;/P&gt;
&lt;P&gt;My matrix is 9157 x 9157 csr matrix. I am trying to multiply with itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sparse SPMM definition (in NativeMethods.cs):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt; [DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;internal static extern SPARSE_STATUS mkl_sparse_spmm(SPARSE_OPERATION transA, IntPtr A, IntPtr B, out IntPtr C);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Invocation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var retval = NativeMethods.mkl_sparse_spmm(NativeMethods.SPARSE_OPERATION.SPARSE_OPERATION_NON_TRANSPOSE, this.sparseHandle, right.sparseHandle, out IntPtr outsparsehandle);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This operation is successful and also during debugging i am able to see that&amp;nbsp;outsparsehandle is updated with new value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;However, when I try to export from handle, i am getting Not Initialized error.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Definition:&lt;/P&gt;
&lt;P&gt;[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]&lt;BR /&gt;internal static extern SPARSE_STATUS mkl_sparse_s_export_csr(IntPtr C, SPARSE_INDEX idx, int rows, int cols, int[] rows_start, int[] rows_end, int[] col_indx, float[] values);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Invocation:&lt;/P&gt;
&lt;P&gt;retval = NativeMethods.mkl_sparse_s_export_csr(output.sparseHandle, index, row_cnt, col_cnt, rowstarts, rowends, columnindices, values);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly help me in identifying where I am going wrong. Your help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 18:36:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1425989#M33804</guid>
      <dc:creator>AmmuMadhu</dc:creator>
      <dc:date>2022-10-28T18:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the status as SPARSE_STATUS_NOT_INITIALIZED when trying to export after spmm</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1426371#M33808</link>
      <description>&lt;P&gt;Team, am able to run the code successfully. However only rows and cols are updated through output handle. Rest are not updated with address. The highlighted variables in red are not populated correctly.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;var c = new mkllib.SparseMatrix();&lt;BR /&gt;var ____arg1 = c.__Instance;&lt;BR /&gt;var outputhandle = new System.IntPtr(&amp;amp;____arg1);&lt;BR /&gt;//var retval = NativeMethods.mkl_sparse_sp2m(NativeMethods.SPARSE_OPERATION.SPARSE_OPERATION_NON_TRANSPOSE, descA, this.sparseHandle, NativeMethods.SPARSE_OPERATION.SPARSE_OPERATION_NON_TRANSPOSE, descB, right.sparseHandle, NativeMethods.SPARSE_MATRIX_REQUEST.SPARSE_STAGE_FULL_MULT, out output.sparseHandle);&lt;BR /&gt;var retval = NativeMethods.mkl_sparse_spmm(NativeMethods.SPARSE_OPERATION.SPARSE_OPERATION_NON_TRANSPOSE, this.sparseHandle, right.sparseHandle, out outputhandle);&lt;/P&gt;
&lt;P&gt;if (retval != NativeMethods.SPARSE_STATUS.SPARSE_STATUS_SUCCESS)&lt;BR /&gt;{&lt;BR /&gt;throw new Exception($"Failed to multiply MKL spblas sparse matrix handle: {retval}");&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;try &lt;BR /&gt;{&lt;BR /&gt;mkllib.SparseStatusT retval1;&lt;BR /&gt;IntelMKL.ILP64.SparseIndexBaseT index = new IntelMKL.ILP64.SparseIndexBaseT();&lt;BR /&gt;IntelMKL.ILP64.SparseIndexBaseT* idx = &amp;amp;index;&lt;BR /&gt;int rows, cols;&lt;BR /&gt;int* row_starts, row_ends, Col_Indices;&lt;BR /&gt;float* values;&lt;BR /&gt;retval1 = IntelMKL.ILP64.SpBlas.__Internal.MklSparseSExportCsr(outputhandle, idx, &amp;amp;rows, &amp;amp;cols, &amp;amp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;row_starts, &amp;amp;row_ends, &amp;amp;Col_Indices, &amp;amp;values);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Console.WriteLine(row_starts[22]);&lt;BR /&gt;Console.WriteLine(values[12]);&lt;BR /&gt;Console.WriteLine(Col_Indices[21]);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;finally&lt;BR /&gt;{ }&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 09:23:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1426371#M33808</guid>
      <dc:creator>AmmuMadhu</dc:creator>
      <dc:date>2022-10-31T09:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the status as SPARSE_STATUS_NOT_INITIALIZED when trying to export after spmm</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1426372#M33809</link>
      <description>&lt;P&gt;Your prompt help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 09:24:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1426372#M33809</guid>
      <dc:creator>AmmuMadhu</dc:creator>
      <dc:date>2022-10-31T09:24:54Z</dc:date>
    </item>
    <item>
      <title>Re:Getting the status as SPARSE_STATUS_NOT_INITIALIZED when trying to export after spmm</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1426413#M33811</link>
      <description>&lt;P&gt;Hi Madhusudhanan,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting on Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We would like to request you share a sample reproducer/project file and steps(if any) so that we could investigate your issue and help you assist with that.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2022 12:16:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1426413#M33811</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-10-31T12:16:23Z</dc:date>
    </item>
    <item>
      <title>Re:Getting the status as SPARSE_STATUS_NOT_INITIALIZED when trying to export after spmm</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1428337#M33831</link>
      <description>&lt;P&gt;Hi Madhusudhan,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;A gentle reminder:&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please get back to us with the earlier-mentioned details so that we could look into your issue further?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Nov 2022 04:00:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1428337#M33831</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-11-08T04:00:45Z</dc:date>
    </item>
    <item>
      <title>Re:Getting the status as SPARSE_STATUS_NOT_INITIALIZED when trying to export after spmm</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1429994#M33865</link>
      <description>&lt;P&gt;Hi Madhusudhan,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Nov 2022 16:55:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-the-status-as-SPARSE-STATUS-NOT-INITIALIZED-when-trying/m-p/1429994#M33865</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-11-14T16:55:48Z</dc:date>
    </item>
  </channel>
</rss>

