<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 17, 2014 at 4:27 PM, Massimiliano Leoni <span dir="ltr"><<a href="mailto:leoni.massimiliano1@gmail.com" target="_blank">leoni.massimiliano1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi again,<br>
I've been experimenting further with fieldsplit, following your slides, but<br>
for some reason -pc_fieldsplit_type multiplicative and schur segfault at<br>
KSPSolve. Additive seems to work fine.<br></blockquote><div><br></div><div>It looks to me like you have memory corruption in a different part of the code. I</div><div>would build a debugging version, and consider running under valgrind.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I could not reproduce ex62 as in your slides because I don't have the header<br>
file and the script PetscGenerateFEMQuadrature.py, which I downloaded from the<br>
github repo, complains that PETSC.FEM module is missing, so I used my code,<br>
which is supopsd to assemble the same matrix, then I call KSPSetOperators with<br>
Stokes matrix as both the matrix and the preconditioner.<br></blockquote><div><br></div><div>That is no longer necessary. It just runs out of the box. The slides from SIAM CS&E 2013</div><div>show this. Here is a sample run</div><div><br></div><div> cd src/snes/examples/tutorials</div><div> make ex62</div><div> ./ex62 -run_type full -refinement_limit 0.00625 -bc_type dirichlet -interpolate 1 -vel_petscspace_order 2 -pres_petscspace_order 1 -ksp_type fgmres -ksp_gmres_restart 100 -ksp_rtol 1.0e-9 -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -fieldsplit_pressure_ksp_rtol 1e-10 -fieldsplit_velocity_ksp_type gmres -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type jacobi -snes_monitor_short -ksp_monitor_short -snes_converged_reason -ksp_converged_reason -snes_view -show_solution 0</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I use the same options as in slide 115, the "block jacobi, inexact" version<br>
works, while the "block Gauss-seidl, inexact" doesn't and segfaults.<br>
<br>
I attach backtrace and log files, according to what I was told last time.<br>
<br>
Thanks for any help,<br>
Massimiliano<br>
<br>
<br>
<br>
In data giovedì 13 novembre 2014 15:07:40, Massimiliano Leoni ha scritto:<br>
<div class=""><div class="h5">> In data giovedì 13 novembre 2014 06:39:38, Matthew Knepley ha scritto:<br>
> > On Thu, Nov 13, 2014 at 6:24 AM, Massimiliano Leoni <<br>
> ><br>
> > This is not exactly right because here you are just using additive<br>
> > fieldsplit.<br>
><br>
> AFAI understood from the user manual, this should be right because my<br>
> preconditioner is block diagonal, so I want to use block Jacobi.<br>
><br>
> If I used the other one, P = [[C,O],[B,Mp/nu]] then I would need a<br>
> multiplicative fieldsplit because this would be lower triangular.<br>
><br>
> Is this correct?<br>
><br>
> > The mass matrix<br>
> > is a good preconditioner for the Schur complement, not the zero matrix.<br>
><br>
> > Take a look at these slides:<br>
> What do you mean?<br>
> I know from theory that the preconditioner I am using is optimal [iteration<br>
> number independent of grid size].<br>
><br>
> I read the slides and the manual and the Schur complement is what I was<br>
> talking about earlier, so it's not what I wanna do now -- even though<br>
> knowing that it's so easy to implement my be very useful.<br>
><br>
> Anyway, thanks for the slides, they have been enlightening on the power of<br>
> command line options!<br>
><br>
> > Thanks,<br>
> ><br>
> > Matt<br>
><br>
> Thanks again,<br>
> Massimiliano<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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></div>