<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 18, 2013 at 7:59 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>On Thu, Jul 18, 2013 at 12:51 PM, Bishesh Khanal <span dir="ltr"><<a href="mailto:bisheshkh@gmail.com" target="_blank">bisheshkh@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Thanks Jed. I implemented a 2D case which worked when running the program with the options: -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_detect_saddle_point<br>
</div>
But I encountered some problems when using following options (this set of options is based on one of the tutorial slides in the website for multiphysics problem):<br>
-ksp_type fgmres -pc_type mg -mg_levels_ksp_type fgmres -mg_levels_ksp_max_it 2 -mg_levels_pc_type fieldsplit -mg_levels_pc_fieldsplit_detect_saddle_point ‐mg_levels_pc_fieldsplit_type schur -mg_levels_pc_fieldsplit_factorization_type full -mg_levels_pc_fieldsplit_schur_precondition user -mg_levels_fieldsplit_0_ksp_type preonly -mg_levels_fieldsplit_0_pc_type sor -mg_levels_fieldsplit_0_pc_sor_forward -mg_levels_fieldsplit_0_ksp_type gmres -mg_levels_fieldsplit_0_pc_type none -mg_levels_fieldsplit_ksp_max_it 5 -mg_coarse_pc_type svd<br>
<br></div>The relevant error messages:<br>[1]PETSC ERROR: --------------------- Error Message ------------------------------------<br>[1]PETSC ERROR: Invalid argument!<br>[1]PETSC ERROR: Unknown logical value: ‐mg_levels_pc_fieldsplit_type!<br>
[1]PETSC ERROR: ------------------------------------------------------------------------<br>[1]PETSC ERROR: Petsc Release Version 3.4.1, Jun, 10, 2013 <br> ...<br>[1]PETSC ERROR: PetscOptionsStringToBool() line 173 in /home/bkhanal/Documents/softwares/petsc-3.4.1/src/sys/objects/options.c<br>
[1]PETSC ERROR: PetscOptionsGetBool() line 1530 in /home/bkhanal/Documents/softwares/petsc-3.4.1/src/sys/objects/options.c<br>[1]PETSC ERROR: PCSetFromOptions_FieldSplit() line 1060 in /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/pc/impls/fieldsplit/fieldsplit.c<br>
</div></div></div></div></div></blockquote><div><br></div></div><div>These line numbers do not match the source. How did you install?</div><div><br></div><div><a href="https://bitbucket.org/petsc/petsc/src/160ea6873d9fa631d01b6f8a2d8b12aece7dfb61/src/ksp/pc/impls/fieldsplit/fieldsplit.c?at=maint#cl-1060" target="_blank">https://bitbucket.org/petsc/petsc/src/160ea6873d9fa631d01b6f8a2d8b12aece7dfb61/src/ksp/pc/impls/fieldsplit/fieldsplit.c?at=maint#cl-1060</a><br>
</div><div><br></div></div></div></div></blockquote><div>I had installed it in pretty much a standard way: downloading the tarball from the petsc webpage, then using ./configure with a bunch of options.<br>I checked the fieldsplit.c file in my local installation, it seemed the difference to be in the first line. My local copy the code starts at 2nd line with first being just a newline unlike the one in bitbucket. <br>
</div><div>In any case, I tried to install a newer version: petsc-3.4.2 but I encountered some problems! I will send another email regarding installation issues at <a href="mailto:petsc-maint@mcs.anl.gov">petsc-maint@mcs.anl.gov</a> while keeping this thread intact for my stokes problem!<br>
</div><div>
<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div>
<div> Matt</div>
<div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<div><div><div><div>
[1]PETSC ERROR: PCSetFromOptions() line 174 in /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/pc/interface/pcset.c<br>[1]PETSC ERROR: KSPSetFromOptions() line 357 in /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/ksp/interface/itcl.c<br>
[1]PETSC ERROR: PCSetUp_MG() line 677 in /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/pc/impls/mg/mg.c<br>[1]PETSC ERROR: PCSetUp() line 890 in /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/pc/interface/precon.c<br>
[1]PETSC ERROR: KSPSetUp() line 278 in /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/ksp/interface/itfunc.c<br>...<br></div>And the warnings:<br><br>WARNING! There are options you set that were not used!<br>WARNING! could be spelling mistake, etc!<br>
Option left: name:-mg_coarse_pc_type value: svd<br>Option left: name:-mg_levels_fieldsplit_0_ksp_type value: gmres<br>Option left: name:-mg_levels_fieldsplit_0_pc_sor_forward (no value)<br>Option left: name:-mg_levels_fieldsplit_0_pc_type value: none<br>
Option left: name:-mg_levels_fieldsplit_ksp_max_it value: 5<br>Option left: name:-mg_levels_ksp_max_it value: 2<br>Option left: name:-mg_levels_ksp_type value: fgmres<br>Option left: name:-mg_levels_pc_fieldsplit_factorization_type value: full<br>
Option left: name:-mg_levels_pc_fieldsplit_schur_precondition value: user<br><br></div>Is it that -mg_levels_pc_fieldsplit_type should be followed by some "bool" value ? 1 ? true ? <br></div>I tried using "true", then it did not give any error but the following warnings:<br>
WARNING! There are options you set that were not used!<br>WARNING! could be spelling mistake, etc!<br>Option left: name:-mg_coarse_pc_type value: svd<br>Option left: name:-mg_levels_fieldsplit_0_pc_sor_forward (no value)<br>
Option left: name:-mg_levels_pc_fieldsplit_factorization_type value: full<br><br></div><div>I ran the program for the small size. Now, before I implement the 3D case with this approach instead of trying the implementation of Augmented Lagrangian method (M2 in previous email) my question is:<br>
</div><div>If I use the Petsc with the method you suggested (PCFieldSplit, multigrid for momentum etc), tentatively how much of computing resources and the corresponding time would it require to solve the problem of the size I want (around 250^3 grid sized domain) ?<br>
</div><div><div><div><div><div><br></div></div></div></div></div>
</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 17, 2013 at 9:48 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Bishesh Khanal <<a href="mailto:bisheshkh@gmail.com" target="_blank">bisheshkh@gmail.com</a>> writes:<br>
<br>
> Now, I implemented two different approaches, each for both 2D and 3D, in<br>
> MATLAB. It works for the smaller sizes but I have problems solving it for<br>
> the problem size I need (250^3 grid size).<br>
> I use staggered grid with p on cell centers, and components of v on cell<br>
> faces. Similar split up of K to cell center and faces to account for the<br>
> variable viscosity case)<br>
<br>
</div>Okay, you're using a staggered-grid finite difference discretization of<br>
variable-viscosity Stokes. This is a common problem and I recommend<br>
starting with PCFieldSplit with Schur complement reduction (make that<br>
work first, then switch to block preconditioner). You can use PCLSC or<br>
(probably better for you), assemble a preconditioning matrix containing<br>
the inverse viscosity in the pressure-pressure block. This diagonal<br>
matrix is a spectrally equivalent (or nearly so, depending on<br>
discretization) approximation of the Schur complement. The velocity<br>
block can be solved with algebraic multigrid. Read the PCFieldSplit<br>
docs (follow papers as appropriate) and let us know if you get stuck.<br>
</blockquote></div><br></div>
</div></div></blockquote></div></div></div><span><font color="#888888"><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
</font></span></div></div>
</blockquote></div><br></div></div>