<div dir="ltr">I'm not too familiar with the M and q notation. However, I've attached A and b for the unconstrained linear problem in PETSc binary format (don't know if they'll go through on this list...). l and u are 0 and 10 respectively.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 1, 2019 at 10:19 AM Munson, Todd <<a href="mailto:tmunson@mcs.anl.gov">tmunson@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Yes, that looks weird. Can you send me directly the linear problem (M, q, l, and u)? I<br>
will take a look and run some other diagnostics with some of my other tools.<br>
<br>
Thanks, Todd.<br>
<br>
> On Nov 1, 2019, at 10:14 AM, Alexander Lindsay <<a href="mailto:alexlindsay239@gmail.com" target="_blank">alexlindsay239@gmail.com</a>> wrote:<br>
> <br>
> No, the matrix is not symmetric because of how we impose some Dirichlet conditions on the boundary. I could easily give you the Jacobian, for one of the "bad" problems. But at least in the case of RSLS, I don't know whether the algorithm is performing badly, or whether the slow convergence is simply a property of the algorithm. Here's a VI monitor history for a representative "bad" solve.<br>
> <br>
> 0 SNES VI Function norm 0.229489 Active lower constraints 0/1 upper constraints 0/1 Percent of total 0. Percent of bounded 0.<br>
> 1 SNES VI Function norm 0.365268 Active lower constraints 83/85 upper constraints 83/85 Percent of total 0.207241 Percent of bounded 0.<br>
> 2 SNES VI Function norm 0.495088 Active lower constraints 82/84 upper constraints 82/84 Percent of total 0.204744 Percent of bounded 0.<br>
> 3 SNES VI Function norm 0.478328 Active lower constraints 81/83 upper constraints 81/83 Percent of total 0.202247 Percent of bounded 0.<br>
> 4 SNES VI Function norm 0.46163 Active lower constraints 80/82 upper constraints 80/82 Percent of total 0.19975 Percent of bounded 0.<br>
> 5 SNES VI Function norm 0.444996 Active lower constraints 79/81 upper constraints 79/81 Percent of total 0.197253 Percent of bounded 0.<br>
> 6 SNES VI Function norm 0.428424 Active lower constraints 78/80 upper constraints 78/80 Percent of total 0.194757 Percent of bounded 0.<br>
> 7 SNES VI Function norm 0.411916 Active lower constraints 77/79 upper constraints 77/79 Percent of total 0.19226 Percent of bounded 0.<br>
> 8 SNES VI Function norm 0.395472 Active lower constraints 76/78 upper constraints 76/78 Percent of total 0.189763 Percent of bounded 0.<br>
> 9 SNES VI Function norm 0.379092 Active lower constraints 75/77 upper constraints 75/77 Percent of total 0.187266 Percent of bounded 0.<br>
> 10 SNES VI Function norm 0.362776 Active lower constraints 74/76 upper constraints 74/76 Percent of total 0.184769 Percent of bounded 0.<br>
> 11 SNES VI Function norm 0.346525 Active lower constraints 73/75 upper constraints 73/75 Percent of total 0.182272 Percent of bounded 0.<br>
> 12 SNES VI Function norm 0.330338 Active lower constraints 72/74 upper constraints 72/74 Percent of total 0.179775 Percent of bounded 0.<br>
> 13 SNES VI Function norm 0.314217 Active lower constraints 71/73 upper constraints 71/73 Percent of total 0.177278 Percent of bounded 0.<br>
> 14 SNES VI Function norm 0.298162 Active lower constraints 70/72 upper constraints 70/72 Percent of total 0.174782 Percent of bounded 0.<br>
> 15 SNES VI Function norm 0.282173 Active lower constraints 69/71 upper constraints 69/71 Percent of total 0.172285 Percent of bounded 0.<br>
> 16 SNES VI Function norm 0.26625 Active lower constraints 68/70 upper constraints 68/70 Percent of total 0.169788 Percent of bounded 0.<br>
> 17 SNES VI Function norm 0.250393 Active lower constraints 67/69 upper constraints 67/69 Percent of total 0.167291 Percent of bounded 0.<br>
> 18 SNES VI Function norm 0.234604 Active lower constraints 66/68 upper constraints 66/68 Percent of total 0.164794 Percent of bounded 0.<br>
> 19 SNES VI Function norm 0.218882 Active lower constraints 65/67 upper constraints 65/67 Percent of total 0.162297 Percent of bounded 0.<br>
> 20 SNES VI Function norm 0.203229 Active lower constraints 64/66 upper constraints 64/66 Percent of total 0.1598 Percent of bounded 0.<br>
> 21 SNES VI Function norm 0.187643 Active lower constraints 63/65 upper constraints 63/65 Percent of total 0.157303 Percent of bounded 0.<br>
> 22 SNES VI Function norm 0.172126 Active lower constraints 62/64 upper constraints 62/64 Percent of total 0.154806 Percent of bounded 0.<br>
> 23 SNES VI Function norm 0.156679 Active lower constraints 61/63 upper constraints 61/63 Percent of total 0.15231 Percent of bounded 0.<br>
> 24 SNES VI Function norm 0.141301 Active lower constraints 60/62 upper constraints 60/62 Percent of total 0.149813 Percent of bounded 0.<br>
> 25 SNES VI Function norm 0.125993 Active lower constraints 59/61 upper constraints 59/61 Percent of total 0.147316 Percent of bounded 0.<br>
> 26 SNES VI Function norm 0.110755 Active lower constraints 58/60 upper constraints 58/60 Percent of total 0.144819 Percent of bounded 0.<br>
> 27 SNES VI Function norm 0.0955886 Active lower constraints 57/59 upper constraints 57/59 Percent of total 0.142322 Percent of bounded 0.<br>
> 28 SNES VI Function norm 0.0804936 Active lower constraints 56/58 upper constraints 56/58 Percent of total 0.139825 Percent of bounded 0.<br>
> 29 SNES VI Function norm 0.0654705 Active lower constraints 55/57 upper constraints 55/57 Percent of total 0.137328 Percent of bounded 0.<br>
> 30 SNES VI Function norm 0.0505198 Active lower constraints 54/56 upper constraints 54/56 Percent of total 0.134831 Percent of bounded 0.<br>
> 31 SNES VI Function norm 0.0356422 Active lower constraints 53/55 upper constraints 53/55 Percent of total 0.132335 Percent of bounded 0.<br>
> 32 SNES VI Function norm 0.020838 Active lower constraints 52/54 upper constraints 52/54 Percent of total 0.129838 Percent of bounded 0.<br>
> 33 SNES VI Function norm 0.0061078 Active lower constraints 51/53 upper constraints 51/53 Percent of total 0.127341 Percent of bounded 0.<br>
> 34 SNES VI Function norm 2.2664e-12 Active lower constraints 51/52 upper constraints 51/52 Percent of total 0.127341 Percent of bounded 0.<br>
> <br>
> I've read that in some cases the VI solver is simply unable to move the constraint set more than one grid cell per non-linear iteration. That looks like what I'm seeing here...<br>
> <br>
> On Tue, Oct 29, 2019 at 7:15 AM Munson, Todd <<a href="mailto:tmunson@mcs.anl.gov" target="_blank">tmunson@mcs.anl.gov</a>> wrote:<br>
> <br>
> Hi,<br>
> <br>
> Is the matrix for the linear PDE symmetric? If so, then the VI is equivalent to<br>
> finding the stationary points of a bound-constrained quadratic program and you<br>
> may want to use the TAO Newton Trust-Region or Line-Search methods for<br>
> bound-constrained optimization problems.<br>
> <br>
> Alp: are there flags set when a problem is linear with a symmetric matrix? Maybe<br>
> we can do an internal reformulation in those cases to use the optimization tools.<br>
> <br>
> Is there an easy way to get the matrix and the constant vector for one of the<br>
> problems that fails or does not perform well? Typically, the TAO RSLS<br>
> methods will work well for the types of problems that you have and if<br>
> they are not, then I can go about finding out why and making some<br>
> improvements.<br>
> <br>
> Monotone in this case is that your matrix is positive semidefinite; x^TMx >= 0 for <br>
> all x. For M symmetric, this is the same as M having all nonnegative eigenvalues.<br>
> <br>
> Todd.<br>
> <br>
> > On Oct 28, 2019, at 11:14 PM, Alexander Lindsay <<a href="mailto:alexlindsay239@gmail.com" target="_blank">alexlindsay239@gmail.com</a>> wrote:<br>
> > <br>
> > On Thu, Oct 24, 2019 at 4:52 AM Munson, Todd <<a href="mailto:tmunson@mcs.anl.gov" target="_blank">tmunson@mcs.anl.gov</a>> wrote:<br>
> > <br>
> > Hi,<br>
> > <br>
> > For these problems, how large are they? And are they linear or nonlinear? <br>
> > What I can do is use some fancier tools to help with what is going on with <br>
> > the solvers in certain cases.<br>
> > <br>
> > For the results cited above:<br>
> > <br>
> > 100 elements -> 101 dofs<br>
> > 1,000 elements -> 1,001 dofs<br>
> > 10,000 elements -> 10,001 dofs<br>
> > <br>
> > The PDE is linear with simple bounds constraints on the variable: 0 <= u <= 10<br>
> > <br>
> > <br>
> > For Barry's question, the matrix in the SS solver is a diagonal matrix plus<br>
> > a column scaling of the Jacobian.<br>
> > <br>
> > Note: semismooth, reduced space and interior point methods mainly work for<br>
> > problems that are strictly monotone. <br>
> > <br>
> > Dumb question, but monotone in what way?<br>
> > <br>
> > Thanks for the replies!<br>
> > <br>
> > Alex<br>
> > <br>
> > Finding out what is going on with<br>
> > your problems with some additional diagnostics might yield some <br>
> > insights.<br>
> > <br>
> > Todd.<br>
> > <br>
> > > On Oct 24, 2019, at 3:36 AM, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>> wrote:<br>
> > > <br>
> > > <br>
> > > See bottom<br>
> > > <br>
> > > <br>
> > >> On Oct 14, 2019, at 1:12 PM, Justin Chang via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
> > >> <br>
> > >> It might depend on your application, but for my stuff on maximum principles for advection-diffusion, I found RS to be much better than SS. Here’s the paper I wrote documenting the performance numbers I came across<br>
> > >> <br>
> > >> <a href="https://www.sciencedirect.com/science/article/pii/S0045782516316176" rel="noreferrer" target="_blank">https://www.sciencedirect.com/science/article/pii/S0045782516316176</a><br>
> > >> <br>
> > >> Or the arXiV version:<br>
> > >> <br>
> > >> <a href="https://arxiv.org/pdf/1611.08758.pdf" rel="noreferrer" target="_blank">https://arxiv.org/pdf/1611.08758.pdf</a><br>
> > >> <br>
> > >> <br>
> > >> On Mon, Oct 14, 2019 at 1:07 PM Alexander Lindsay via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
> > >> I've been working on mechanical contact in MOOSE for a while, and it's led to me to think about general inequality constraint enforcement. I've been playing around with both `vinewtonssls` and `vinewtonrsls`. In Benson's and Munson's Flexible Complementarity Solvers paper, they were able to solve 73.7% of their problems with SS and 65.5% with RS which led them to conclude that the SS method is generally more robust. We have had at least one instance where a MOOSE user reported an order of magnitude reduction in non-linear iterations when switching from SS to RS. Moreover, when running the problem described in this issue, I get these results:<br>
> > >> <br>
> > >> num_elements = 100<br>
> > >> SS nl iterations = 53<br>
> > >> RS nl iterations = 22<br>
> > >> <br>
> > >> num_elements = 1000<br>
> > >> SS nl iterations = 123<br>
> > >> RS nl iterations = 140<br>
> > >> <br>
> > >> num_elements = 10000<br>
> > >> SS: fails to converge within 50 nl iterations during the second time step whether using a `basic` or `bt` line search<br>
> > >> RS: fails to converge within 50 nl iterations during the second time step whether using a `basic` or `bt` line search (although I believe `vinewtonrsls` performs a line-search that is guaranteed to keep the degrees of freedom within their bounds)<br>
> > >> <br>
> > >> So depending on the number of elements, it appears that either SS or RS may be more performant. I guess since I can get different relative performance with even the same PDE, it would be silly for me to ask for guidance on when to use which? In the conclusion of Benson's and Munson's paper, they mention using mesh sequencing for generating initial guesses on finer meshes. Does anyone know whether there have been any publications using PETSc/TAO and mesh sequencing for solving large VI problems?<br>
> > >> <br>
> > >> A related question: what needs to be done to allow SS to run with `-snes_mf_operator`? RS already appears to support the option.<br>
> > > <br>
> > > This may not make sense. Is the operator used in the SS solution process derivable from the function that is being optimized with the constraints or some strange scaled beast?<br>
> > >> <br>
> > > <br>
> > <br>
> <br>
<br>
</blockquote></div>