<?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 Questions about iterative sparse solvers in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-about-iterative-sparse-solvers/m-p/1132030#M25685</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to use ISS from MKL for solving linear systems of equations, originating from discretization of partial differential equations used in CFD.&lt;/P&gt;&lt;P&gt;I found out that CG and FGMRES are available, but not everything is clear from the documentation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Threading&lt;/STRONG&gt;: Can ISS be &lt;STRONG&gt;threaded&lt;/STRONG&gt;? I am using Pardiso and it can be made parallel&amp;nbsp;easily.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Preconditioning&lt;/STRONG&gt;: In case of CG, RCI_request might equal&amp;nbsp;3, which indicates to&amp;nbsp;"apply the preconditioner&amp;nbsp;C&amp;nbsp;inverse to&amp;nbsp;tmp(1:n,3)&amp;nbsp;and put the result in&amp;nbsp;tmp(1:n,4)". This is marked an OPTIONAL in the scheme of using the RCI&amp;nbsp;CG Routines, however, it is stated that "Indicates that you MUST&amp;nbsp;apply the preconditioner to&amp;nbsp;tmp(:, 3), put the result in the&amp;nbsp;tmp(:, 4), and return control back to the routine&amp;nbsp;dcg" in the description of dcg. Finally, using preconditioners is not recommended for CG as it generally produces non-symmetric matrices.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;By the way, can Pardiso as a direct solver work also in an iterative "mode", meaning that it would not calculate the solution, but just a user-defined number of iterations?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2019 16:02:09 GMT</pubDate>
    <dc:creator>jirina</dc:creator>
    <dc:date>2019-07-22T16:02:09Z</dc:date>
    <item>
      <title>Questions about iterative sparse solvers</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-about-iterative-sparse-solvers/m-p/1132030#M25685</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to use ISS from MKL for solving linear systems of equations, originating from discretization of partial differential equations used in CFD.&lt;/P&gt;&lt;P&gt;I found out that CG and FGMRES are available, but not everything is clear from the documentation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Threading&lt;/STRONG&gt;: Can ISS be &lt;STRONG&gt;threaded&lt;/STRONG&gt;? I am using Pardiso and it can be made parallel&amp;nbsp;easily.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Preconditioning&lt;/STRONG&gt;: In case of CG, RCI_request might equal&amp;nbsp;3, which indicates to&amp;nbsp;"apply the preconditioner&amp;nbsp;C&amp;nbsp;inverse to&amp;nbsp;tmp(1:n,3)&amp;nbsp;and put the result in&amp;nbsp;tmp(1:n,4)". This is marked an OPTIONAL in the scheme of using the RCI&amp;nbsp;CG Routines, however, it is stated that "Indicates that you MUST&amp;nbsp;apply the preconditioner to&amp;nbsp;tmp(:, 3), put the result in the&amp;nbsp;tmp(:, 4), and return control back to the routine&amp;nbsp;dcg" in the description of dcg. Finally, using preconditioners is not recommended for CG as it generally produces non-symmetric matrices.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;By the way, can Pardiso as a direct solver work also in an iterative "mode", meaning that it would not calculate the solution, but just a user-defined number of iterations?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 16:02:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-about-iterative-sparse-solvers/m-p/1132030#M25685</guid>
      <dc:creator>jirina</dc:creator>
      <dc:date>2019-07-22T16:02:09Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-about-iterative-sparse-solvers/m-p/1132031#M25686</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'll try to answer your questions.&lt;/P&gt;&lt;P&gt;1) When you're using Iterative Sparse Solvers in Intel MKL, they work through RCI which means that the user should supply building blocks for the main operations involved in solving Ax=b iteratively, which are computing the matrix-vector product A*v,&amp;nbsp;computing action of the preconditoner P * v (optional) and also checking the stopping criteria.&lt;/P&gt;&lt;P&gt;You can see an example of doing that in examples/solverc/fgmres_full_funct_c.c, for instance. There, for RCI_request = 1 just mkl_sparse_d_mv is used, for RCI_request=3 a custom preconditoner action is hardcoded. The user is free to choose any method for the computational routines. To know what should be the input and output of the user-provided functions, one can look in the documentation, e.g.&amp;nbsp;https://software.intel.com/en-us/mkl-developer-reference-c-dfgmres for dfgmres. So, &lt;STRONG&gt;the user can provide a parallel routine&lt;/STRONG&gt;&amp;nbsp;to perform&amp;nbsp;each of the RCI_request&amp;nbsp;(in the considered example, mkl_sparse_d_mv in&amp;nbsp;RCI_request = 1 will be parallel if a correct threading is used when linking mkl).&lt;/P&gt;&lt;P&gt;2) As for the preconditioner in CG method (RCI_request=3), parameter &lt;STRONG&gt;ipar[10]&lt;/STRONG&gt; controls whether preconditioner will be used or not, see&amp;nbsp;https://software.intel.com/en-us/mkl-developer-reference-c-cg-interface-description#RCI_ID_COMMONPARAMETERS. If you set ipar[10]=0, then CG will never call RCI_request=3 and thus you don't need ti supply any routine for it.&lt;/P&gt;&lt;P&gt;3) Last, but not least: PARDISO is a direct solver but it supports using preconditioned&amp;nbsp;CGS/CG in the mode when you want to solve multiple systems. Once&amp;nbsp;a matrix is factored, you can use the factorization as a preconditioner when solving next systems (for example, if the matrix changes slightly and you expect that the previous matrix is a good preconditoner), see description of&lt;STRONG&gt; iparm[3]&lt;/STRONG&gt; at &lt;A href="https://software.intel.com/en-us/mkl-developer-reference-c-pardiso-iparm-parameter" target="_blank"&gt;https://software.intel.com/en-us/mkl-developer-reference-c-pardiso-iparm-parameter&lt;/A&gt;. I believe this is not what you need though.&lt;/P&gt;&lt;P&gt;Best,&lt;BR /&gt;Kirill&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2019 20:17:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-about-iterative-sparse-solvers/m-p/1132031#M25686</guid>
      <dc:creator>Kirill_V_Intel</dc:creator>
      <dc:date>2019-07-28T20:17:39Z</dc:date>
    </item>
    <item>
      <title>Thank you for your answers; I</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-about-iterative-sparse-solvers/m-p/1132032#M25687</link>
      <description>&lt;P&gt;Thank you for your answers; I was able to make both CG and FGMRES working well.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 08:29:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Questions-about-iterative-sparse-solvers/m-p/1132032#M25687</guid>
      <dc:creator>jirina</dc:creator>
      <dc:date>2019-08-27T08:29:57Z</dc:date>
    </item>
  </channel>
</rss>

