<br><br><div class="gmail_quote">On Fri, Jul 6, 2012 at 9:56 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@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="im"><br>
On Jul 6, 2012, at 9:35 PM, Matthew Knepley wrote:<br>
<br>
> On Fri, Jul 6, 2012 at 8:18 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
><br>
> I don't understand this thread but I see nothing wrong with options like<br>
><br>
> -fieldsplit_0_fieldsplit_0_fieldsplit_0....<br>
><br>
> when using three nested levels of fieldsplit in the same way that three levels of block Jacobi (or ASM) gives -sub_sub_sub....<br>
><br>
> The recursive nature of the prefixes should be completely natural and not require any special code ....<br>
><br>
> Providing a prefix in the command line for other options seems terrible to me. Using the word inner also seems terrible; when you have _sub_sub that is clearly inner<br>
><br>
> Could someone explain to me what prefixes are being generated that are not the normal recursive process and why?<br>
><br>
> Sure, that is how it works in general. The point here is the distinction between A^{-1} in the (0,0) block and<br>
> A^{-1} embedded in S, which I will call A^{-1}_S. Right now we have<br>
><br>
> a) A^{-1}_S and S have the same prefix<br>
><br>
> which Dmitry does not want (perfectly reasonable). </div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Before we had<br>
><br>
> b) A^{-1} and A^{-1}_S had the same prefix<br>
><br>
> which I do not want since it makes things like SIMPLE hard. I wanted<br>
><br>
> c) A^{-1}_S has prefix <prefix of S>_sub<br>
><br>
> but Dmitry said this was a hassle for normal setups and suggested that<br>
> we have some option that allows A^{-1} and A^{-1}_S to have different<br>
> prefixes.<br>
><br>
<br>
</div> Thanks, this makes things much clearer.<br>
<br>
1) I don't like your prefix _sub (what the heck does _sub mean in this case) but I agree with you that having a different prefix there is good<br>
<br>
2) I don't like Dmitry's solution. It introduces an entirely new paradigm that we don't have anywhere else in PETSc.<br>
<br>
My thoughts ----------<br>
<br>
For PCMG we have prefixes for the levels mg_levels_%d_ if the user uses -mg_levels_ksp_type it applied to ALL the levels but if the user does -mg_levels_3_ksp_type it is applied only to the 3rd level. This is done by having the special treatment of _%d_ integers n the prefix that the options database can handle. It would be nice if we could use this same basic paradigm to handle this new case that supports both what Dmitry and you want but not in a hacky ugly special case way. For example (not so good) just use<br>
<br>
-fieldsplit_0_ksp_type sets the same for both<br>
-fieldsplit_0_0_ksp_type for the 0,0 block -fieldsplit_0_1_ksp_type for the solve inside the application of S.<br>
<br>
this is not good because it uses 0 and 1 for the two solves (and 0 and 1 have no particular meaning here) but the advantage is that it reuses current paradigms.<br>
<br>
Going further we could have<br>
<br>
-fieldsplit_0_ksp_type sets the same for both<br>
-fieldsplit_0_outter_ksp_type for the 0,0 block and -fieldsplit_0_inner_ksp_type for the one inside the S<br>
<br>
to implement this we would need to add support for %s in options prefixes. Maybe _<%s>_ so the options processing accepts a match with the string inside the <> or if that is not in the options database it accepts an option without the entire _<%s>_ This would require some small additions to PetscOptionsFind_private() like the<br>
<br>
if (!*flg) {<br>
PetscInt j,cnt = 0,locs[16],loce[16];<br>
size_t n;<br>
ierr = PetscStrlen(tmp,&n);CHKERRQ(ierr);<br>
/* determine the location and number of all _%d_ in the key */<br>
for (i=0; i< (PetscInt)n; i++) {<br>
if (tmp[i] == '_') {<br>
for (j=i+1; j< (PetscInt)n; j++) {<br>
if (tmp[j] >= '0' && tmp[j] <= '9') continue;<br>
if (tmp[j] == '_' && j > i+1) { /* found a number */<br>
locs[cnt] = i+1;<br>
loce[cnt++] = j+1;<br>
}<br>
break;<br>
}<br>
}<br>
}<br>
<br>
<br>
What does everyone think?<br></blockquote><div>I'm fine with this, except for the small detail that "outer" and "inner" infixes might be obscure to the user.</div><div>I would advocate -fieldsplit_0_ksp_type by itself setting up both the inner and outer A^{-1}, and -fieldsplit_0_schur_ksp_type </div>
<div>overriding the inner solver settings -- I think "Schur" is more descriptive then "inner" and "outer".</div><div><br></div><div>Dmitry.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
<br>
Barry<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
> Matt<br>
><br>
><br>
> Barry<br>
><br>
> On Jul 6, 2012, at 8:39 AM, Matthew Knepley wrote:<br>
><br>
> > On Fri, Jul 6, 2012 at 7:28 AM, Dmitry Karpeev <<a href="mailto:karpeev@mcs.anl.gov">karpeev@mcs.anl.gov</a>> wrote:<br>
> ><br>
> > On Fri, Jul 6, 2012 at 8:17 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
> > On Fri, Jul 6, 2012 at 5:06 AM, Dmitry Karpeev <<a href="mailto:karpeev@mcs.anl.gov">karpeev@mcs.anl.gov</a>> wrote:<br>
> > Here's the line in question (also see the immediately preceding code):<br>
> > <a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/0d4ccb990bb8#l1.127" target="_blank">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/0d4ccb990bb8#l1.127</a><br>
> ><br>
> > As long as we are fixing this, I would rather not repeat the prefix, since we will likely want to<br>
> > configure this differently than the block 0 solve. Is any thing wrong with<br>
> ><br>
> > schurprefix+"_sub"<br>
> > If the inner and outer KSP prefixes are different, it will force one to repeat all of the configuration options for the inner and outer A00 solvers, even when it is desirable to keep them identical.<br>
> > This becomes tedious, if the A00 solvers configuration is involved (e.g., a nested fieldsplit with separate options for the splits etc.).<br>
> > I would advocate making the inner solver use the same prefix as the outer solver by default, and allowing the user to specify<br>
> > a separate prefix for the inner solver, if it is to be configured differently. For example:<br>
> > -fieldsplit_0_schur_prefix fieldsplit_0_inner -fieldsplit_0_ksp_type gmres -fieldsplit_0_inner_ksp_type preonly etc.<br>
> ><br>
> > As long as there is a way to do it.<br>
> ><br>
> > Matt<br>
> ><br>
> > Dmitry.<br>
> ><br>
> ><br>
> ><br>
> > Matt<br>
> ><br>
> > Dmitry.<br>
> ><br>
> ><br>
> > ---------- Forwarded message ----------<br>
> > From: Dmitry Karpeev <<a href="mailto:karpeev@mcs.anl.gov">karpeev@mcs.anl.gov</a>><br>
> > Date: Fri, Jul 6, 2012 at 6:04 AM<br>
> > Subject: Re: [petsc-dev] Problematic Merge of FieldSplit<br>
> > To: For users of the development version of PETSc <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>><br>
> ><br>
> ><br>
> > I have the following problem with the prefix choice for the MatSchurComplement KSP introduced in this changeset (<a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/0d4ccb990bb8" target="_blank">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/0d4ccb990bb8</a>).<br>
> > I'm talking about the "inner" KSP for A00, effecting inv(A00) in the definition S = A11 - A10 inv(A00) A01.<br>
> > We also have the "outer" inv(A00) KSP, which gets prefix "0". I recently set the "inner" inv(A00) KSP<br>
> > prefix to "0", simply by inheriting it from the "outer" solver. Now, it is completely reasonable<br>
> > to expect the inner and outer A00 KSPs to have different prefixes so that they can be configured differently.<br>
> > In fact, there was a recent petsc-users request related to this (<a href="http://lists.mcs.anl.gov/pipermail/petsc-users/2012-June/014005.html" target="_blank">http://lists.mcs.anl.gov/pipermail/petsc-users/2012-June/014005.html</a>).<br>
> > However, currently the inner A00 KSP inherits the prefix from the A11 KSP corresponding to the "1" field. With this prefix choice<br>
> > I end up configuring inv(A00) and inv(S) identically, which isn't what I want at all.<br>
> > I'm not sure what the right approach is, but the current one doesn't work for me.<br>
> ><br>
> > Note also that if A00 is treated with a recursive split, there may be numerous options for the A00 KSP.<br>
> > Do we want to repeat them for the inner and outer KSPs, if we want to configure them identically?<br>
> > It's automatic, if the two A00 KSPs share a prefix. Again, this takes away some flexibility, so maybe it's not the best solution,<br>
> > but I think retaining a simple option for using identical configurations is also highly desirable.<br>
> ><br>
> > Any ideas on how to handle this?<br>
> > Dmitry.<br>
> ><br>
> > On Tue, Jun 26, 2012 at 6:13 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
> > It turns out that 'hg rollback' during an 'hg rebase' does not do what I thought it did. I think<br>
> > everything is cleaned up with this push, but if you made FS changes in the past month, please<br>
> > check that it is doing what you want with prefixes, etc.<br>
> ><br>
> > Now, nested fieldsplits from the command line work, ala<br>
> ><br>
> > -ksp_type fgmres<br>
> > -pc_type fieldsplit -pc_fieldsplit_type additive<br>
> > -pc_fieldsplit_0_fields 0,1<br>
> > -fieldsplit_0_pc_type fieldsplit<br>
> > -fieldsplit_0_pc_fieldsplit_type schur -fieldsplit_0_pc_fieldsplitschur_factorization_type full<br>
> > -fieldsplit_0_fieldsplit_velocity_ksp_type preonly<br>
> > -fieldsplit_0_fieldsplit_velocity_pc_type lu<br>
> > -fieldsplit_0_fieldsplit_pressure_ksp_rtol 1e-10<br>
> > -fieldsplit_0_fieldsplit_pressure_pc_type jacobi<br>
> > -pc_fieldsplit_1_fields 2<br>
> > -fieldsplit_temperature_ksp_type preonly<br>
> > -fieldsplit_temperature_pc_type lu<br>
> ><br>
> > A split with only one field gets the field name, and otherwise a split number.<br>
> ><br>
> > Matt<br>
> ><br>
> > --<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<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<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<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<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<br>
><br>
><br>
><br>
><br>
> --<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<br>
<br>
</div></div></blockquote></div><br>