This is an enormous amount of new code and changes to put in during a code freeze, but my test case works now. A couple comments  from looking at the patch:<div><br></div><div>I'm not sure I like the direction of the link in DMSetEmbedding(DM dm, IS embedding, DM ambientdm). Normally the composite DM knows how to fit its pieces together, but the sub-DM does not have "upward links" to the global problem.</div>
<div><br></div><div>There are dead links in your documentation because you reference functions that don't exist (were renamed), e.g. DMCreateDecomposition() in the DMSetEmbedding() man page. There may be more. You should generate the docs and check the man pages.</div>
<div><br></div><div>How does your interface support "Neumann" subdomains?</div><div><br></div><div>Your DMCreateDomainDecomposition() seems to provide nominally overlapping index sets, but how do we determine what part is owned? (RASM, especially, needs both an overlapping decomposition and a (non-overlapping) partition.</div>
<div><br><div class="gmail_quote">On Mon, May 28, 2012 at 4:32 PM, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov" target="_blank">karpeev@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I refactored the code to get rid of field/domain decomposition mixing.<div>The use of DM in ASM is reenabled here: <a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/2e2ee6a01d1a" target="_blank">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/2e2ee6a01d1a</a></div>


<div>I didn't see any errors related to it in alltest, but I'll keep an eye on the nightlies.</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">Dmitry.</font></span><div>
<div class="h5"><br><br><div class="gmail_quote">On Sun, May 27, 2012 at 9:40 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In particular, read through my first email in this thread. I explain how your implementation leads to several instances of either the wrong algorithm or a crash.<div>


<br></div><div>I pushed SNES runex48_5, it is a basic test of PCASM using AIJ, BAIJ, and SBAIJ.</div>
<div><br></div><div>If you revert <a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/d9a0e3f9dacd" target="_blank">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/d9a0e3f9dacd</a>, the AIJ test will take much more iterations and the other two will crash.<div>


<div><br>
<br><div class="gmail_quote">On Sun, May 27, 2012 at 9:02 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<p>./ex48 -pc_type asm</p>
<p>does the wrong algorithm.</p><div><div>
<div class="gmail_quote">On May 27, 2012 8:56 PM, "Dmitry Karpeev" <<a href="mailto:karpeev@mcs.anl.gov" target="_blank">karpeev@mcs.anl.gov</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




I think I have a fix and want to reenable DM to serve up decompositions to PCASM.<div>Was there a particular test that was failing? I don't see any decomposition-related errors in alltest.</div><div>Dmitry.<br><div><br>






<div class="gmail_quote">On Sat, May 26, 2012 at 10:38 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>On Sat, May 26, 2012 at 10:24 PM, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov" target="_blank">karpeev@mcs.anl.gov</a>></span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>How about having a DM-specific function for that designation?</div></div>
</blockquote></div><div>DMXXXGetFieldSplits()/DMXXXGetDomainDecompositions(), for example?</div></blockquote><div><br></div></div><div>For the C interface, maybe configure a named set with DMXxxSet... and tell PCASM to use it. For the options database interface, maybe have the option processed by DMXxx code instead of by PCASM. I don't know, this might be just as bad.</div>







<div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I think that would work, if the implementation defined only a small number of decompositions.</div>

<div>If instead there is a short grammar defining well-formed strings naming such decompositions, I'm not sure how to </div><div>communicate that to the user, other than in documentation.  I have DMLibMeshGetVars() to return all vars.  FieldSplits</div>










<div>can be defined as arbitrary groupings of those.  Each split will then advertise only the vars in the groupings that defines the split.</div></blockquote></div></div><br><div>I still don't know what to do about a nonlinear change of basis. Advertising var names seems reasonable to me.</div>








<div><br></div><div>Note that ASM domains are essentially vertex-oriented which is different from element-centered domains (natural for non-overlapping methods).</div>
</blockquote></div><br></div></div>
</blockquote></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>