<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body>
Thanks Barry!<div><br></div><div>Qin<br><br><p class="yahoo-quoted-begin" style="font-size: 15px; color: #715FFA; padding-top: 15px; margin-top: 0">On Friday, June 12, 2020, 6:18 PM, Barry Smith <bsmith@petsc.dev> wrote:</p><blockquote class="iosymail"><div id="yiv4031773661"><div><div class="yiv4031773661"><br clear="none" class="yiv4031773661"></div>  For the problem sizes you describe with sparse matrices the PETSc built in one is competitive with the external solvers, sometimes faster, it is not worth using the external solvers for such small problems. The external solvers have much more elaborate implements of sparse factorizations and solve but those elaborations are for getting higher performance on large problems.<div class="yiv4031773661"> </div><div class="yiv4031773661">   For dense matrices PETSc uses the LAPACK solver which does fine at those sizes.</div><div class="yiv4031773661"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661">   Barry</div><div class="yiv4031773661yqt3329416106" id="yiv4031773661yqt93498"><div class="yiv4031773661"><br clear="none" class="yiv4031773661"><div><br clear="none" class="yiv4031773661"><blockquote class="yiv4031773661" type="cite"><div class="yiv4031773661">On Jun 12, 2020, at 12:33 PM, Qin Lu via petsc-users <<a rel="nofollow" shape="rect" class="yiv4031773661" ymailto="mailto:petsc-users@mcs.anl.gov" target="_blank" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:</div><br clear="none" class="yiv4031773661Apple-interchange-newline"><div class="yiv4031773661"><div class="yiv4031773661"><div class="yiv4031773661ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"></div><div class="yiv4031773661ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">
        </div><div class="yiv4031773661ydpa597b1fyahoo-style-wrap" dir="ltr" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">Thanks Matthew and Mark!</div><div class="yiv4031773661ydpa597b1fyahoo-style-wrap" dir="ltr" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661ydpa597b1fyahoo-style-wrap" dir="ltr" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">Qin</div><div class="yiv4031773661ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">
        
        </div><div class="yiv4031773661ydp2721000fyahoo_quoted" id="yiv4031773661ydp2721000fyahoo_quoted_2752982844">
            <div class="yiv4031773661" style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div class="yiv4031773661">
                    On Friday, June 12, 2020, 12:22:08 PM CDT, Mark Adams <<a rel="nofollow" shape="rect" class="yiv4031773661" ymailto="mailto:mfadams@lbl.gov" target="_blank" href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:
                </div>
                <div class="yiv4031773661"><br clear="none" class="yiv4031773661"></div>
                <div class="yiv4031773661"><br clear="none" class="yiv4031773661"></div>
                <div class="yiv4031773661"><div class="yiv4031773661" id="yiv4031773661ydp2721000fyiv1984912742"><div class="yiv4031773661"><div class="yiv4031773661" dir="ltr"><div class="yiv4031773661" dir="ltr"><br clear="none" class="yiv4031773661"></div><br clear="none" class="yiv4031773661"><div class="yiv4031773661ydp2721000fyiv1984912742gmail_quote"><div class="yiv4031773661ydp2721000fyiv1984912742gmail_attr" dir="ltr">On Fri, Jun 12, 2020 at 12:56 PM Qin Lu via petsc-users <<a rel="nofollow" shape="rect" class="yiv4031773661" ymailto="mailto:petsc-users@mcs.anl.gov" target="_blank" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br clear="none" class="yiv4031773661"></div><blockquote class="yiv4031773661ydp2721000fyiv1984912742gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class="yiv4031773661"><div class="yiv4031773661" style="font-family:Helvetica, Arial, sans-serif;font-size:13px;"><div class="yiv4031773661" dir="ltr">Hello,</div><div class="yiv4031773661" dir="ltr"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661" dir="ltr">I plan to solve a small sparse linear equation system using the direct solver, since the number of unknowns is small (less than 1000). Here I got a few questions:</div><div class="yiv4031773661" dir="ltr"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661" dir="ltr">1. Is there a general guide line on the size of the system that direct solver is more efficient than iterative solver?</div></div></div></blockquote><div class="yiv4031773661"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661">No. Direct solvers are about O(N^2) complexity and iteratives solvers can be O(N) - O(N^inf)</div><div class="yiv4031773661"> </div><blockquote class="yiv4031773661ydp2721000fyiv1984912742gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class="yiv4031773661"><div class="yiv4031773661" style="font-family:Helvetica, Arial, sans-serif;font-size:13px;"><div class="yiv4031773661" dir="ltr">2. Is the native Petsc direct solver (using KSPPREONLY and PCLU) designed to solve dense system or sparse system?</div></div></div></blockquote><div class="yiv4031773661"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661">sparse.</div><div class="yiv4031773661"> </div><blockquote class="yiv4031773661ydp2721000fyiv1984912742gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class="yiv4031773661"><div class="yiv4031773661" style="font-family:Helvetica, Arial, sans-serif;font-size:13px;"><div class="yiv4031773661" dir="ltr">3. Is the native Petsc direct solver comparable to SuperLU and MUMPS in performance? Do they use different algorithms?</div></div></div></blockquote><div class="yiv4031773661"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661">PETSc's is only in serial and CPU. MUMPS and SuperLU are MPI parallel. SuperLU runs on GPUs.</div><div class="yiv4031773661"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661">SuperLU and MUMPS have more optimizations, such that there is probably a significant difference on some problems but it's hard to say in general. </div><div class="yiv4031773661ydp2721000fyiv1984912742yqt6122559558" id="yiv4031773661ydp2721000fyiv1984912742yqtfd76872"><div class="yiv4031773661"> </div><blockquote class="yiv4031773661ydp2721000fyiv1984912742gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class="yiv4031773661"><div class="yiv4031773661" style="font-family:Helvetica, Arial, sans-serif;font-size:13px;"><div class="yiv4031773661" dir="ltr"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661" dir="ltr">Thanks in advance for your help.</div><div class="yiv4031773661" dir="ltr"><br clear="none" class="yiv4031773661"></div><div class="yiv4031773661" dir="ltr">Best Regards,</div><div class="yiv4031773661" dir="ltr">Qin</div></div></div></blockquote></div></div></div></div></div></div>
            </div>
        </div></div></div></blockquote></div><br clear="none" class="yiv4031773661"></div></div></div></div><blockquote></blockquote></blockquote></div>
</body></html>