<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 19.09.2012 13:17, Jed Brown wrote:<br>
    </div>
    <blockquote
cite="mid:CAM9tzSmxnLxr51=WkwCsQAchFCmd07=bukStseRzYoi_gm5YLw@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">On Wed, Sep 19, 2012 at 2:52 AM,
        Alexander Grayver <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:agrayver@gfz-potsdam.de" target="_blank">agrayver@gfz-potsdam.de</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000">Is MatSolve in any way
            more efficient than KSPSolve? <br>
            As far as I understand for both cases one ends up with a
            loop over RHS, <br>
            but KSPSolve allows to use iterative solvers (I don't need
            them at the moment though).<br>
            I would then use latter option and do this loop myself.</div>
        </blockquote>
        <div><br>
        </div>
        <div>The loop over KSPSolve configured with -ksp_type preonly
          -pc_type lu will do the same thing as MatMatSolve_Basic. If
          you think you might want to use iterative methods, this is
          definitely the way to go. Adding support for block Krylov
          methods (that inherently handle multiple right hand sides) is
          something we've been discussing for a while and will
          eventually happen, but I can't promise a time.</div>
      </div>
    </blockquote>
    <br>
    Jed,<br>
    <br>
    I will stick to that option then and implement that loop myself. <br>
    Thanks.<br>
    <br>
    <blockquote
cite="mid:CAM9tzSmxnLxr51=WkwCsQAchFCmd07=bukStseRzYoi_gm5YLw@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div> </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000"> That is right. The
            request on that has recently appeared in the mumps mailing
            list and they replied there are no plans to develop it. <br>
            I have usually < 10^3 and this is not a bottleneck, so
            I'm fine with a "inefficient" loop over RHS. <br>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>How large are the vectors? It's easy for a small number of
          right hand sides to overflow memory on rank 0.</div>
      </div>
    </blockquote>
    <br>
    On the order of 10^6 so far. <br>
    I guess memory has never been a problem because internally PETSc
    used MatMatSolve_Basic for MatMatSolve with MUMPS. Thus you never
    gather more than one rhs. <br>
     
    <blockquote
cite="mid:CAM9tzSmxnLxr51=WkwCsQAchFCmd07=bukStseRzYoi_gm5YLw@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000"> <br>
            But, for those who are chasing performance and have many
            sprase RHS (e.g., this is the case when one needs to solve
            many adjoint problems with delta function as a RHS) I can
            say that using MUMPS' multiple RHS mode is a way more
            efficient than solving them in a loop. This is probably
            related to some internals where MUMPS is able to take
            advantage of getting many RHS at once.</div>
        </blockquote>
      </div>
      <div><br>
      </div>
      <div>There are significant efficiencies to handling many RHS at
        once, but even if the right hand sides are sparse, the solutions
        are dense. The savings from doing special things for the sparse
        RHS are thus only incremental.</div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Regards,
Alexander</pre>
  </body>
</html>