<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Matt,<br>
      I just got your answer. Thanks for confirming my diagnostic.<br>
      I will look at the code and do my best : )<br>
      I'll keep you posted on my progresses and issues.<br>
      <pre class="moz-signature" cols="72">Best,
Luc</pre>
      On 03/02/2014 02:33 PM, Matthew Knepley wrote:<br>
    </div>
    <blockquote
cite="mid:CAMYG4G=Frbr_ve=FkGfOSUdBZ+P7Z=5euuseBXhCMPQAz45nfw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Fri, Feb 28, 2014 at 8:18 PM, Luc
            Berger-Vergiat <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:luc.berger.vergiat@gmail.com"
                target="_blank">luc.berger.vergiat@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 style="word-wrap:break-word">Hi all,
                <div>sorry for the cryptic title but this is a little
                  complex.</div>
                <div>Here is what I am doing:</div>
                <div>I created a DMShell that gets four fields passed
                  from a PetscSection.</div>
                <div>Now I am doing this because I want to apply a schur
                  complement to my problem.</div>
                <div>In order to do so I pass the following arguments to
                  my code:</div>
                <div><br>
                </div>
                <div><font face="'Lucida Console'">-ksp_type gmres</font></div>
                <div><font face="'Lucida Console'">-pc_type fieldsplit</font></div>
                <div><font face="'Lucida Console'">-pc_fieldsplit_type
                    schur</font></div>
                <div><font face="'Lucida Console'">-pc_fieldsplit_schur_factorization_type
                    full</font></div>
                <div><font face="'Lucida Console'">-pc_fieldsplit_0_fields
                    2,3                    <--- This define A00 for
                    my schur</font></div>
                <div><font face="'Lucida Console'">-pc_fieldsplit_1_fields
                    0,1</font></div>
                <div><font face="'Lucida Console'"><br>
                  </font></div>
                <div>Up to here everything works fine and as expected (I
                  actually do a -ksp_view to make sure that everything
                  makes sense).</div>
                <div>Now things get tricky, I would like to compute
                  A00^-1 using another schur decomposition so here are
                  the commands I issue:</div>
                <div><br>
                </div>
                <div><font face="'Lucida Console'">   
                    -fieldsplit_0_ksp_type preonly</font></div>
                <div><font face="'Lucida Console'">   
                    -fieldsplit_0_pc_type fieldsplit</font></div>
                <div><font face="'Lucida Console'">    -fieldsplit_0_</font><span
                    style="font-family:'Lucida Console'">pc_fieldsplit_type
                    schur</span></div>
                <div><span style="font-family:'Lucida Console'">    </span><font
                    face="'Lucida Console'">-fieldsplit_0_</font><span
                    style="font-family:'Lucida Console'">pc_fieldsplit_</span><span
                    style="font-family:'Lucida Console'">schur_factorization_type
                    full</span></div>
                <div><span style="font-family:'Lucida Console'">   
                    -fieldsplit_0_pc_fieldsplit_0_fields 2</span></div>
                <div><span style="font-family:'Lucida Console'">    </span><span
                    style="font-family:'Lucida Console'">-fieldsplit_0_pc_fieldsplit_1_fields
                    3</span></div>
                <div><span style="font-family:'Lucida Console'"><br>
                  </span></div>
                <div>I am almost sure that the 4 first commands are
                  correct, I am not however sure that the last two are
                  understood by PETSc.</div>
                <div>Actually I am worried that the DMShell that I
                  created for the first level schur is not passed on the
                  second level schur.</div>
                <div>Here is the error message I get when I run my code:</div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Sorry, I am really bogged down at the moment. Can you
              try this:</div>
            <div><br>
            </div>
            <div>  1) You do not need to specify 2,3 for the inner
              fields since it will use them automatically</div>
            <div><br>
            </div>
            <div>  2) Can you try changing
              src/dm/impls/shell/dmshell.c:664 to include
              DMSetUp(*subdm); ?</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 style="word-wrap:break-word">
                <div>
                  <div>[0]PETSC ERROR: --------------------- Error
                    Message ------------------------------------</div>
                  <div>[0]PETSC ERROR: Object is in wrong state!</div>
                  <div>[0]PETSC ERROR: Decomposition defined only after
                    DMSetUp!</div>
                  <div>[0]PETSC ERROR:
                    ------------------------------------------------------------------------</div>
                  <div>[0]PETSC ERROR: Petsc Development GIT revision:
                    v3.4.3-4597-g3edecfd  GIT Date: 2014-02-20 20:43:18
                    -0600</div>
                  <div>[0]PETSC ERROR: See docs/changes/index.html for
                    recent updates.</div>
                  <div>[0]PETSC ERROR: See docs/faq.html for hints about
                    trouble shooting.</div>
                  <div>[0]PETSC ERROR: See docs/index.html for manual
                    pages.</div>
                  <div>[0]PETSC ERROR:
                    ------------------------------------------------------------------------</div>
                  <div>[0]PETSC ERROR:
                    /home/luc/research/feap_repo/ShearBands/parfeap-petsc34/feap
                    on a arch-linux2-c-opt named euler by luc Fri Feb 28
                    20:07:18 2014</div>
                  <div>[0]PETSC ERROR: Libraries linked from
                    /home/luc/research/petsc/arch-linux2-c-opt/lib</div>
                  <div>[0]PETSC ERROR: Configure run at Fri Feb 21
                    17:31:31 2014</div>
                  <div>[0]PETSC ERROR: Configure options
                    --download-cmake --download-hypre --download-metis
                    --download-mpich --download-parmetis
                    --with-debugging=0 --with-share-libraries=0</div>
                  <div>[0]PETSC ERROR:
                    ------------------------------------------------------------------------</div>
                  <div>[0]PETSC ERROR: DMCreateFieldDecomposition() line
                    1262 in
                    /home/luc/research/petsc/src/dm/interface/dm.c</div>
                  <div>[0]PETSC ERROR: PCFieldSplitSetDefaults() line
                    336 in
                    /home/luc/research/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c</div>
                  <div>[0]PETSC ERROR: PCSetUp_FieldSplit() line 485 in
/home/luc/research/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c</div>
                  <div>[0]PETSC ERROR: PCSetUp() line 888 in
                    /home/luc/research/petsc/src/ksp/pc/interface/precon.c</div>
                  <div>[0]PETSC ERROR: KSPSetUp() line 278 in
                    /home/luc/research/petsc/src/ksp/ksp/interface/itfunc.c</div>
                  <div>[0]PETSC ERROR: KSPSolve() line 390 in
                    /home/luc/research/petsc/src/ksp/ksp/interface/itfunc.c</div>
                  <div>[0]PETSC ERROR: PCApply_FieldSplit_Schur() line
                    859 in
                    /home/luc/research/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c</div>
                  <div>[0]PETSC ERROR: PCApply() line 440 in
                    /home/luc/research/petsc/src/ksp/pc/interface/precon.c</div>
                  <div>[0]PETSC ERROR: KSP_PCApply() line 227 in
                    /home/luc/research/petsc/include/petsc-private/kspimpl.h</div>
                  <div>[0]PETSC ERROR: KSPInitialResidual() line 64 in
                    /home/luc/research/petsc/src/ksp/ksp/interface/itres.c</div>
                  <div>[0]PETSC ERROR: KSPSolve_GMRES() line 234 in
                    /home/luc/research/petsc/src/ksp/ksp/impls/gmres/gmres.c</div>
                  <div>[0]PETSC ERROR: KSPSolve() line 432 in
                    /home/luc/research/petsc/src/ksp/ksp/interface/itfunc.c</div>
                </div>
                <div><br>
                </div>
                <div>Let me know if I'm doing something wrong or
                  misunderstood something.</div>
                <div><br>
                </div>
                <div>Best,</div>
                <div>Luc</div>
              </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>