<?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 A*c=b problem in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765735#M235</link>
    <description>Hi Alexander!&lt;BR /&gt;&lt;BR /&gt;I tried to solve this matrix with CG and PARDISO, but most of the work was done on CG. I used PARDISO only to check if it passes or not. If you can help me with CG, I would be very glad, but if you think I should work with PARDISO, i will write here a PARDISO sample - it is twice as big.&lt;BR /&gt;&lt;BR /&gt;Thank you for the swift reply!&lt;BR /&gt;</description>
    <pubDate>Mon, 09 Jan 2012 18:34:18 GMT</pubDate>
    <dc:creator>dogval</dc:creator>
    <dc:date>2012-01-09T18:34:18Z</dc:date>
    <item>
      <title>A*c=b problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765731#M231</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I am trying to use MKL and have some problems.&lt;BR /&gt;If sparse matrix has only one diagonal,everything isOK, but if not I can't find a solution.&lt;BR /&gt;&lt;BR /&gt;This sample was tested on Matlab and passed succefully.&lt;BR /&gt;&lt;BR /&gt;Solvers SG andPARDISO&lt;BR /&gt;&lt;BR /&gt;Can you help me please with this problem.&lt;BR /&gt;&lt;BR /&gt;Pavel.</description>
      <pubDate>Sat, 07 Jan 2012 18:53:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765731#M231</guid>
      <dc:creator>dogval</dc:creator>
      <dc:date>2012-01-07T18:53:49Z</dc:date>
    </item>
    <item>
      <title>A*c=b problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765732#M232</link>
      <description>Hi,&lt;DIV&gt;It's seem that your matrix is dense but all non-diagonal elements are equal to zero. So it's not clear how you translate it CSR format: as diagonal matrix or as dense with many zero elements. Could your provide example that you used to check correctness of PARDISO on this matrix?&lt;/DIV&gt;&lt;DIV&gt;With best regards,&lt;/DIV&gt;&lt;DIV&gt;Alexander Kalinkin&lt;/DIV&gt;</description>
      <pubDate>Sun, 08 Jan 2012 04:41:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765732#M232</guid>
      <dc:creator>Alexander_K_Intel2</dc:creator>
      <dc:date>2012-01-08T04:41:16Z</dc:date>
    </item>
    <item>
      <title>A*c=b problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765733#M233</link>
      <description>&lt;P&gt;vector&lt;INT&gt; iaV;&lt;BR /&gt;vector&lt;INT&gt; jaV;&lt;BR /&gt;vector&lt;DOUBLE&gt; aV;&lt;BR /&gt;&lt;BR /&gt;iaV.push_back(1);&lt;BR /&gt;&lt;BR /&gt;for( int y = 0; y &amp;lt; fileA.Rows(); y++ )&lt;BR /&gt;{&lt;BR /&gt;int numValues = 0;&lt;BR /&gt;bool isData = false;&lt;BR /&gt;for( int x = 0; x &amp;lt; fileA.Cols(); x++ )&lt;BR /&gt;{&lt;BR /&gt;double value = fileA.Get( y, x );&lt;/DOUBLE&gt;&lt;/INT&gt;&lt;/INT&gt;&lt;/P&gt;&lt;P&gt;if( value != 0 )&lt;BR /&gt;{&lt;BR /&gt;numValues++;&lt;BR /&gt;jaV.push_back( x + 1 );&lt;BR /&gt;aV.push_back( value );&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if( numValues != 0 )&lt;BR /&gt;{&lt;BR /&gt;iaV.push_back( iaV[ iaV.size() - 1 ] + numValues );&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;vector&lt;DOUBLE&gt; rhsV;&lt;/DOUBLE&gt;&lt;/P&gt;&lt;P&gt;for( int y = 0; y &amp;lt; fileB.Rows(); y++ )&lt;BR /&gt;{&lt;BR /&gt;double value = fileB.Get( y, 0 );&lt;BR /&gt;rhsV.push_back( value );&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Solve( fileA.GetNumLines(), iaV, jaV, aV, rhsV );&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;bool Solve( int matrixSize, vector&lt;INT&gt;&amp;amp; iaV, vector&lt;INT&gt;&amp;amp; jaV, vector&lt;DOUBLE&gt;&amp;amp; aV, vector&lt;DOUBLE&gt;&amp;amp; rhsV )&lt;BR /&gt;{&lt;BR /&gt;int n = matrixSize, rci_request, itercount;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/INT&gt;&lt;/INT&gt;&lt;/P&gt;&lt;P&gt;double* rhs = &amp;amp;rhsV[0];&lt;BR /&gt;int* ia = &amp;amp;iaV[0];&lt;BR /&gt;int* ja = &amp;amp;jaV[0];&lt;BR /&gt;double* a = &amp;amp;aV[0];&lt;BR /&gt;&lt;BR /&gt;double* solution = new double[matrixSize];&lt;BR /&gt;int ipar[128];&lt;BR /&gt;double dpar[128];&lt;BR /&gt;double* tmp = new double[4 * matrixSize];&lt;BR /&gt;char tr = 'u';&lt;/P&gt;&lt;P&gt;for( int i = 0; i &amp;lt; n; i++ )&lt;BR /&gt;solution&lt;I&gt; = 1;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;dcg_init( &amp;amp;n, solution, rhs, &amp;amp;rci_request, ipar, dpar, tmp );&lt;BR /&gt;if( rci_request != 0 )&lt;BR /&gt;return false;&lt;/P&gt;&lt;P&gt;ipar[8] = 1;&lt;BR /&gt;ipar[9] = 0;&lt;BR /&gt;dpar[0] = 1.E-5;&lt;/P&gt;&lt;P&gt;dcg_check( &amp;amp;n, solution, rhs, &amp;amp;rci_request, ipar, dpar, tmp );&lt;/P&gt;&lt;P&gt;if (rci_request != 0)&lt;BR /&gt;return false;&lt;/P&gt;&lt;P&gt;while(true)&lt;BR /&gt;{&lt;BR /&gt;dcg( &amp;amp;n, solution, rhs, &amp;amp;rci_request, ipar, dpar, tmp );&lt;/P&gt;&lt;P&gt;if (rci_request == 0)&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;if(rci_request == 1)&lt;BR /&gt;{&lt;BR /&gt;mkl_dcsrsymv( &amp;amp;tr, &amp;amp;n, a, ia, ja, tmp, &amp;amp;tmp&lt;N&gt; );&lt;BR /&gt;continue;&lt;BR /&gt;}&lt;/N&gt;&lt;/P&gt;&lt;P&gt;return false;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;dcg_get( &amp;amp;n, solution, rhs, &amp;amp;rci_request, ipar, dpar, tmp, &amp;amp;itercount );&lt;/P&gt;&lt;P&gt;MKL_FreeBuffers();&lt;/P&gt;&lt;P&gt;return true;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2012 19:30:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765733#M233</guid>
      <dc:creator>dogval</dc:creator>
      <dc:date>2012-01-08T19:30:48Z</dc:date>
    </item>
    <item>
      <title>A*c=b problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765734#M234</link>
      <description>Hi,&lt;DIV&gt;In topic below you wrote about problem with PARDISO but as I can see this example use CG routines from MKL. So problem appeared when you use CG or PARDISO?&lt;/DIV&gt;&lt;DIV&gt;With best regards,&lt;/DIV&gt;&lt;DIV&gt;Alexander Kalinkin&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Jan 2012 11:28:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765734#M234</guid>
      <dc:creator>Alexander_K_Intel2</dc:creator>
      <dc:date>2012-01-09T11:28:55Z</dc:date>
    </item>
    <item>
      <title>A*c=b problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765735#M235</link>
      <description>Hi Alexander!&lt;BR /&gt;&lt;BR /&gt;I tried to solve this matrix with CG and PARDISO, but most of the work was done on CG. I used PARDISO only to check if it passes or not. If you can help me with CG, I would be very glad, but if you think I should work with PARDISO, i will write here a PARDISO sample - it is twice as big.&lt;BR /&gt;&lt;BR /&gt;Thank you for the swift reply!&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Jan 2012 18:34:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765735#M235</guid>
      <dc:creator>dogval</dc:creator>
      <dc:date>2012-01-09T18:34:18Z</dc:date>
    </item>
    <item>
      <title>A*c=b problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765736#M236</link>
      <description>Hi,&lt;DIV&gt;I've try to reproduce your problem. You forgot to describe some classes, for example, could you describe fileA &amp;amp; fileB ?&lt;/DIV&gt;&lt;DIV&gt;With best regards,&lt;/DIV&gt;&lt;DIV&gt;Alexander Kalinkin&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;./source/test.c(20): error: identifier "fileA" is undefined for( int y = 0; y &amp;lt; fileA.Rows(); y++ )&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;           ^&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;./source/test.c(44): error: identifier "fileB" is undefined for( int y = 0; y &amp;lt; fileB.Rows(); y++ )&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;           ^&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;./source/test.c(50): error: identifier "fileA" is undefined Solve( fileA.GetNumLines(), iaV, jaV, aV, rhsV );&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Jan 2012 07:59:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765736#M236</guid>
      <dc:creator>Alexander_K_Intel2</dc:creator>
      <dc:date>2012-01-12T07:59:47Z</dc:date>
    </item>
    <item>
      <title>A*c=b problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765737#M237</link>
      <description>You can usejust 2 arrays.&lt;BR /&gt;One double [][] fileA = {...}&lt;BR /&gt;and second double [] fileB = {...}&lt;BR /&gt;&lt;BR /&gt;Pls help !!!!&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jan 2012 17:17:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765737#M237</guid>
      <dc:creator>dogval</dc:creator>
      <dc:date>2012-01-19T17:17:15Z</dc:date>
    </item>
    <item>
      <title>A*c=b problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765738#M238</link>
      <description>Hi Dogval, &lt;BR /&gt;&lt;BR /&gt;As withoutyour definition of the fileA, file B class, I haven'ttried to the exact code. &lt;BR /&gt;&lt;BR /&gt;But according to your discription :&lt;BR /&gt;"If sparse matrix has only one diagonal,everything isOK, but if not I can't find a solution " &lt;BR /&gt;andread the input sparse matrix,&lt;BR /&gt;I thought, your problem should be in the CSR format of the matA, which issymmetric positive definite system and read by as full CSR format in your code, right? &lt;BR /&gt;&lt;BR /&gt;But the function mkl_dcsrsymv() actually ask the upper or lower trianglein CSR format. &lt;BR /&gt;&lt;P&gt;Please see MKL manuals. &lt;BR /&gt;The &lt;SPAN class="option"&gt;mkl_?csrsymv&lt;/SPAN&gt; routine performs a matrix-vector operation defined as &lt;CODE class="code"&gt;&lt;SPAN style="font-family: Courier New;"&gt;&lt;VAR&gt;y&lt;/VAR&gt; := &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New;"&gt;&lt;VAR&gt;A&lt;/VAR&gt;*&lt;/SPAN&gt;&lt;VAR&gt;&lt;SPAN style="font-family: Courier New;"&gt;x&lt;/SPAN&gt;&lt;/VAR&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;where: &lt;/P&gt;&lt;P&gt;&lt;VAR&gt;x&lt;/VAR&gt; and &lt;VAR&gt;y&lt;/VAR&gt; are vectors, &lt;/P&gt;&lt;P&gt;&lt;VAR&gt;A&lt;/VAR&gt; is an upper or lower triangle of the symmetrical sparse matrix in the CSR format (3-array variation).&lt;/P&gt;So you may need to change the way of read matA, &lt;BR /&gt;for example, upper triangle format, &lt;BR /&gt;&lt;BR /&gt;for( int y = 0; y &amp;lt; fileA.Rows(); y++ )&lt;BR /&gt;{&lt;BR /&gt; int numValues = 0;&lt;BR /&gt; bool isData = false;&lt;BR /&gt; for( int x = &lt;STRONG&gt;y&lt;/STRONG&gt;; x &amp;lt; fileA.Cols(); x++ )&lt;BR /&gt;&lt;BR /&gt;BestRegards,&lt;BR /&gt;Ying</description>
      <pubDate>Fri, 03 Feb 2012 07:16:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-c-b-problem/m-p/765738#M238</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2012-02-03T07:16:13Z</dc:date>
    </item>
  </channel>
</rss>

