<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></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=""> </div><div class=""> For dense matrices PETSc uses the LAPACK solver which does fine at those sizes.</div><div class=""><br class=""></div><div class=""> Barry</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 12, 2020, at 12:33 PM, Qin Lu via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div class="ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"></div><div class="ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">
</div><div class="ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;" dir="ltr" data-setdir="false">Thanks Matthew and Mark!</div><div class="ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;" dir="ltr" data-setdir="false"><br class=""></div><div class="ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;" dir="ltr" data-setdir="false">Qin</div><div class="ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br class=""></div><div class="ydpa597b1fyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">
</div><div class="ydp2721000fyahoo_quoted" id="ydp2721000fyahoo_quoted_2752982844">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;" class="">
<div class="">
On Friday, June 12, 2020, 12:22:08 PM CDT, Mark Adams <<a href="mailto:mfadams@lbl.gov" class="">mfadams@lbl.gov</a>> wrote:
</div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
<div class=""><div id="ydp2721000fyiv1984912742" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br clear="none" class=""></div><br clear="none" class=""><div class="ydp2721000fyiv1984912742gmail_quote"><div class="ydp2721000fyiv1984912742gmail_attr" dir="ltr">On Fri, Jun 12, 2020 at 12:56 PM Qin Lu via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank" rel="nofollow" shape="rect" class="">petsc-users@mcs.anl.gov</a>> wrote:<br clear="none" class=""></div><blockquote class="ydp2721000fyiv1984912742gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class=""><div style="font-family:Helvetica, Arial, sans-serif;font-size:13px;" class=""><div dir="ltr" class="">Hello,</div><div dir="ltr" class=""><br clear="none" class=""></div><div dir="ltr" class="">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 dir="ltr" class=""><br clear="none" class=""></div><div dir="ltr" class="">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=""><br clear="none" class=""></div><div class="">No. Direct solvers are about O(N^2) complexity and iteratives solvers can be O(N) - O(N^inf)</div><div class=""> </div><blockquote class="ydp2721000fyiv1984912742gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class=""><div style="font-family:Helvetica, Arial, sans-serif;font-size:13px;" class=""><div dir="ltr" class="">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=""><br clear="none" class=""></div><div class="">sparse.</div><div class=""> </div><blockquote class="ydp2721000fyiv1984912742gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class=""><div style="font-family:Helvetica, Arial, sans-serif;font-size:13px;" class=""><div dir="ltr" class="">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=""><br clear="none" class=""></div><div class="">PETSc's is only in serial and CPU. MUMPS and SuperLU are MPI parallel. SuperLU runs on GPUs.</div><div class=""><br clear="none" class=""></div><div class="">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="ydp2721000fyiv1984912742yqt6122559558" id="ydp2721000fyiv1984912742yqtfd76872"><div class=""> </div><blockquote class="ydp2721000fyiv1984912742gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class=""><div style="font-family:Helvetica, Arial, sans-serif;font-size:13px;" class=""><div dir="ltr" class=""><br clear="none" class=""></div><div dir="ltr" class="">Thanks in advance for your help.</div><div dir="ltr" class=""><br clear="none" class=""></div><div dir="ltr" class="">Best Regards,</div><div dir="ltr" class="">Qin</div></div></div></blockquote></div></div></div></div></div></div>
</div>
</div></div></div></blockquote></div><br class=""></div></body></html>