[petsc-users] Hypre through Petsc: BoomerAMG options

Jed Brown jedbrown at mcs.anl.gov
Thu Aug 30 11:55:30 CDT 2012


On Thu, Aug 30, 2012 at 11:49 AM, Arun Kamath <arun.kamath.m at gmail.com>wrote:

> Ok.. but as I follow it up with :
> ierr=PCSetFromOptions(pc);
>         ierr=
> PetscOptionsSetValue("-pc_hypre_boomeramg_relax_type_all","0");
>  CHKERRQ(ierr); ,
>

You have to set the value _before_ calling PCSetFromOptions. Note that you
generally don't have to call PCSetFromOptions directly, just call
KSPSetFromOptions.


>
> on execution, the option is not recognized, as in:
>
> WARNING! There are options you set that were not used!
> WARNING! could be spelling mistake, etc!
> Option left: name:-pc_hypre_boomeramg_relax_type_all value: 0
>
> is returned.
>
> I used the value of zero to employ the Jacobi smoother defined in the
> Hypre Ref manual.
>

We think that cryptic non-sequential numbers are a terrible interface so
this option takes a string.

$ ./ex2 -pc_type hypre -help |grep relax_
  -pc_hypre_boomeramg_relax_type_all <symmetric-SOR/Jacobi> (choose one of)
Jacobi sequential-Gauss-Seidel seqboundary-Gauss-Seidel SOR/Jacobi
backward-SOR/Jacobi  symmetric-SOR/Jacobi  l1scaled-SOR/Jacobi
Gaussian-elimination (None)
  -pc_hypre_boomeramg_relax_type_down <symmetric-SOR/Jacobi> (choose one
of) Jacobi sequential-Gauss-Seidel seqboundary-Gauss-Seidel SOR/Jacobi
backward-SOR/Jacobi  symmetric-SOR/Jacobi  l1scaled-SOR/Jacobi
Gaussian-elimination (None)
  -pc_hypre_boomeramg_relax_type_up <symmetric-SOR/Jacobi> (choose one of)
Jacobi sequential-Gauss-Seidel seqboundary-Gauss-Seidel SOR/Jacobi
backward-SOR/Jacobi  symmetric-SOR/Jacobi  l1scaled-SOR/Jacobi
Gaussian-elimination (None)
  -pc_hypre_boomeramg_relax_type_coarse <Gaussian-elimination> (choose one
of) Jacobi sequential-Gauss-Seidel seqboundary-Gauss-Seidel SOR/Jacobi
backward-SOR/Jacobi  symmetric-SOR/Jacobi  l1scaled-SOR/Jacobi
Gaussian-elimination (None)
  -pc_hypre_boomeramg_relax_weight_all <1>: Relaxation weight for all
levels (0 = hypre estimates, -k = determined with k CG steps) (None)
  -pc_hypre_boomeramg_relax_weight_level <1>: Set the relaxation weight for
a particular level (weight,level) (None)
  -pc_hypre_boomeramg_outer_relax_weight_all <1>: Outer relaxation weight
for all levels ( -k = determined with k CG steps) (None)
  -pc_hypre_boomeramg_outer_relax_weight_level <1>: Set the outer
relaxation weight for a particular level (weight,level) (None)


>
> So could you please let me know what could I do make it work?
> (Since I want to access all solvers and options through a 'control'/
> 'config' file,


Why not put it all in an options file?


> I can't ask for the option at the the command prompt )
> Thanks.
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120830/6916bbc8/attachment.html>


More information about the petsc-users mailing list