<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><br>
      <pre class="moz-signature" cols="72">Thank you

Yours sincerely,

TAY wee-beng</pre>
      On 18/3/2014 3:07 PM, Matthew Knepley wrote:<br>
    </div>
    <blockquote
cite="mid:CAMYG4G=Fg5MCenXVKswnau=RXG_68Y=1+objwDnSZtxCSMzbXQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Tue, Mar 18, 2014 at 1:58 AM, TAY
            wee-beng <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div>Hi Barry,<br>
                  <br>
                  My command line is :<br>
                  <br>
                  mpiexec -np 46 ./a.out -options_left -poisson_ksp_view
                  -poisson_ksp_type gmres -poisson_pc_type hypre
                  -poisson_pc_type_hypre boomeramg > log<br>
                </div>
              </div>
            </blockquote>
            <div>                                                       
                                                                       
                                                                       
                                                   
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^</div>
            <div><br>
            </div>
            <div>  It should be  -pisson_pc_hypre_type boomeramg, but
              BoomerAMG is the default.</div>
            <div><br>
            </div>
            <div>    Matt</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    After using <br>
    <br>
    mpiexec -np 46 ./a-gmres.out -options_left -poisson_ksp_type gmres
    -poisson_pc_type hypre -poisson_pc_hypre_type boomeramg > log<br>
    <br>
     I still get:<br>
    <br>
    #PETSc Option Table entries:<br>
    -options_left<br>
    -poisson_ksp_type gmres<br>
    -poisson_pc_hypre_type boomeramg<br>
    -poisson_pc_type hypre<br>
    #End of PETSc Option Table entries<br>
    There is one unused database option. It is:<br>
    Option left: name:-poisson_pc_hypre_type value: boomeramg<br>
    <br>
    Did I missed out something?<br>
    ~<br>
    <blockquote
cite="mid:CAMYG4G=Fg5MCenXVKswnau=RXG_68Y=1+objwDnSZtxCSMzbXQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div> My result is :<br>
                  <br>
                  <i><b>KSP Object:(poisson_) 46 MPI processes<br>
                        type: gmres<br>
                          GMRES: restart=30, using Classical
                      (unmodified) Gram-Schmidt Orthogonalization with
                      no iterative refinement<br>
                          GMRES: happy breakdown tolerance 1e-30<br>
                        maximum iterations=10000, initial guess is zero<br>
                        tolerances:  relative=1e-05, absolute=1e-50,
                      divergence=10000<br>
                        left preconditioning<br>
                        using PRECONDITIONED norm type for convergence
                      test<br>
                      PC Object:(poisson_) 46 MPI processes<br>
                        type: hypre<br>
                          HYPRE BoomerAMG preconditioning<br>
                          HYPRE BoomerAMG: Cycle type V<br>
                          HYPRE BoomerAMG: Maximum number of levels 25<br>
                          HYPRE BoomerAMG: Maximum number of iterations
                      PER hypre call 1<br>
                          HYPRE BoomerAMG: Convergence tolerance PER
                      hypre call 0<br>
                          HYPRE BoomerAMG: Threshold for strong coupling
                      0.25<br>
                          HYPRE BoomerAMG: Interpolation truncation
                      factor 0<br>
                          HYPRE BoomerAMG: Interpolation: max elements
                      per row 0<br>
                          HYPRE BoomerAMG: Number of levels of
                      aggressive coarsening 0<br>
                          HYPRE BoomerAMG: Number of paths for
                      aggressive coarsening 1<br>
                          HYPRE BoomerAMG: Maximum row sums 0.9<br>
                          HYPRE BoomerAMG: Sweeps down         1<br>
                          HYPRE BoomerAMG: Sweeps up           1<br>
                          HYPRE BoomerAMG: Sweeps on coarse    1<br>
                          HYPRE BoomerAMG: Relax down         
                      symmetric-SOR/Jacobi<br>
                          HYPRE BoomerAMG: Relax up           
                      symmetric-SOR/Jacobi<br>
                          HYPRE BoomerAMG: Relax on coarse    
                      Gaussian-elimination<br>
                          HYPRE BoomerAMG: Relax weight  (all)      1<br>
                          HYPRE BoomerAMG: Outer relax weight (all) 1<br>
                          HYPRE BoomerAMG: Using CF-relaxation<br>
                          HYPRE BoomerAMG: Measure type        local<br>
                          HYPRE BoomerAMG: Coarsen type        Falgout<br>
                          HYPRE BoomerAMG: Interpolation type  classical<br>
                        linear system matrix = precond matrix:<br>
                        Matrix Object:   46 MPI processes<br>
                      ....<br>
                      <br>
                      ...<br>
                    </b></i><i><b>#PETSc Option Table entries:<br>
                      -options_left<br>
                      -poisson_ksp_type gmres<br>
                      -poisson_pc_type hypre<br>
                      -poisson_pc_type_hypre boomeramg<br>
                      #End of PETSc Option Table entries<br>
                      There is one unused database option. It is:<br>
                      Option left: name:-poisson_pc_type_hypre value:
                      boomeramg</b></i><br>
                  <br>
                  It seems that it is using boomeramg but why does it
                  say "one unused database option"?<br>
                  <br>
                  Did I do something wrong?<br>
                  <br>
                  Also if only my RHS of the Poisson eqn's changes, do I
                  set the ksp and pc once at the start? E.g. : <br>
                  <br>
                  call KSPSetType(ksp,ksptype,ierr)<br>
                  <br>
                  ksptype=KSPGMRES<br>
                  <br>
                  call PCSetType(pc,'hypre',ierr)<br>
                  <br>
                  call PCHYPREGetType(pc,'boomeramg',ierr)<br>
                  <br>
                  or do I have to do it at each time step?<br>
                  <pre cols="72">Thank you

Yours sincerely,

TAY wee-beng</pre>
                  On 18/3/2014 2:23 AM, Barry Smith wrote:<br>
                </div>
                <blockquote type="cite">
                  <pre> Yes. You can run with -poisson_ksp_view and -options_left to make sure the options you provide are actually used.

   Barry

On Mar 17, 2014, at 9:39 AM, TAY wee-beng <a moz-do-not-send="true" href="mailto:zonexo@gmail.com" target="_blank"><zonexo@gmail.com></a> wrote:

</pre>
                  <blockquote type="cite">
                    <pre>Hi,

I use

call KSPSetOptionsPrefix(ksp_semi_xyz,"momentum_",ierr)

and

call KSPSetOptionsPrefix(ksp,"poisson_",ierr)

so that I can choose separate ksp/pc options for my momentum and poisson equations through command line e.g.

-poisson_ksp_type gmres -poisson_pc_type hypre -poisson_pc_type_hypre boomeramg

In general, I need to use boomeramg as the preconditioner and gmres as the solver for my poisson eqn, separate from my momentum eqn, which has its own default pc and ksp. Is the above the correct way?

Thanks!

-- 
Yours sincerely,

TAY wee-beng

</pre>
                    <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
                  <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
                <br>
              </div>
            </blockquote>
          </div>
          <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
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>