<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font face="Ubuntu">1) How do I solve this?<br>
      2) So upgrading to version 3.4 would take care of the shift
      without the need to specify any option?<br>
      <br>
      Michele<br>
      <br>
    </font>
    <div class="moz-cite-prefix">On 05/29/2013 05:17 PM, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAMYG4GnVwcLwVZJnO3chGf7eyqXut9Ofr3nHqsxPau9ATpB4zA@mail.gmail.com"
      type="cite">
      <div dir="ltr">On Wed, May 29, 2013 at 7:22 PM, Michele Rosso <span
          dir="ltr"><<a moz-do-not-send="true"
            href="mailto:mrosso@uci.edu" target="_blank">mrosso@uci.edu</a>></span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF"> <font
                  face="Ubuntu">I attached the complete output.<br>
                  I used 2 processors for this run. I wanted to use only
                  one to have a cleaner output but I could not because
                  of this error:<br>
                </font></div>
            </blockquote>
            <div><br>
            </div>
            <div style="">There are 2 problems here:</div>
            <div style=""><br>
            </div>
            <div style="">  1) GAMG is not accepting options for the
              coarse grid solver</div>
            <div style=""><br>
            </div>
            <div style="">  2) You do not appear to using PETSc 3.4, or
              the shift you are trying to set would be there by default</div>
            <div style=""><br>
            </div>
            <div style="">    Matt</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"><font face="Ubuntu">
                  [0]PCSetData_AGG bs=1 MM=32768<br>
                  [0]PETSC ERROR: --------------------- Error Message
                  ------------------------------------<br>
                  [0]PETSC ERROR: Arguments are incompatible!<br>
                  [0]PETSC ERROR: MatMatMult requires A, mpiaij, to be
                  compatible with B, seqaij!<br>
                  [0]PETSC ERROR:
                  ------------------------------------------------------------------------<br>
                  [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3,
                  Wed Aug 29 11:26:24 CDT 2012<br>
                  [0]PETSC ERROR: See docs/changes/index.html for recent
                  updates.<br>
                  [0]PETSC ERROR: See docs/faq.html for hints about
                  trouble shooting.<br>
                  [0]PETSC ERROR: See docs/index.html for manual pages.<br>
                  [0]PETSC ERROR:
                  ------------------------------------------------------------------------<br>
                  [0]PETSC ERROR: ./hit on a  named nid15343 by Unknown
                  Wed May 29 18:15:24 2013<br>
                  [0]PETSC ERROR: Libraries linked from<br>
                  [0]PETSC ERROR: Configure run at<br>
                  [0]PETSC ERROR: Configure options<br>
                  [0]PETSC ERROR:
                  ------------------------------------------------------------------------<br>
                  [0]PETSC ERROR: MatMatMult() line 8614 in
                  src/mat/interface/matrix.c<br>
                  [0]PETSC ERROR: PCGAMGOptprol_AGG() line 1358 in
                  src/ksp/pc/impls/gamg/agg.c<br>
                  [0]PETSC ERROR: PCSetUp_GAMG() line 673 in
                  src/ksp/pc/impls/gamg/gamg.c<br>
                  [0]PETSC ERROR: PCSetUp() line 832 in
                  src/ksp/pc/interface/precon.c<br>
                  [0]PETSC ERROR: KSPSetUp() line 278 in
                  src/ksp/ksp/interface/itfunc.c<br>
                  hit: gamg.c:568: PCSetUp_GAMG: Assertion
                  `pc->setupcalled' failed.<br>
                  <br>
                </font>
                <div>On 05/29/2013 02:29 PM, Matthew Knepley wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">On Wed, May 29, 2013 at 5:25 PM,
                    Michele Rosso <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:mrosso@uci.edu" target="_blank">mrosso@uci.edu</a>></span>
                    wrote:<br>
                    <div class="gmail_extra">
                      <div class="gmail_quote">
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div text="#000000" bgcolor="#FFFFFF"> <font
                              face="Ubuntu">Hi,<br>
                              <br>
                              I proceeded as Matt suggested. I am
                              running without nullspace (Dirichlet's
                              BCs) with the following options:<br>
                              <br>
                              -pc_type gamg  -pc_mg_cycle_type v 
                              -pc_gamg_agg_nsmooths 1
                              -mg_coarse_sub_pc_factor_shift_type
                              NONZERO -ksp_view -options_left<br>
                              <br>
                              The results are fine and the run finishes.
                              The output of -ksp_view does not say
                              anything about the coarse solver being
                              shifted.<br>
                              In fact the option  </font><font
                              face="Ubuntu"><font face="Ubuntu">-mg_coarse_sub_pc_factor_shift_type

                                NONZERO is not used:<br>
                              </font></font></div>
                        </blockquote>
                        <div><br>
                        </div>
                        <div>Please show us the COMPLETE output.</div>
                        <div><br>
                        </div>
                        <div>  Thanks,</div>
                        <div><br>
                        </div>
                        <div>     Matt</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"><font
                              face="Ubuntu"><font face="Ubuntu"> #PETSc
                                Option Table entries:<br>
                                -ksp_view<br>
                                -mg_coarse_sub_pc_factor_shift_type
                                NONZERO<br>
                                -options_left<br>
                                -pc_gamg_agg_nsmooths 1<br>
                                -pc_mg_cycle_type v<br>
                                -pc_type gamg<br>
                                #End of PETSc Option Table entries<br>
                                There is one unused database option. It
                                is:<br>
                                Option left:
                                name:-mg_coarse_sub_pc_factor_shift_type
                                value: NONZERO<br>
                                <br>
                                Michele<br>
                                <br>
                                <br>
                              </font></font>
                            <div>On 05/24/2013 03:20 PM, Matthew Knepley
                              wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <div dir="ltr">On Fri, May 24, 2013 at
                                5:18 PM, Michele Rosso <span dir="ltr"><<a
                                    moz-do-not-send="true"
                                    href="mailto:mrosso@uci.edu"
                                    target="_blank">mrosso@uci.edu</a>></span>
                                wrote:<br>
                                <div class="gmail_extra">
                                  <div class="gmail_quote">
                                    <blockquote class="gmail_quote"
                                      style="margin:0 0 0
                                      .8ex;border-left:1px #ccc
                                      solid;padding-left:1ex">
                                      <div text="#000000"
                                        bgcolor="#FFFFFF"> <font
                                          face="Ubuntu">Using <br>
                                          <br>
                                          -pc_type gamg
                                          -pc_mg_cycle_type v
                                          -pc_gamg_agg_nsmooths 1
                                          -mg_coarse_sub_pc_factor_shift_type
                                          NONZERO  -option_left
                                          -ksp_view <br>
                                        </font></div>
                                    </blockquote>
                                    <div><br>
                                    </div>
                                    <div>This is what debugging is
                                      about. We are not running your
                                      problem. How could this be
                                      debugged?</div>
                                    <div><br>
                                    </div>
                                    <div>1) Run the problem w/o a null
                                      space so that it finishes</div>
                                    <div><br>
                                    </div>
                                    <div>2) Look at the output for
                                      -ksp_view</div>
                                    <div><br>
                                    </div>
                                    <div>3) Does the coarse solver say
                                      that it is shifted?</div>
                                    <div><br>
                                    </div>
                                    <div>4) Are there options which were
                                      unused?</div>
                                    <div><br>
                                    </div>
                                    <div>   Matt</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"><font
                                          face="Ubuntu"> still produces
                                          the same error:<br>
                                          <br>
                                          [0]PCSetData_AGG bs=1
                                          MM=131072<br>
                                          [0]PETSC ERROR:
                                          --------------------- Error
                                          Message
                                          ------------------------------------<br>
                                          [0]PETSC ERROR: Detected zero
                                          pivot in LU factorization:<br>
                                          see <a moz-do-not-send="true"
href="http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot"
                                            target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot</a>!<br>
                                          [0]PETSC ERROR: Zero pivot row
                                          280 value 6.56964e-17
                                          tolerance 2.22045e-14!<br>
                                          [0]PETSC ERROR:
                                          ------------------------------------------------------------------------<br>
                                          [0]PETSC ERROR: Petsc Release
                                          Version 3.3.0, Patch 3, Wed
                                          Aug 29 11:26:24 CDT 2012<br>
                                          [0]PETSC ERROR: See
                                          docs/changes/index.html for
                                          recent updates.<br>
                                          [0]PETSC ERROR: See
                                          docs/faq.html for hints about
                                          trouble shooting.<br>
                                          [0]PETSC ERROR: See
                                          docs/index.html for manual
                                          pages.<br>
                                          [0]PETSC ERROR:
                                          ------------------------------------------------------------------------<br>
                                          [0]PETSC ERROR: ./hit on a 
                                          named nid15363 by Unknown Fri
                                          May 24 17:06:50 2013<br>
                                          [0]PETSC ERROR: Libraries
                                          linked from<br>
                                          [0]PETSC ERROR: Configure run
                                          at<br>
                                          [0]PETSC ERROR: Configure
                                          options<br>
                                          [0]PETSC ERROR:
                                          ------------------------------------------------------------------------<br>
                                          [0]PETSC ERROR:
                                          MatPivotCheck_none() line 583
                                          in
src/mat/impls/aij/seq//ptmp/skelly/petsc/3.3.03/cray_interlagos_build/real/src/include/petsc-private/matimpl.h<br>
                                          [0]PETSC ERROR:
                                          MatPivotCheck() line 602 in
src/mat/impls/aij/seq//ptmp/skelly/petsc/3.3.03/cray_interlagos_build/real/src/include/petsc-private/matimpl.h<br>
                                          [0]PETSC ERROR:
                                          MatLUFactorNumeric_SeqAIJ()
                                          line 585 in
                                          src/mat/impls/aij/seq/aijfact.c<br>
                                          [0]PETSC ERROR:
                                          MatLUFactorNumeric() line 2803
                                          in src/mat/interface/matrix.c<br>
                                          [0]PETSC ERROR: PCSetUp_LU()
                                          line 160 in
                                          src/ksp/pc/impls/factor/lu/lu.c<br>
                                          [0]PETSC ERROR: PCSetUp() line
                                          832 in
                                          src/ksp/pc/interface/precon.c<br>
                                          [0]PETSC ERROR: KSPSetUp()
                                          line 278 in
                                          src/ksp/ksp/interface/itfunc.c<br>
                                          [0]PETSC ERROR:
                                          PCSetUpOnBlocks_BJacobi_Singleblock()
                                          line 715 in
                                          src/ksp/pc/impls/bjacobi/bjacobi.c<br>
                                          [0]PETSC ERROR:
                                          PCSetUpOnBlocks() line 865 in
                                          src/ksp/pc/interface/precon.c<br>
                                          [0]PETSC ERROR:
                                          KSPSetUpOnBlocks() line 154 in
                                          src/ksp/ksp/interface/itfunc.c<br>
                                          [0]PETSC ERROR: KSPSolve()
                                          line 403 in
                                          src/ksp/ksp/interface/itfunc.c<br>
                                          [0]PETSC ERROR:
                                          PCSetUpOnBlocks_BJacobi_Singleblock()
                                          line 715 in
                                          src/ksp/pc/impls/bjacobi/bjacobi.c<br>
                                          [0]PETSC ERROR:
                                          PCSetUpOnBlocks() line 865 in
                                          src/ksp/pc/interface/precon.c<br>
                                          [0]PETSC ERROR:
                                          KSPSetUpOnBlocks() line 154 in
                                          src/ksp/ksp/interface/itfunc.c<br>
                                          [0]PETSC ERROR: KSPSolve()
                                          line 403 in
                                          src/ksp/ksp/interface/itfunc.c<br>
                                          [0]PETSC ERROR:
                                          PCMGMCycle_Private() line 20
                                          in src/ksp/pc/impls/mg/mg.c<br>
                                          [0]PETSC ERROR:
                                          PCMGMCycle_Private() line 49
                                          in src/ksp/pc/impls/mg/mg.c<br>
                                          [0]PETSC ERROR:
                                          PCMGMCycle_Private() line 49
                                          in src/ksp/pc/impls/mg/mg.c<br>
                                          [0]PETSC ERROR:
                                          PCMGMCycle_Private() line 49
                                          in src/ksp/pc/impls/mg/mg.c<br>
                                          [0]PETSC ERROR: PCApply_MG()
                                          line 326 in
                                          src/ksp/pc/impls/mg/mg.c<br>
                                          [0]PETSC ERROR: PCApply() line
                                          384 in
                                          src/ksp/pc/interface/precon.c<br>
                                          [0]PETSC ERROR: KSPSolve_CG()
                                          line 139 in
                                          src/ksp/ksp/impls/cg/cg.c<br>
                                          [0]PETSC ERROR: KSPSolve()
                                          line 446 in
                                          src/ksp/ksp/interface/itfunc.c<br>
                                          <br>
                                        </font>
                                        <div>On 05/24/2013 02:51 PM, Jed
                                          Brown wrote:<br>
                                        </div>
                                        <blockquote type="cite">
                                          <pre>Michele Rosso <a moz-do-not-send="true" href="mailto:mrosso@uci.edu" target="_blank"><mrosso@uci.edu></a> writes:

</pre>
                                          <blockquote type="cite">
                                            <blockquote type="cite">
                                              <pre>    With petsc-3.4 (which you should upgrade to), use
    -mg_coarse_sub_pc_factor_shift_type NONZERO
</pre>
                                            </blockquote>
                                          </blockquote>
                                          <pre>Actually, use this with petsc-3.3 also (and please upgrade to
petsc-3.4).

The option you were passing was not being used.

</pre>
                                        </blockquote>
                                        <br>
                                      </div>
                                    </blockquote>
                                  </div>
                                  <br>
                                  <br clear="all">
                                  <span class="HOEnZb"><font
                                      color="#888888"> <span><font
                                          color="#888888">
                                          <div><br>
                                          </div>
                                          -- <br>
                                          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 </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>
                          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 </font></span></div>
                  </div>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          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>
    </blockquote>
    <br>
  </body>
</html>