<?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: CSR 2 CSC Conversion not successful in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CSR-2-CSC-Conversion-not-successful/m-p/855981#M6997</link>
    <description>&lt;BR /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:WordDocument&gt; &lt;w:View&gt;Normal&lt;/w:View&gt; &lt;w:Zoom&gt;0&lt;/w:Zoom&gt; &lt;w:PunctuationKerning /&gt; &lt;w:ValidateAgainstSchemas /&gt; &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt; &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt; &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt; &lt;w:Compatibility&gt; &lt;w:BreakWrappedTables /&gt; &lt;w:SnapToGridInCell /&gt; &lt;w:WrapTextWithPunct /&gt; &lt;w:UseAsianBreakRules /&gt; &lt;w:DontGrowAutofit /&gt; &lt;/w:Compatibility&gt; &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt; &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:LatentStyles DefLockedState="false" LatentStyleCount="156"&gt; &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt; &lt;!--[if gte mso 10]&gt; &lt;mce:style&gt;&lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} --&gt; &lt;!--[endif]--&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;Hi Cem,&lt;BR /&gt; please try to use&lt;BR /&gt; int job_csc[6] = {0,0,0,0,0, &lt;STRONG&gt;1&lt;/STRONG&gt; };&lt;BR /&gt; &lt;EM&gt;&lt;BR /&gt; According to the description of&lt;/EM&gt; mkl_dcsrcsc&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;For conversion to the CSC format:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;If job(6)=0, all output arrays acsc, ja1, and ia1 are filled in for the output storage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;If job(6)0, only arrays ja1, ia1 are filled in for the output storage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;--Gennady&lt;/SPAN&gt;&lt;/P&gt;
&lt;BR /&gt;</description>
    <pubDate>Wed, 15 Jul 2009 06:35:42 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2009-07-15T06:35:42Z</dc:date>
    <item>
      <title>CSR 2 CSC Conversion not successful</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CSR-2-CSC-Conversion-not-successful/m-p/855980#M6996</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt; I am quite a newbie in using the Sparse BLAS and I am trying to convert a sparse matrix in &lt;B&gt;csr&lt;/B&gt; in to the &lt;B&gt;csc&lt;/B&gt; format. The dns 2 csr conversion works. This is my code for the conversion:&lt;BR /&gt;
&lt;PRE&gt;[cpp] 
&lt;PRE name="code" class="cpp:showcolumns"&gt;&lt;BR /&gt;
double* A         = (double*) malloc( sizeof(double) *  m * n );&lt;BR /&gt;
// A is filled with data. see below ...&lt;BR /&gt;
double* Acsr      = (double*) malloc( sizeof(double) *  m_s * n_s );&lt;BR /&gt;
double* Acsc     = (double*) malloc( sizeof(double) *  m_s * n_s ); &lt;BR /&gt;
int* columns_csr  = (int*) malloc( sizeof(int) * m_s * n_s);&lt;BR /&gt;
int* rowIndex_csr = (int*) malloc( sizeof(int) * m + 1 );  &lt;BR /&gt;
int* rows_csc     = (int*) malloc( sizeof(int) * m_s * n_s);&lt;BR /&gt;
int* rowIndex_csc = (int*) malloc( sizeof(int) * m + 1 );&lt;BR /&gt;
int job_csr[6] = {0, 0, 0, 2, m_s * n_s, 3}; &lt;BR /&gt;
mkl_ddnscsr( job_csr, &amp;amp;m, &amp;amp;n, A, &amp;amp;m, Acsr, columns_csr, rowIndex_csr, &amp;amp;info ); &lt;BR /&gt;
int job_csc[6] = {0, 0, 0, 0, 0, 0};&lt;BR /&gt;
mkl_dcsrcsc(job_csc, &amp;amp;m,Acsr, columns_csr, rowIndex_csr, Acsc, rows_csc, rowIndex_csc, &amp;amp;info);&lt;BR /&gt;
&lt;BR /&gt;[/cpp]&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
This is the output of the conversion operations:&lt;BR /&gt;A: &lt;BR /&gt;+0.8401877 +0.3943829 +0.0000000 +0.0000000 &lt;BR /&gt;+0.7830992 +0.7984400 +0.0000000 +0.0000000 &lt;BR /&gt;+0.0000000 +0.0000000 +0.0000000 +0.0000000 &lt;BR /&gt;+0.0000000 +0.0000000 +0.0000000 +0.0000000 &lt;BR /&gt;&lt;BR /&gt;Acsr :&lt;BR /&gt;+0.8401877 +0.3943829 +0.7830992 +0.7984400 &lt;BR /&gt;columns : &lt;BR /&gt;0 1 0 1 &lt;BR /&gt;rowIndex&lt;BR /&gt;0 2 4 4 4 &lt;BR /&gt;&lt;BR /&gt;Acsc:&lt;BR /&gt;+0.0000000 +0.0000000 +0.0000000 +0.0000000&lt;BR /&gt;rows:&lt;BR /&gt;0 1 0 1&lt;BR /&gt;rowIndex:&lt;BR /&gt;0 2 4 2 2 &lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Cem&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Jul 2009 14:47:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CSR-2-CSC-Conversion-not-successful/m-p/855980#M6996</guid>
      <dc:creator>sicb0161</dc:creator>
      <dc:date>2009-07-14T14:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: CSR 2 CSC Conversion not successful</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CSR-2-CSC-Conversion-not-successful/m-p/855981#M6997</link>
      <description>&lt;BR /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:WordDocument&gt; &lt;w:View&gt;Normal&lt;/w:View&gt; &lt;w:Zoom&gt;0&lt;/w:Zoom&gt; &lt;w:PunctuationKerning /&gt; &lt;w:ValidateAgainstSchemas /&gt; &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt; &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt; &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt; &lt;w:Compatibility&gt; &lt;w:BreakWrappedTables /&gt; &lt;w:SnapToGridInCell /&gt; &lt;w:WrapTextWithPunct /&gt; &lt;w:UseAsianBreakRules /&gt; &lt;w:DontGrowAutofit /&gt; &lt;/w:Compatibility&gt; &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt; &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:LatentStyles DefLockedState="false" LatentStyleCount="156"&gt; &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt; &lt;!--[if gte mso 10]&gt; &lt;mce:style&gt;&lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} --&gt; &lt;!--[endif]--&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;Hi Cem,&lt;BR /&gt; please try to use&lt;BR /&gt; int job_csc[6] = {0,0,0,0,0, &lt;STRONG&gt;1&lt;/STRONG&gt; };&lt;BR /&gt; &lt;EM&gt;&lt;BR /&gt; According to the description of&lt;/EM&gt; mkl_dcsrcsc&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;For conversion to the CSC format:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;If job(6)=0, all output arrays acsc, ja1, and ia1 are filled in for the output storage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;If job(6)0, only arrays ja1, ia1 are filled in for the output storage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;--Gennady&lt;/SPAN&gt;&lt;/P&gt;
&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jul 2009 06:35:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CSR-2-CSC-Conversion-not-successful/m-p/855981#M6997</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2009-07-15T06:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: CSR 2 CSC Conversion not successful</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CSR-2-CSC-Conversion-not-successful/m-p/855982#M6998</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/334681"&gt;Gennady Fedorov (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:WordDocument&gt; &lt;w:View&gt;Normal&lt;/w:View&gt; &lt;w:Zoom&gt;0&lt;/w:Zoom&gt; &lt;w:PunctuationKerning /&gt; &lt;w:ValidateAgainstSchemas /&gt; &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt; &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt; &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt; &lt;w:Compatibility&gt; &lt;w:BreakWrappedTables /&gt; &lt;w:SnapToGridInCell /&gt; &lt;w:WrapTextWithPunct /&gt; &lt;w:UseAsianBreakRules /&gt; &lt;w:DontGrowAutofit /&gt; &lt;/w:Compatibility&gt; &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt; &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:LatentStyles DefLockedState="false" LatentStyleCount="156"&gt; &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt; &lt;!--[if gte mso 10]&gt; &lt;mce:style&gt;&lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} --&gt; &lt;!--[endif]--&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;Hi Cem,&lt;BR /&gt; please try to use&lt;BR /&gt; int job_csc[6] = {0,0,0,0,0, &lt;STRONG&gt;1&lt;/STRONG&gt; };&lt;BR /&gt; &lt;EM&gt;&lt;BR /&gt; According to the description of&lt;/EM&gt; mkl_dcsrcsc&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;For conversion to the CSC format:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;If job(6)=0, all output arrays acsc, ja1, and ia1 are filled in for the output storage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;If job(6)0, only arrays ja1, ia1 are filled in for the output storage.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: " microsoft="" sans="" serif=""&gt;--Gennady&lt;/SPAN&gt;&lt;/P&gt;
&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Okay that works,&lt;BR /&gt;But having the matrix A :&lt;BR /&gt;0   2   0   4&lt;BR /&gt;0   6   0   8&lt;BR /&gt;0 10   0 12&lt;BR /&gt;0 14   0 16&lt;BR /&gt;0 18   0 20&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;m&lt;/STRONG&gt; = 5;&lt;BR /&gt;&lt;STRONG&gt;n&lt;/STRONG&gt; = 4;&lt;BR /&gt;&lt;STRONG&gt;k&lt;/STRONG&gt; = 10&lt;BR /&gt;&lt;BR /&gt;but still I have problems with the conversion: If&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[cpp]int job_csr[6] = {0, 0, 0, 2, k, 3};&lt;BR /&gt;mkl_ddnscsr( job_csr, &amp;amp;m, &amp;amp;n, A, &amp;amp;m, Acsr, columns_csr, rowIndex_csr, &amp;amp;info );&lt;BR /&gt;int job_csc[6] = {0, 0, 0, 0, 0, 1};&lt;BR /&gt;mkl_dcsrcsc(job_csc, &amp;amp;m, Acsr, columns_csr, rowIndex_csr, Acsc, rows_csc, rowIndex_csc, &amp;amp;info);[/cpp]&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;then the output is :&lt;BR /&gt;Acsr :&lt;BR /&gt;2 4 6 8 12 14 16 18 0 1&lt;BR /&gt;columns:&lt;BR /&gt;1 3 0 2 1 3 0 2 0 1&lt;BR /&gt;rowIndex:&lt;BR /&gt;0 2 4 6 8 0&lt;BR /&gt;&lt;BR /&gt;Acsc:&lt;BR /&gt;6 16 2 12 8 18 4 14 0 0&lt;BR /&gt;colums:&lt;BR /&gt;1 3 0 2 1 3 0 2 0 0&lt;BR /&gt;rowIndex:&lt;BR /&gt;0 2 4 6 8 6&lt;BR /&gt;&lt;BR /&gt;Something is wrong cause the last element of rowIndex is 0, yet it must be the number of elements + 1 according to the documentation. Also, some elements in Acsr and Acsc are 0 which does not make sense.&lt;BR /&gt;If change the order of m and n:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[cpp]mkl_ddnscsr( job_csr, &amp;amp;n, &amp;amp;m, A, &amp;amp;m, Acsr, columns_csr, rowIndex_csr, &amp;amp;info );[/cpp]&lt;/PRE&gt;
&lt;BR /&gt;I get the following output:&lt;BR /&gt;Acsr:&lt;BR /&gt;2 4 6 8 10 12 14 16 18 20&lt;BR /&gt;Columns :&lt;BR /&gt;1 3 0 2 4 1 3 0 2 4&lt;BR /&gt;Indexrows:&lt;BR /&gt;0 2 5 7 10 0&lt;BR /&gt;&lt;BR /&gt;Acsc:&lt;BR /&gt;6 16 2 12 8 18 4 14 10 20&lt;BR /&gt;Rows:&lt;BR /&gt;1 3 0 2 1 3 0 2 1 3&lt;BR /&gt;Indexrows:&lt;BR /&gt;0 2 4 6 8 10&lt;BR /&gt;&lt;BR /&gt;This output seems to be more promising, however I doubt the correctness of this solution as I had to change the property of the matrix (m,n) in order to get this output and still indexrows of acsr is not correct.&lt;BR /&gt;&lt;BR /&gt;What did I do wrong ?&lt;BR /&gt;&lt;BR /&gt;Cem&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jul 2009 14:35:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CSR-2-CSC-Conversion-not-successful/m-p/855982#M6998</guid>
      <dc:creator>sicb0161</dc:creator>
      <dc:date>2009-07-15T14:35:25Z</dc:date>
    </item>
  </channel>
</rss>

