<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 12, 2020 at 12:56 PM Qin Lu via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><div dir="ltr">Hello,</div><div dir="ltr"><br></div><div 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 dir="ltr"><br></div><div 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><br></div><div>No. Direct solvers are about O(N^2) complexity and iteratives solvers can be O(N) - O(N^inf)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><div 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><br></div><div>sparse.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><div 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><br></div><div>PETSc's is only in serial and CPU. MUMPS and SuperLU are MPI parallel. SuperLU runs on GPUs.</div><div><br></div><div>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> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><div dir="ltr"><br></div><div dir="ltr">Thanks in advance for your help.</div><div dir="ltr"><br></div><div dir="ltr">Best Regards,</div><div dir="ltr">Qin</div></div></div></blockquote></div></div>