[petsc-users] AMG options

Jed Brown jedbrown at mcs.anl.gov
Wed Mar 14 05:21:51 CDT 2012


On Wed, Mar 14, 2012 at 04:00, Jarunan Panyasantisuk <jarunan at ascomp.ch>wrote:

> Dear PETSc team,
>
> I have a problem setting options for Hypre/BoomerAMG. I am trying to set
> these options in the code:
>
> 1 call PetscOptionsSetValue('-pc_**hypre_boomeramg_max_iter','0',**ierr)
> 2 call PetscOptionsSetValue('-pc_**hypre_boomeramg_coarsen_type',**
> 'HMIS',ierr)
> 3 call PetscOptionsSetValue('-pc_**hypre_boomeramg_interp_type','**
> ext+i',ierr)
> 4 call PetscOptionsSetValue('-pc_**hypre_boomeramg_P_max','4',**ierr)
> 5 call PetscOptionsSetValue('-pc_**hypre_boomeramg_strong_**
> threshold','4',ierr)
>
> The only option it takes is -pc_hypre_boomeramg_max_iter, the others
> appear as left over options at the end.


Are you sure there isn't an error raised and not checked? The options are
all checked in the same function, so there is no reason the latter ones
would not be reached.


> My questions are:
>
> - Can the options in line 2 to 5 used only on a specific architecture e.g.
> only on a cluster?
>

no


> - Is there a certain order in setting these options? Can I set it anywhere
> in my code e.g. after set -ksp_type?
>

You can set it anywhere before PCSetFromOptions() which is probably called
via KSPSetFromOptions or SNESSetFromOptions().


>
> The things I am trying to do is to reuse the solvers and preconditioners
> for several equations and reset only their solver/preconds type. If you
> have any advice, I would appreciate.
>

You are solving different equations several times and trying to reuse? Or
you are iterating on a nonlinear problem?


>
> Thank you in advance
> Jarunan
>
> --
> Development Engineer
>
> ASCOMP GmbH
> Technoparkstrasse 1
> Newton 1004
> 8005 Zurich
> Switzerland
> Tel: +41 44 445 4072
> Fax: +41 44 445 4075
> www.ascomp.ch
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120314/a11d65cf/attachment.htm>


More information about the petsc-users mailing list