<?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: Symmetric Banded Matrix Solver in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909277#M11999</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/436980"&gt;j.stults&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;DIV style="margin:0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;I'd suggest conjugate gradient, it can be very fast, especially with an appropriate preconditioner (which it sounds like you need anyway because of the chemistry). &lt;BR /&gt;&lt;BR /&gt;Here's the convergence of a couple iterative schemes on a 50x50x50 grid for Poisson's equation, the preconditioned conjugate gradient uses symmetric Gauss-Seidel as the preconditioner.&lt;/DIV&gt;
&lt;P style="text-align: center;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.intel.com/skins/images/7B13F55A7CE623EF42E69096FA81A3A1/2021_redesign/images/image_not_found.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;It isn't really an apples-to-apples comparison because each iteration of conjugate gradient requires more work than an SOR iteration, but for most problems it's worth the extra effort.&lt;/P&gt;
&lt;P style="text-align: left;"&gt;The cool thing about conjugate gradient is that you can use the line relaxation solver you already implemented as a preconditioner.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Hi Stults,
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Sorry for using the word &lt;STRONG&gt;symmetric(A terrible mistake). &lt;/STRONG&gt;It does not happen to be symmetric.&lt;/DIV&gt;
&lt;DIV&gt;THE MATRIX structure is like this tridiagonal near the main diagonal and two other diagonals (with lots of 0s in between) and it does not need to be symmetric.&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.intel.com/skins/images/7B13F55A7CE623EF42E69096FA81A3A1/2021_redesign/images/image_not_found.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;I would suppose other family of Krylov methods like MINRES or GMRES or BiCG should work. Of course the only way to know is to try and give a shot but &lt;STRONG&gt;do these methods make use of the sparsity of the matrix (the 5 diagonal nature -The 0s inside the band, since by ADI-  alternating direction Implicit scheme I can actually work with a tridiagonal matrix, by taking the diagonals far away to be known from prev. iteration). &lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Best Regards,&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: normal;"&gt;Inkant&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 27 Jul 2009 11:19:22 GMT</pubDate>
    <dc:creator>inkant</dc:creator>
    <dc:date>2009-07-27T11:19:22Z</dc:date>
    <item>
      <title>UNsymmetric Banded Matrix Solver</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909275#M11997</link>
      <description>&lt;I&gt;Hello everyone, &lt;/I&gt;
&lt;DIV&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;I am working on a 2D CFD (Computational Fluid Dynamics) code. Let me give you a general view of the problem.&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;A general 2D discretization leads to an equation like this:&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;&lt;I&gt;&lt;SPAN style="font-style: normal;"&gt;-a(i-1,j) -a(i+1,j) + a(i,j) -a(i,j-1) -a(i,j+1) = b&lt;/SPAN&gt; (similar to a poisson eqn in 2D). &lt;/I&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;When solved just like this, this equation gives rise to a &lt;/I&gt;&lt;B&gt;&lt;I&gt;Penta-Diagonal&lt;/I&gt;&lt;/B&gt;&lt;I&gt; matrix (a tridiagonal matrix with two more diagonals situated far away from the main diagonal), with large bandwidth. A way to solve this problem is to choose marching direction in either i or j.&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;&lt;I&gt;&lt;SPAN style="font-style: normal;"&gt;-a(i-1,j) -a(i+1,j) + a(i,j) = b +a(i,j-1) +a(i,j+1)&lt;/SPAN&gt; (both RHS a()'s taken from previous iteration, thus known). &lt;/I&gt;&lt;/B&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-weight: bold;"&gt;&lt;I&gt;The above equation is tridiagonal. which can be solved with the speed of LIGHT ! using TDMA.&lt;/I&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;Then same thing is done with the other direction:&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;a(i,j) -a(i,j-1) -a(i,j+1) = b + a(i-1,j) + a(i+1,j)&lt;I&gt; &lt;/I&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;This process is iterative and takes many iterations. The order of complexity is is &lt;B&gt;O(n). The process becomes non-converging when the equation set is stiff. (because of stiff chemistry).&lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;&lt;I&gt;My question to the community is if there are faster solvers on similar matrices? &lt;/I&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;OL&gt;
&lt;LI&gt;&lt;SPAN style="line-height: normal;"&gt;LU factorization in my experience may not be helpful as there is only 1 RHS. (available in MKL)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="line-height: normal;"&gt;I looked at xGByyy implementations in LAPACK, but I am not sure whether they would use this special nature of matrix (sparsity between the last diagonal)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="line-height: normal;"&gt;Can Multigrid method be faster? The order of complexity for that is also O(n). (available in MKL ? no ?)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="line-height: normal;"&gt;How will be Conjugate gradient methods on this type of system ? (also available in MKL)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="line-height: normal;"&gt;I have also viewed &lt;B&gt;CVODE&lt;/B&gt; and &lt;B&gt;DASSL. &lt;/B&gt;But these are large solvers which may take me a long time to figure out how to implement in PDEs.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL&gt;
&lt;/UL&gt;
&lt;DIV&gt;I would deeply appreciate any advice from the community members, since it is a research problem not really an MKL issue.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Best Regards,&lt;/DIV&gt;
&lt;DIV&gt;Inkant.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;I&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 25 Jul 2009 21:49:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909275#M11997</guid>
      <dc:creator>inkant</dc:creator>
      <dc:date>2009-07-25T21:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Symmetric Banded Matrix Solver</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909276#M11998</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/406781"&gt;inkant&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;DIV&gt;&lt;STRONG&gt;&lt;EM&gt;The process becomes non-converging when the equation set is stiff. (because of stiff chemistry).&lt;BR /&gt;...&lt;BR /&gt;How will be Conjugate gradient methods on this type of system ? (also available in MKL)&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;I'd suggest conjugate gradient, it can be very fast, especially with an appropriate preconditioner (which it sounds like you need anyway because of the chemistry). &lt;BR /&gt;&lt;BR /&gt;Here's the convergence of a couple iterative schemes on a 50x50x50 grid for Poisson's equation, the preconditioned conjugate gradient uses symmetric Gauss-Seidel as the preconditioner.&lt;/DIV&gt;
&lt;P style="text-align: center;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.intel.com/skins/images/7B13F55A7CE623EF42E69096FA81A3A1/2021_redesign/images/image_not_found.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;It isn't really an apples-to-apples comparison because each iteration of conjugate gradient requires more work than an SOR iteration, but for most problems it's worth the extra effort.&lt;/P&gt;
&lt;P style="text-align: left;"&gt;The cool thing about conjugate gradient is that you can use the line relaxation solver you already implemented as a preconditioner.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jul 2009 04:29:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909276#M11998</guid>
      <dc:creator>j_stults</dc:creator>
      <dc:date>2009-07-26T04:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Symmetric Banded Matrix Solver</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909277#M11999</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/436980"&gt;j.stults&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;DIV style="margin:0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;I'd suggest conjugate gradient, it can be very fast, especially with an appropriate preconditioner (which it sounds like you need anyway because of the chemistry). &lt;BR /&gt;&lt;BR /&gt;Here's the convergence of a couple iterative schemes on a 50x50x50 grid for Poisson's equation, the preconditioned conjugate gradient uses symmetric Gauss-Seidel as the preconditioner.&lt;/DIV&gt;
&lt;P style="text-align: center;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.intel.com/skins/images/7B13F55A7CE623EF42E69096FA81A3A1/2021_redesign/images/image_not_found.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;It isn't really an apples-to-apples comparison because each iteration of conjugate gradient requires more work than an SOR iteration, but for most problems it's worth the extra effort.&lt;/P&gt;
&lt;P style="text-align: left;"&gt;The cool thing about conjugate gradient is that you can use the line relaxation solver you already implemented as a preconditioner.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Hi Stults,
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Sorry for using the word &lt;STRONG&gt;symmetric(A terrible mistake). &lt;/STRONG&gt;It does not happen to be symmetric.&lt;/DIV&gt;
&lt;DIV&gt;THE MATRIX structure is like this tridiagonal near the main diagonal and two other diagonals (with lots of 0s in between) and it does not need to be symmetric.&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.intel.com/skins/images/7B13F55A7CE623EF42E69096FA81A3A1/2021_redesign/images/image_not_found.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;I would suppose other family of Krylov methods like MINRES or GMRES or BiCG should work. Of course the only way to know is to try and give a shot but &lt;STRONG&gt;do these methods make use of the sparsity of the matrix (the 5 diagonal nature -The 0s inside the band, since by ADI-  alternating direction Implicit scheme I can actually work with a tridiagonal matrix, by taking the diagonals far away to be known from prev. iteration). &lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Best Regards,&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: normal;"&gt;Inkant&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Jul 2009 11:19:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909277#M11999</guid>
      <dc:creator>inkant</dc:creator>
      <dc:date>2009-07-27T11:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: UNsymmetric Banded Matrix Solver</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909278#M12000</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/406781"&gt;inkant&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;DIV&gt;I would suppose other family of Krylov methods like MINRES or GMRES or BiCG should work. Of course the only way to know is to try and give a shot but &lt;STRONG&gt;do these methods make use of the sparsity of the matrix&lt;/STRONG&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Take a look at MKL (docs and examples) FGMRES solver (in Sparse Solvers Chapter). You can exploit the sparsity by using sparse matrix, matrix-vector procedures/tools you have available via, say, Sparse BLAS. The solver is using Reverse Communication (RCI) and that gives you a full control over solution process. Good preconditioner (ILU0, ILUT are already prepared for you in MKL) and you should be fine.&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Jul 2009 00:41:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909278#M12000</guid>
      <dc:creator>ArturGuzik</dc:creator>
      <dc:date>2009-07-28T00:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: UNsymmetric Banded Matrix Solver</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909279#M12001</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
Yes, GMRES seems to be the most popular one for fluid problems if you can afford the memory hit. The Krylov methods just require the action of your operator on a vector, so there's nothing special about having a banded matrix as opposed to any other general sparse matrix (which you'd get with unstructured grids). &lt;BR /&gt;&lt;BR /&gt;Even though plain conjugate gradient isn't guaranteed to converge for unsymmetric matrices, I've had good luck with it for toy problems like Burgers' equation that have unsymmetric Jacobians, YMMV. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Jul 2009 20:30:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/UNsymmetric-Banded-Matrix-Solver/m-p/909279#M12001</guid>
      <dc:creator>j_stults</dc:creator>
      <dc:date>2009-07-30T20:30:00Z</dc:date>
    </item>
  </channel>
</rss>

