My settings are overriden when I call the solver more than once?
Sh.M
shma7099 at student.uu.se
Tue Apr 18 09:09:29 CDT 2006
Hi all,
I am solving a matrix with boomerAMG, and I set the boomerAMG settings
thru the console. The matrix(it is a preconditioner matrix) is solved
several times... I set the boomerAMG preconditioner/solver to have a
convergence tolerance of 1.0e-06 and max number of iterations 4. I print out boomerAMG status to
verify that it works as it should.. But for some reason it doesnt..
Here is a print from boomerAMG when it starts, I guess when it constructs
the boomerAMG solver/preconditioner:
.
.
.
.
.
.
BoomerAMG SOLVER PARAMETERS:
Maximum number of cycles: 4
Stopping Tolerance: 1.000000e-06
Cycle type (1 = V, 2 = W, etc.): 1
Relaxation Parameters:
Visiting Grid: fine down up coarse
Number of partial sweeps: 1 1 1 1
Type 0=Jac, 1=GS, 3=Hybrid 9=GE: 3 3 3 9
Point types, partial sweeps (1=C, -1=F):
Finest grid: 1 -1
Pre-CG relaxation (down): 1 -1
Post-CG relaxation (up): -1 1
Coarsest grid: 0
Immediately after the above message, wich is when it starts to
solve, it changes its parameters to this:
BoomerAMG SOLVER PARAMETERS:
Maximum number of cycles: 10000
Stopping Tolerance: 1.000000e-05
Cycle type (1 = V, 2 = W, etc.): 1
Relaxation Parameters:
Visiting Grid: fine down up coarse
Number of partial sweeps: 1 1 1 1
Type 0=Jac, 1=GS, 3=Hybrid 9=GE: 3 3 3 9
Point types, partial sweeps (1=C, -1=F):
Finest grid: 1 -1
Pre-CG relaxation (down): 1 -1
Post-CG relaxation (up): -1 1
Coarsest grid: 0
.
.
.
.
.
.
As you see my settings have been changed.
I have used boomerAMG in the past, not exactly this way.,... but my
settings were preserved before and after solve.
here is what I run from the command line:
mprun -np 1 petscSolver
-a ../hypre/data/nr_hvl40.csr
-b ../hypre/data/nr_hvl40.csr.blockMatrix -inner_ksp_type richardson
-inner_pc_type hypre -inner_pc_hypre_type boomeramg
-inner_pc_hypre_boomeramg_max_iter 4
-inner_pc_hypre_boomeramg_tol 1.0e-06
-ksp_monitor
-ksp_type gmres
-inner_pc_hypre_boomeramg_print_statistics
And a piece of code:
.
.
.
.
.
.
BLOCK_PC user_pc;
,
,
,
,
,
.
KSPSetOptionsPrefix(user_pc.block_solver,"inner_");
KSPSetOperators(user_pc.block_solver,user_pc.M,user_pc.M,DIFFERENT_NONZERO_PATTERN);
KSPSetFromOptions(user_pc.block_solver);
I am running on solaris64.
With best regards, Shaman Mahmoudi
More information about the petsc-users
mailing list