<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 19, 2018 at 5:19 AM, TAY wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="m_4970404346621557354moz-cite-prefix">On 17/3/2018 1:15 AM, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Fri, Mar 16, 2018 at 12:54 PM, TAY
            wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
              <div bgcolor="#FFFFFF"> <br>
                <div class="m_4970404346621557354gmail-m_-1748057115269175174moz-cite-prefix">On
                  15/3/2018 6:21 PM, Matthew Knepley wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_extra">
                      <div class="gmail_quote">On Thu, Mar 15, 2018 at
                        3:51 PM, TAY wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
                          <br>
                          I'm running a CFD code which solves the
                          momentum and Poisson eqns.<br>
                          <br>
                          Due to poor scaling with HYPRE at higher cpu
                          no., I decided to try using PETSc with
                          boomeramg and gamg.<br>
                          <br>
                          I tested for some small cases and it work
                          well. However, for the large problem which has
                          poor scaling, it gives an error when I change
                          my Poisson solver from pure HYPRE to PETSc
                          with boomeramg and gamg.<br>
                          <br>
                          The error is :<br>
                          <br>
                          Caught signal number 11 SEGV: Segmentation
                          Violation, probably memory access out of range<br>
                          <br>
                          I tried using:<br>
                          <br>
                          -poisson_ksp_type richardson -poisson_pc_type
                          hypre -poisson_pc_type_hypre boomeramg<br>
                          <br>
                          -poisson_ksp_type gmres -poisson_pc_type hypre
                          -poisson_pc_type_hypre boomeramg<br>
                          <br>
                          -poisson_pc_type gamg
                          -poisson_pc_gamg_agg_nsmooths 1<br>
                          <br>
                          but they all gave similar error.<br>
                          <br>
                          So why is this so? How should I troubleshoot?
                          I am now running a debug ver of PETSc to check
                          the error msg.</blockquote>
                        <div><br>
                        </div>
                        <div>1) For anything like this, we would like to
                          see a stack trace from the debugger or
                          valgrind output.</div>
                        <div><br>
                        </div>
                        <div>2) We do have several Poisson examples.
                          Does it fail for you on those?</div>
                      </div>
                    </div>
                  </div>
                </blockquote>
                Hi,<br>
                <br>
                Can you recommend me some suitable egs? Esp in Fortran?<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Here is 2D Poisson</div>
            <div><br>
            </div>
            <div>  <a href="https://bitbucket.org/petsc/petsc/src/4b6141395f14f0c7d1415a2ff0158eec75a27d63/src/snes/examples/tutorials/ex5f.F90?at=master&fileviewer=file-view-default" target="_blank">https://bitbucket.org/petsc/<wbr>petsc/src/<wbr>4b6141395f14f0c7d1415a2ff0158e<wbr>ec75a27d63/src/snes/examples/<wbr>tutorials/ex5f.F90?at=master&<wbr>fileviewer=file-view-default</a></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 bgcolor="#FFFFFF">
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_extra">
                      <div class="gmail_quote">
                        <div><br>
                        </div>
                        <div>3) You can also try ML, which is the same
                          type of MG as GAMG. (--download-ml).</div>
                        <div><br>
                        </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    I have recompiled PETSc with ML. Is there an example command line
    options which I can use for ML?<br></div></blockquote><div><br></div><div>-pc_type ml</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    Another question is generally speaking, is geometric multigrid (GMG)
    faster than algebraic?<br></div></blockquote><div><br></div><div>No, only for the setup time.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    I tested on a small problem and the time taken varies from 1.15min
    (HYPRE, geometric) to 3.25 (GAMG). BoomerAMG is 1.45min.<br></div></blockquote><div><br></div><div>I am not sure what you are running when you say Hypre geometric.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    Besides HYPRE, is there any other GMG I can use? <br></div></blockquote><div><br></div><div>As I said above, it does not converge any faster and the solve is not faster, its all setup time, so small problems will look faster.</div><div>You should be doing 10-20 iterates. If you are doing more, MG is not working.<br></div><div><br></div><div>If you truly have a structured grid, then use DMDA in PETSc and you can use GMG with</div><div><br></div><div>  -pc_type mg -pc_mg_nlevels <n></div><div><br></div><div>   Matt</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
              <div bgcolor="#FFFFFF">
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_extra">
                      <div class="gmail_quote">
                        <div> </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
                My cluster can't connect to the internet. Where can I
                1st download it?<br>
                <br>
                Similarly, how can I find out the location of the ext
                software by myself?<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>The locations are all in the configure Python modules:</div>
            <div><br>
            </div>
            <div>  <a href="https://bitbucket.org/petsc/petsc/src/4b6141395f14f0c7d1415a2ff0158eec75a27d63/config/BuildSystem/config/packages/ml.py?at=master&fileviewer=file-view-default" target="_blank">https://bitbucket.org/petsc/<wbr>petsc/src/<wbr>4b6141395f14f0c7d1415a2ff0158e<wbr>ec75a27d63/config/BuildSystem/<wbr>config/packages/ml.py?at=<wbr>master&fileviewer=file-view-<wbr>default</a></div>
            <div><br>
            </div>
            <div>  Thanks,</div>
            <div><br>
            </div>
            <div>    Matt</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 bgcolor="#FFFFFF">
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_extra">
                      <div class="gmail_quote">
                        <div>  Thanks,</div>
                        <div><br>
                        </div>
                        <div>     Matt</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"><span class="m_4970404346621557354gmail-m_-1748057115269175174HOEnZb"><font color="#888888"><br>
                              -- <br>
                              Thank you very much.<br>
                              <br>
                              Yours sincerely,<br>
                              <br>
                              ==============================<wbr>==================<br>
                              TAY Wee-Beng (Zheng Weiming) 郑伟明<br>
                              Personal research webpage: <a href="http://tayweebeng.wixsite.com/website" rel="noreferrer" target="_blank">http://tayweebeng.wixsite.com/<wbr>website</a><br>
                              Youtube research showcase: <a href="https://www.youtube.com/channel/UC72ZHtvQNMpNs2uRTSToiLA" rel="noreferrer" target="_blank">https://www.youtube.com/channe<wbr>l/UC72ZHtvQNMpNs2uRTSToiLA</a><br>
                              linkedin: <a href="http://www.linkedin.com/in/tay-weebeng" rel="noreferrer" target="_blank">www.linkedin.com/in/tay-weeben<wbr>g</a><br>
                              ==============================<wbr>==================<br>
                              <br>
                            </font></span></blockquote>
                      </div>
                      <br>
                      <br clear="all"><span class="HOEnZb"><font color="#888888">
                      <span class="m_4970404346621557354gmail-HOEnZb"><font color="#888888">
                          <div><br>
                          </div>
                          -- <br>
                          <div class="m_4970404346621557354gmail-m_-1748057115269175174gmail_signature">
                            <div dir="ltr">
                              <div>
                                <div dir="ltr">
                                  <div>What most experimenters take for
                                    granted before they begin their
                                    experiments is infinitely more
                                    interesting than any results to
                                    which their experiments lead.<br>
                                    -- Norbert Wiener</div>
                                  <div><br>
                                  </div>
                                  <div><a href="http://www.caam.rice.edu/%7Emk51/" target="_blank">https://www.cse.buffalo.edu/~k<wbr>nepley/</a><br>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </font></span></font></span></div><span class="HOEnZb"><font color="#888888">
                  </font></span></div><span class="HOEnZb"><font color="#888888">
                </font></span></blockquote><span class="HOEnZb"><font color="#888888">
                <br>
              </font></span></div><span class="HOEnZb"><font color="#888888">
            </font></span></blockquote><span class="HOEnZb"><font color="#888888">
          </font></span></div><span class="HOEnZb"><font color="#888888">
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div class="m_4970404346621557354gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>What most experimenters take for granted before
                    they begin their experiments is infinitely more
                    interesting than any results to which their
                    experiments lead.<br>
                    -- Norbert Wiener</div>
                  <div><br>
                  </div>
                  <div><a href="http://www.caam.rice.edu/%7Emk51/" target="_blank">https://www.cse.buffalo.edu/~<wbr>knepley/</a><br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </font></span></div>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>