Commits

Jed Brown  committed 9d1cdf7 Merge

Merge branch 'madams/gamg-params'

* madams/gamg-params:
PCGAMG: change default nsmooths, reuse_interpolation, threshold

  • Participants
  • Parent commits 6d86feb, d304261

Comments (0)

Files changed (10)

File src/ksp/ksp/examples/tutorials/makefile

         ${RM} -f ex55_nc.tmp
 
 runex56:
-	-@${MPIEXEC} -n 8 ./ex56 -ne 19 -alpha 1.e-3 -ksp_monitor_short -ksp_type cg -ksp_max_it 50 -pc_gamg_type agg -pc_gamg_agg_nsmooths 1 -ksp_converged_reason -pc_gamg_coarse_eq_limit 80 -mg_levels_ksp_type chebyshev -mg_levels_ksp_chebyshev_estimate_eigenvalues 0,0.05,0,1.05 -mg_levels_pc_type sor -two_solves > ex56.tmp 2>&1;	\
+	-@${MPIEXEC} -n 8 ./ex56 -ne 19 -alpha 1.e-3 -ksp_monitor_short -ksp_type cg -ksp_max_it 50 -pc_gamg_type agg -pc_gamg_agg_nsmooths 1 -ksp_converged_reason -pc_gamg_coarse_eq_limit 80 -mg_levels_ksp_type chebyshev -mg_levels_ksp_chebyshev_estimate_eigenvalues 0,0.05,0,1.05 -mg_levels_pc_type sor -pc_gamg_reuse_interpolation true -two_solves > ex56.tmp 2>&1;	\
          ${DIFF} output/ex56_0.out ex56.tmp || echo ${PWD} "\nPossible problem with with ex56_0, diffs above \n========================================="; \
          ${RM} -f ex56.tmp
 

File src/ksp/ksp/examples/tutorials/output/ex54_0.out

-  0 KSP Residual norm 181.32 
-  1 KSP Residual norm 40.516 
-  2 KSP Residual norm 16.9846 
-  3 KSP Residual norm 5.90382 
-  4 KSP Residual norm 19.2347 
-  5 KSP Residual norm 13.0841 
-  6 KSP Residual norm 2.99959 
-  7 KSP Residual norm 4.27637 
-  8 KSP Residual norm 1.5882 
-  9 KSP Residual norm 1.01821 
- 10 KSP Residual norm 1.10502 
- 11 KSP Residual norm 0.29595 
- 12 KSP Residual norm 0.463984 
- 13 KSP Residual norm 0.20812 
- 14 KSP Residual norm 0.158058 
- 15 KSP Residual norm 0.068802 
- 16 KSP Residual norm 0.034503 
- 17 KSP Residual norm 0.0245678 
- 18 KSP Residual norm 0.00665746 
- 19 KSP Residual norm 0.0030849 
- 20 KSP Residual norm 0.000697352 
-Linear solve converged due to CONVERGED_RTOL iterations 20
+  0 KSP Residual norm 180.962 
+  1 KSP Residual norm 36.2621 
+  2 KSP Residual norm 9.06976 
+  3 KSP Residual norm 4.86044 
+  4 KSP Residual norm 19.8152 
+  5 KSP Residual norm 16.5517 
+  6 KSP Residual norm 3.33064 
+  7 KSP Residual norm 4.94087 
+  8 KSP Residual norm 1.71298 
+  9 KSP Residual norm 0.860777 
+ 10 KSP Residual norm 0.827515 
+ 11 KSP Residual norm 0.150039 
+ 12 KSP Residual norm 0.156605 
+ 13 KSP Residual norm 0.0629658 
+ 14 KSP Residual norm 0.0843642 
+ 15 KSP Residual norm 0.0535627 
+ 16 KSP Residual norm 0.0360947 
+ 17 KSP Residual norm 0.0161437 
+ 18 KSP Residual norm 0.0108689 
+ 19 KSP Residual norm 0.00688926 
+ 20 KSP Residual norm 0.00205776 
+ 21 KSP Residual norm 0.00202925 
+ 22 KSP Residual norm 0.000300588 
+Linear solve converged due to CONVERGED_RTOL iterations 22

File src/ksp/ksp/examples/tutorials/output/ex54_1.out

-  0 KSP Residual norm 217.825 
-  1 KSP Residual norm 18.3174 
-  2 KSP Residual norm 2.00965 
-  3 KSP Residual norm 0.529392 
-  4 KSP Residual norm 0.0887107 
-  5 KSP Residual norm 0.0191943 
-  6 KSP Residual norm 0.00256854 
-  7 KSP Residual norm 0.000466701 
-Linear solve converged due to CONVERGED_RTOL iterations 7
+  0 KSP Residual norm 250.269 
+  1 KSP Residual norm 14.921 
+  2 KSP Residual norm 2.94386 
+  3 KSP Residual norm 0.482916 
+  4 KSP Residual norm 0.0445889 
+  5 KSP Residual norm 0.00730395 
+  6 KSP Residual norm 0.00182974 
+Linear solve converged due to CONVERGED_RTOL iterations 6

File src/ksp/ksp/examples/tutorials/output/ex54f.out

-[0]PCSetData_AGG bs=1 MM=900
-  0 KSP Residual norm 0.486425 
-  1 KSP Residual norm 0.167971 
-  2 KSP Residual norm 0.0890457 
-  3 KSP Residual norm 0.0570238 
-  4 KSP Residual norm 0.032837 
-  5 KSP Residual norm 0.0223567 
-  6 KSP Residual norm 0.013953 
-  7 KSP Residual norm 0.00754509 
-  8 KSP Residual norm 0.00346847 
-  9 KSP Residual norm 0.0015955 
- 10 KSP Residual norm 0.000709284 
- 11 KSP Residual norm 0.000325858 
- 12 KSP Residual norm 0.000210525 
- 13 KSP Residual norm 9.20184e-05 
- 14 KSP Residual norm 3.71927e-05 
- 15 KSP Residual norm 1.35942e-05 
- 16 KSP Residual norm 6.37022e-06 
- 17 KSP Residual norm 3.48672e-06 
-Linear solve converged due to CONVERGED_RTOL iterations 17
+  0 KSP Residual norm 0.634775 
+  1 KSP Residual norm 0.166627 
+  2 KSP Residual norm 0.108845 
+  3 KSP Residual norm 0.0343464 
+  4 KSP Residual norm 0.0160151 
+  5 KSP Residual norm 0.0101067 
+  6 KSP Residual norm 0.00643169 
+  7 KSP Residual norm 0.00384043 
+  8 KSP Residual norm 0.00221508 
+  9 KSP Residual norm 0.00098314 
+ 10 KSP Residual norm 0.000421273 
+ 11 KSP Residual norm 0.000220482 
+ 12 KSP Residual norm 0.000108133 
+ 13 KSP Residual norm 5.08173e-05 
+ 14 KSP Residual norm 2.272e-05 
+ 15 KSP Residual norm 9.83305e-06 
+ 16 KSP Residual norm 4.5623e-06 
+Linear solve converged due to CONVERGED_RTOL iterations 16

File src/ksp/ksp/examples/tutorials/output/ex55_0.out

-  0 KSP Residual norm 131.235 
-  1 KSP Residual norm 5.70654 
-  2 KSP Residual norm 10.4507 
-  3 KSP Residual norm 8.89916 
-  4 KSP Residual norm 11.4953 
-  5 KSP Residual norm 3.72858 
-  6 KSP Residual norm 2.68607 
-  7 KSP Residual norm 1.78774 
-  8 KSP Residual norm 1.27875 
-  9 KSP Residual norm 0.923381 
- 10 KSP Residual norm 0.362133 
- 11 KSP Residual norm 0.247936 
- 12 KSP Residual norm 0.0994672 
- 13 KSP Residual norm 0.0292956 
- 14 KSP Residual norm 0.0432483 
- 15 KSP Residual norm 0.00711726 
- 16 KSP Residual norm 0.00130645 
-Linear solve converged due to CONVERGED_RTOL iterations 16
+  0 KSP Residual norm 106.186 
+  1 KSP Residual norm 7.75835 
+  2 KSP Residual norm 8.78689 
+  3 KSP Residual norm 15.384 
+  4 KSP Residual norm 11.4411 
+  5 KSP Residual norm 11.1203 
+  6 KSP Residual norm 1.78931 
+  7 KSP Residual norm 2.53305 
+  8 KSP Residual norm 1.05452 
+  9 KSP Residual norm 1.02416 
+ 10 KSP Residual norm 0.82252 
+ 11 KSP Residual norm 0.4311 
+ 12 KSP Residual norm 0.432112 
+ 13 KSP Residual norm 0.282165 
+ 14 KSP Residual norm 0.117272 
+ 15 KSP Residual norm 0.0420368 
+ 16 KSP Residual norm 0.0316781 
+ 17 KSP Residual norm 0.0133667 
+ 18 KSP Residual norm 0.00955978 
+ 19 KSP Residual norm 0.00410897 
+ 20 KSP Residual norm 0.00129763 
+ 21 KSP Residual norm 0.000862025 
+Linear solve converged due to CONVERGED_RTOL iterations 21

File src/ksp/ksp/examples/tutorials/output/ex55_NC.out

-[0]PCSetData_AGG bs=2 MM=450
-  0 KSP Residual norm 88.273 
-  1 KSP Residual norm 16.6255 
-  2 KSP Residual norm 19.4732 
-  3 KSP Residual norm 10.5871 
-  4 KSP Residual norm 4.37733 
-  5 KSP Residual norm 2.65701 
-  6 KSP Residual norm 1.55471 
-  7 KSP Residual norm 0.591864 
-  8 KSP Residual norm 0.435847 
-  9 KSP Residual norm 0.251391 
- 10 KSP Residual norm 0.0639263 
- 11 KSP Residual norm 0.0324393 
- 12 KSP Residual norm 0.00648073 
- 13 KSP Residual norm 0.00214803 
- 14 KSP Residual norm 0.000646423 
-Linear solve converged due to CONVERGED_RTOL iterations 14
+  0 KSP Residual norm 91.4782 
+  1 KSP Residual norm 15.0674 
+  2 KSP Residual norm 19.1468 
+  3 KSP Residual norm 9.75197 
+  4 KSP Residual norm 4.02956 
+  5 KSP Residual norm 2.16479 
+  6 KSP Residual norm 1.02271 
+  7 KSP Residual norm 0.312731 
+  8 KSP Residual norm 0.1328 
+  9 KSP Residual norm 0.0946056 
+ 10 KSP Residual norm 0.0302418 
+ 11 KSP Residual norm 0.022488 
+ 12 KSP Residual norm 0.00713725 
+ 13 KSP Residual norm 0.00513686 
+ 14 KSP Residual norm 0.00136275 
+ 15 KSP Residual norm 0.000690562 
+Linear solve converged due to CONVERGED_RTOL iterations 15

File src/ksp/ksp/examples/tutorials/output/ex55_sa.out

-  0 KSP Residual norm 104.382 
-  1 KSP Residual norm 20.4822 
-  2 KSP Residual norm 13.1336 
-  3 KSP Residual norm 3.402 
-  4 KSP Residual norm 0.959145 
-  5 KSP Residual norm 0.412663 
-  6 KSP Residual norm 0.0739834 
-  7 KSP Residual norm 0.0181257 
-  8 KSP Residual norm 0.00709681 
-  9 KSP Residual norm 0.00120422 
- 10 KSP Residual norm 0.000437551 
+  0 KSP Residual norm 125.473 
+  1 KSP Residual norm 10.7937 
+  2 KSP Residual norm 4.54808 
+  3 KSP Residual norm 0.898874 
+  4 KSP Residual norm 0.395551 
+  5 KSP Residual norm 0.185043 
+  6 KSP Residual norm 0.0521496 
+  7 KSP Residual norm 0.0150648 
+  8 KSP Residual norm 0.006937 
+  9 KSP Residual norm 0.00222066 
+ 10 KSP Residual norm 0.000765843 
 Linear solve converged due to CONVERGED_RTOL iterations 10

File src/ksp/ksp/examples/tutorials/output/ex56_0.out

-  0 KSP Residual norm 2885.15 
-  1 KSP Residual norm 1565.14 
-  2 KSP Residual norm 305.339 
-  3 KSP Residual norm 202.645 
-  4 KSP Residual norm 35.6557 
-  5 KSP Residual norm 10.2921 
-  6 KSP Residual norm 4.5538 
-  7 KSP Residual norm 2.11443 
-  8 KSP Residual norm 1.1013 
-  9 KSP Residual norm 0.148797 
- 10 KSP Residual norm 0.0319475 
- 11 KSP Residual norm 0.00425079 
+  0 KSP Residual norm 2875.64 
+  1 KSP Residual norm 1577.18 
+  2 KSP Residual norm 306.851 
+  3 KSP Residual norm 202.227 
+  4 KSP Residual norm 37.097 
+  5 KSP Residual norm 10.5634 
+  6 KSP Residual norm 4.44335 
+  7 KSP Residual norm 2.13206 
+  8 KSP Residual norm 1.11634 
+  9 KSP Residual norm 0.15782 
+ 10 KSP Residual norm 0.0335148 
+ 11 KSP Residual norm 0.00446183 
 Linear solve converged due to CONVERGED_RTOL iterations 11
-  0 KSP Residual norm 0.0288515 
-  1 KSP Residual norm 0.0156514 
-  2 KSP Residual norm 0.00305339 
-  3 KSP Residual norm 0.00202645 
-  4 KSP Residual norm 0.000356557 
-  5 KSP Residual norm 0.000102921 
-  6 KSP Residual norm 4.5538e-05 
-  7 KSP Residual norm 2.11443e-05 
-  8 KSP Residual norm 1.1013e-05 
-  9 KSP Residual norm 1.48797e-06 
- 10 KSP Residual norm 3.19475e-07 
- 11 KSP Residual norm 4.25079e-08 
+  0 KSP Residual norm 0.0287564 
+  1 KSP Residual norm 0.0157718 
+  2 KSP Residual norm 0.00306851 
+  3 KSP Residual norm 0.00202227 
+  4 KSP Residual norm 0.00037097 
+  5 KSP Residual norm 0.000105634 
+  6 KSP Residual norm 4.44335e-05 
+  7 KSP Residual norm 2.13206e-05 
+  8 KSP Residual norm 1.11634e-05 
+  9 KSP Residual norm 1.5782e-06 
+ 10 KSP Residual norm 3.35148e-07 
+ 11 KSP Residual norm 4.46183e-08 
 Linear solve converged due to CONVERGED_RTOL iterations 11
-  0 KSP Residual norm 2.88515e-07 
-  1 KSP Residual norm 1.56514e-07 
-  2 KSP Residual norm 3.05339e-08 
-  3 KSP Residual norm 2.02645e-08 
-  4 KSP Residual norm 3.56557e-09 
-  5 KSP Residual norm 1.02921e-09 
-  6 KSP Residual norm 4.554e-10 
-  7 KSP Residual norm 2.114e-10 
-  8 KSP Residual norm 1.101e-10 
-  9 KSP Residual norm 1.488e-11 
+  0 KSP Residual norm 2.87564e-07 
+  1 KSP Residual norm 1.57718e-07 
+  2 KSP Residual norm 3.06851e-08 
+  3 KSP Residual norm 2.02227e-08 
+  4 KSP Residual norm 3.7097e-09 
+  5 KSP Residual norm 1.05634e-09 
+  6 KSP Residual norm 4.443e-10 
+  7 KSP Residual norm 2.132e-10 
+  8 KSP Residual norm 1.116e-10 
+  9 KSP Residual norm 1.578e-11 
  10 KSP Residual norm < 1.e-11
  11 KSP Residual norm < 1.e-11
 Linear solve converged due to CONVERGED_RTOL iterations 11
-[0]main |b-Ax|/|b|=4.613898e-05, |b|=3.916255e+00, emax=9.967540e-01
+[0]main |b-Ax|/|b|=4.735376e-05, |b|=3.916255e+00, emax=9.967578e-01

File src/ksp/pc/impls/gamg/agg.c

   ierr = PetscOptionsHead("GAMG-AGG options");CHKERRQ(ierr);
   {
     /* -pc_gamg_agg_nsmooths */
-    pc_gamg_agg->nsmooths = 0;
+    pc_gamg_agg->nsmooths = 1;
 
     ierr = PetscOptionsInt("-pc_gamg_agg_nsmooths",
                            "smoothing steps for smoothed aggregation, usually 1 (0)",

File src/ksp/pc/impls/gamg/gamg.c

   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCGAMGSetType_C",PCGAMGSetType_GAMG);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCGAMGSetNlevels_C",PCGAMGSetNlevels_GAMG);CHKERRQ(ierr);
   pc_gamg->repart           = PETSC_FALSE;
-  pc_gamg->reuse_prol       = PETSC_TRUE;
+  pc_gamg->reuse_prol       = PETSC_FALSE;
   pc_gamg->use_aggs_in_gasm = PETSC_FALSE;
   pc_gamg->min_eq_proc      = 50;
   pc_gamg->coarse_eq_limit  = 800;
-  pc_gamg->threshold        = 0.001;
+  pc_gamg->threshold        = 0.;
   pc_gamg->Nlevels          = GAMG_MAXLEVELS;
   pc_gamg->verbose          = 0;
   pc_gamg->emax_id          = -1;