From: Dmitry K. <ka...@mc...> - 2013-12-10 16:04:59
|
Note that your "JFNK" is actually preconditioned by ILU(0) (and accelerated by GMRES(30)), which is the default. These results look more or less correct, but the problem here is small, of course. Dmitry. On Tue, Dec 10, 2013 at 9:58 AM, Lorenzo Zanon <za...@ai...>wrote: > Hi, > > After re-installing petsc with Hypre should I recompile libmesh as well? > > Otherwise here are the detailed outputs (JFNK, LU, and -ksp_rtol 1e-4): > > ./example-opt -ksp_monitor -snes_view -snes_linesearch_type basic > -snes_mf_operator > > Mesh Information: > > mesh_dimension()=3 > > spatial_dimension()=3 > > n_nodes()=66 > > n_local_nodes()=66 > > n_elem()=20 > > n_local_elem()=20 > > n_active_elem()=20 > > n_subdomains()=1 > > n_partitions()=1 > > n_processors()=1 > > n_threads()=1 > > processor_id()=0 > > > EquationSystems > > n_systems()=1 > > System #0, "StVen" > > Type "NonlinearImplicit" > > Variables={ "u" "v" "z" } > > Finite Element Types="LAGRANGE" > > Approximation Orders="FIRST" > > n_dofs()=198 > > n_local_dofs()=198 > > n_constrained_dofs()=18 > > n_local_constrained_dofs()=18 > > n_vectors()=1 > > n_matrices()=1 > > DofMap Sparsity > > Average On-Processor Bandwidth <= 39.4545 > > Average Off-Processor Bandwidth <= 0 > > Maximum On-Processor Bandwidth <= 54 > > Maximum Off-Processor Bandwidth <= 0 > > DofMap Constraints > > Number of DoF Constraints = 18 > > Average DoF Constraint Length= 0 > > > NL step 0, |residual|_2 = 3.464102e-05 > 0 KSP Residual norm 3.212616421517e-03 > 1 KSP Residual norm 1.120398546137e-03 > 2 KSP Residual norm 9.967109207349e-04 > 3 KSP Residual norm 8.458532905819e-04 > 4 KSP Residual norm 7.728810753960e-04 > 5 KSP Residual norm 6.732172142339e-04 > 6 KSP Residual norm 6.576344248200e-04 > 7 KSP Residual norm 6.402094443503e-04 > 8 KSP Residual norm 6.385715679145e-04 > 9 KSP Residual norm 6.174418902540e-04 > 10 KSP Residual norm 6.152538108126e-04 > 11 KSP Residual norm 5.648590825480e-04 > 12 KSP Residual norm 4.481934208276e-04 > 13 KSP Residual norm 3.306530303084e-04 > 14 KSP Residual norm 2.690188849592e-04 > 15 KSP Residual norm 2.386473964271e-04 > 16 KSP Residual norm 2.141977103061e-04 > 17 KSP Residual norm 2.102327000179e-04 > 18 KSP Residual norm 2.078228954218e-04 > 19 KSP Residual norm 2.067071644725e-04 > 20 KSP Residual norm 1.615255528200e-04 > 21 KSP Residual norm 1.540580333282e-04 > 22 KSP Residual norm 1.276535406372e-04 > 23 KSP Residual norm 8.957902207289e-05 > 24 KSP Residual norm 1.443181175234e-05 > 25 KSP Residual norm 2.250542927482e-06 > 26 KSP Residual norm 2.917199065518e-07 > 27 KSP Residual norm 5.868687294700e-08 > 28 KSP Residual norm 8.654056711463e-09 > NL step 1, |residual|_2 = 2.417677e-04 > 0 KSP Residual norm 1.333298301871e-03 > 1 KSP Residual norm 3.805511680517e-04 > 2 KSP Residual norm 2.446787831803e-04 > 3 KSP Residual norm 1.681749772700e-04 > 4 KSP Residual norm 7.788563572601e-05 > 5 KSP Residual norm 1.464482225979e-05 > 6 KSP Residual norm 5.794628981655e-06 > 7 KSP Residual norm 5.031264536697e-06 > 8 KSP Residual norm 4.237830295237e-06 > 9 KSP Residual norm 2.682645862853e-06 > 10 KSP Residual norm 2.375434440801e-06 > 11 KSP Residual norm 2.250452181271e-06 > 12 KSP Residual norm 2.156206443150e-06 > 13 KSP Residual norm 2.095121298242e-06 > 14 KSP Residual norm 1.980586518083e-06 > 15 KSP Residual norm 1.827706054190e-06 > 16 KSP Residual norm 1.742266192586e-06 > 17 KSP Residual norm 1.538312528876e-06 > 18 KSP Residual norm 1.199164155173e-06 > 19 KSP Residual norm 8.927456022436e-07 > 20 KSP Residual norm 8.540488238927e-07 > 21 KSP Residual norm 7.218672557993e-07 > 22 KSP Residual norm 6.020750075600e-07 > 23 KSP Residual norm 5.956106102175e-07 > 24 KSP Residual norm 5.933201825052e-07 > 25 KSP Residual norm 5.278644490862e-07 > 26 KSP Residual norm 2.779283164872e-07 > 27 KSP Residual norm 6.009106355990e-08 > 28 KSP Residual norm 8.312066698183e-09 > NL step 2, |residual|_2 = 6.140305e-08 > 0 KSP Residual norm 4.390107230670e-07 > 1 KSP Residual norm 1.138843333125e-07 > 2 KSP Residual norm 6.427890600369e-08 > 3 KSP Residual norm 4.348970873891e-08 > 4 KSP Residual norm 2.561129926398e-08 > 5 KSP Residual norm 5.759441641679e-09 > 6 KSP Residual norm 2.701120082990e-09 > 7 KSP Residual norm 2.417238064221e-09 > 8 KSP Residual norm 2.135376110595e-09 > 9 KSP Residual norm 1.466188791935e-09 > 10 KSP Residual norm 1.357982217314e-09 > 11 KSP Residual norm 1.301823008121e-09 > 12 KSP Residual norm 1.251207827778e-09 > 13 KSP Residual norm 1.204174220396e-09 > 14 KSP Residual norm 1.144205363644e-09 > 15 KSP Residual norm 1.012225508386e-09 > 16 KSP Residual norm 9.533558540986e-10 > 17 KSP Residual norm 7.230784655660e-10 > 18 KSP Residual norm 5.085255142266e-10 > 19 KSP Residual norm 3.699847452492e-10 > 20 KSP Residual norm 3.594140312284e-10 > 21 KSP Residual norm 3.309231358833e-10 > 22 KSP Residual norm 2.860867684103e-10 > 23 KSP Residual norm 2.771853680698e-10 > 24 KSP Residual norm 2.694125344509e-10 > 25 KSP Residual norm 2.563090739856e-10 > 26 KSP Residual norm 1.544862362579e-10 > 27 KSP Residual norm 3.311660568011e-11 > 28 KSP Residual norm 3.523137533760e-12 > NL step 3, |residual|_2 = 5.398475e-13 > 0 KSP Residual norm 3.527919605631e-12 > 1 KSP Residual norm 1.035019989012e-12 > 2 KSP Residual norm 6.009753897451e-13 > 3 KSP Residual norm 4.354234754168e-13 > 4 KSP Residual norm 3.700520049204e-13 > 5 KSP Residual norm 1.460949780703e-13 > 6 KSP Residual norm 1.215630756367e-13 > 7 KSP Residual norm 1.062246593852e-13 > 8 KSP Residual norm 1.035560212385e-13 > 9 KSP Residual norm 1.017999906257e-13 > 10 KSP Residual norm 9.708750446312e-14 > 11 KSP Residual norm 8.902194111738e-14 > 12 KSP Residual norm 8.732231468356e-14 > 13 KSP Residual norm 8.612874746485e-14 > 14 KSP Residual norm 6.378879032596e-14 > 15 KSP Residual norm 4.844926458163e-14 > 16 KSP Residual norm 4.284448730212e-14 > 17 KSP Residual norm 3.156887391113e-14 > 18 KSP Residual norm 2.894109138972e-14 > 19 KSP Residual norm 2.675644914103e-14 > 20 KSP Residual norm 2.671536420686e-14 > 21 KSP Residual norm 2.387772122441e-14 > 22 KSP Residual norm 2.385094486768e-14 > 23 KSP Residual norm 2.219324945722e-14 > 24 KSP Residual norm 1.908246749210e-14 > 25 KSP Residual norm 1.099315364082e-14 > 26 KSP Residual norm 3.272321755177e-15 > 27 KSP Residual norm 5.083777840482e-16 > 28 KSP Residual norm 8.109062749581e-17 > 29 KSP Residual norm 9.301844195943e-18 > NL step 4, |residual|_2 = 9.259267e-18 > SNES Object: 1 MPI processes > type: newtonls > maximum iterations=50, maximum function evaluations=10000 > tolerances: relative=1e-08, absolute=1e-35, solution=1e-08 > total number of linear solver iterations=113 > total number of function evaluations=118 > SNESLineSearch Object: 1 MPI processes > type: basic > maxstep=1.000000e+08, minlambda=1.000000e-12 > tolerances: relative=1.000000e-08, absolute=1.000000e-15, > lambda=1.000000e-08 > maximum iterations=40 > KSP Object: 1 MPI processes > type: gmres > GMRES: restart=30, using Classical (unmodified) Gram-Schmidt > Orthogonalization with no iterative refinement > GMRES: happy breakdown tolerance 1e-30 > maximum iterations=10000, initial guess is zero > tolerances: relative=1e-05, absolute=1e-50, divergence=10000 > left preconditioning > using PRECONDITIONED norm type for convergence test > PC Object: 1 MPI processes > type: ilu > ILU: out-of-place factorization > 0 levels of fill > tolerance for zero pivot 2.22045e-14 > using diagonal shift on blocks to prevent zero pivot [INBLOCKS] > matrix ordering: natural > factor fill ratio given 1, needed 1 > Factored matrix follows: > Matrix Object: 1 MPI processes > type: seqaij > rows=198, cols=198 > package used to perform factorization: petsc > total: nonzeros=7812, allocated nonzeros=7812 > total number of mallocs used during MatSetValues calls =0 > using I-node routines: found 66 nodes, limit used is 5 > linear system matrix followed by preconditioner matrix: > Matrix Object: 1 MPI processes > type: mffd > rows=198, cols=198 > Matrix-free approximation: > err=1.49012e-08 (relative error in function evaluation) > Using wp compute h routine > Does not compute normU > Matrix Object: () 1 MPI processes > type: seqaij > rows=198, cols=198 > total: nonzeros=7812, allocated nonzeros=7812 > total number of mallocs used during MatSetValues calls =0 > using I-node routines: found 66 nodes, limit used is 5 > StVen system solved at nonlinear iteration 4 , final nonlinear residual > norm: 9.259267e-18 > > > ./example-opt -ksp_monitor -snes_view -snes_linesearch_type basic -pc_type > lu > NL step 0, |residual|_2 = 3.464102e-05 > 0 KSP Residual norm 2.935224615808e-01 > 1 KSP Residual norm 1.520331233634e-14 > NL step 1, |residual|_2 = 2.417676e-04 > 0 KSP Residual norm 2.278956475389e-03 > 1 KSP Residual norm 2.012171403392e-16 > NL step 2, |residual|_2 = 6.144363e-08 > 0 KSP Residual norm 7.461774437599e-07 > 1 KSP Residual norm 7.509596943461e-21 > NL step 3, |residual|_2 = 8.023655e-15 > SNES Object: 1 MPI processes > type: newtonls > maximum iterations=50, maximum function evaluations=10000 > tolerances: relative=1e-08, absolute=1e-35, solution=1e-08 > total number of linear solver iterations=3 > total number of function evaluations=4 > SNESLineSearch Object: 1 MPI processes > type: basic > maxstep=1.000000e+08, minlambda=1.000000e-12 > tolerances: relative=1.000000e-08, absolute=1.000000e-15, > lambda=1.000000e-08 > maximum iterations=40 > KSP Object: 1 MPI processes > type: gmres > GMRES: restart=30, using Classical (unmodified) Gram-Schmidt > Orthogonalization with no iterative refinement > GMRES: happy breakdown tolerance 1e-30 > maximum iterations=10000, initial guess is zero > tolerances: relative=1e-05, absolute=1e-50, divergence=10000 > left preconditioning > using PRECONDITIONED norm type for convergence test > PC Object: 1 MPI processes > type: lu > LU: out-of-place factorization > tolerance for zero pivot 2.22045e-14 > matrix ordering: nd > factor fill ratio given 5, needed 1.46083 > Factored matrix follows: > Matrix Object: 1 MPI processes > type: seqaij > rows=198, cols=198 > package used to perform factorization: petsc > total: nonzeros=11412, allocated nonzeros=11412 > total number of mallocs used during MatSetValues calls =0 > using I-node routines: found 60 nodes, limit used is 5 > linear system matrix = precond matrix: > Matrix Object: () 1 MPI processes > type: seqaij > rows=198, cols=198 > total: nonzeros=7812, allocated nonzeros=7812 > total number of mallocs used during MatSetValues calls =0 > using I-node routines: found 66 nodes, limit used is 5 > StVen system solved at nonlinear iteration 3 , final nonlinear residual > norm: 8.023655e-15 > > > ./example-opt -ksp_monitor -snes_view -snes_linesearch_type basic > -ksp_rtol 1e-4 > NL step 0, |residual|_2 = 3.464102e-05 > 0 KSP Residual norm 3.212616421517e-03 > 1 KSP Residual norm 1.120398547109e-03 > 2 KSP Residual norm 9.967109218543e-04 > 3 KSP Residual norm 8.458532936948e-04 > 4 KSP Residual norm 7.728810766578e-04 > 5 KSP Residual norm 6.732172176276e-04 > 6 KSP Residual norm 6.576344282958e-04 > 7 KSP Residual norm 6.402094485036e-04 > 8 KSP Residual norm 6.385715720308e-04 > 9 KSP Residual norm 6.174418951196e-04 > 10 KSP Residual norm 6.152538158701e-04 > 11 KSP Residual norm 5.648590869377e-04 > 12 KSP Residual norm 4.481934266021e-04 > 13 KSP Residual norm 3.306530506113e-04 > 14 KSP Residual norm 2.690188953869e-04 > 15 KSP Residual norm 2.386474000359e-04 > 16 KSP Residual norm 2.141977071264e-04 > 17 KSP Residual norm 2.102326932511e-04 > 18 KSP Residual norm 2.078228882501e-04 > 19 KSP Residual norm 2.067071553192e-04 > 20 KSP Residual norm 1.615255475939e-04 > 21 KSP Residual norm 1.540580334921e-04 > 22 KSP Residual norm 1.276535440255e-04 > 23 KSP Residual norm 8.957903046652e-05 > 24 KSP Residual norm 1.443181315137e-05 > 25 KSP Residual norm 2.250543102652e-06 > 26 KSP Residual norm 2.917198939738e-07 > NL step 1, |residual|_2 = 2.417591e-04 > 0 KSP Residual norm 1.333235985406e-03 > 1 KSP Residual norm 3.805281509852e-04 > 2 KSP Residual norm 2.446722664627e-04 > 3 KSP Residual norm 1.681792936293e-04 > 4 KSP Residual norm 7.787501844281e-05 > 5 KSP Residual norm 1.465542127151e-05 > 6 KSP Residual norm 5.801751298083e-06 > 7 KSP Residual norm 5.035187876534e-06 > 8 KSP Residual norm 4.243969045328e-06 > 9 KSP Residual norm 2.680601029765e-06 > 10 KSP Residual norm 2.377737099944e-06 > 11 KSP Residual norm 2.256889739176e-06 > 12 KSP Residual norm 2.166393508350e-06 > 13 KSP Residual norm 2.105104317769e-06 > 14 KSP Residual norm 1.986592043870e-06 > 15 KSP Residual norm 1.828530134293e-06 > 16 KSP Residual norm 1.740656911937e-06 > 17 KSP Residual norm 1.530055724199e-06 > 18 KSP Residual norm 1.188818442952e-06 > 19 KSP Residual norm 8.844867349262e-07 > 20 KSP Residual norm 8.457155647014e-07 > 21 KSP Residual norm 7.160503850340e-07 > 22 KSP Residual norm 5.986449996924e-07 > 23 KSP Residual norm 5.922449520540e-07 > 24 KSP Residual norm 5.898790177982e-07 > 25 KSP Residual norm 5.230405076245e-07 > 26 KSP Residual norm 2.745262903799e-07 > 27 KSP Residual norm 5.996929540573e-08 > NL step 2, |residual|_2 = 6.148539e-08 > 0 KSP Residual norm 4.438065916788e-07 > 1 KSP Residual norm 1.102546762523e-07 > 2 KSP Residual norm 6.101658503721e-08 > 3 KSP Residual norm 3.892043542473e-08 > 4 KSP Residual norm 2.545607584015e-08 > 5 KSP Residual norm 9.185586325846e-09 > 6 KSP Residual norm 8.120407917835e-09 > 7 KSP Residual norm 7.332797232974e-09 > 8 KSP Residual norm 6.897524298169e-09 > 9 KSP Residual norm 6.721797058447e-09 > 10 KSP Residual norm 6.081332952767e-09 > 11 KSP Residual norm 5.925983333102e-09 > 12 KSP Residual norm 5.763399321322e-09 > 13 KSP Residual norm 5.658798569415e-09 > 14 KSP Residual norm 4.380899459878e-09 > 15 KSP Residual norm 2.987907429703e-09 > 16 KSP Residual norm 2.602849823313e-09 > 17 KSP Residual norm 2.007859106166e-09 > 18 KSP Residual norm 1.774356855215e-09 > 19 KSP Residual norm 1.661785774521e-09 > 20 KSP Residual norm 1.643287316539e-09 > 21 KSP Residual norm 1.623622276146e-09 > 22 KSP Residual norm 1.418446600745e-09 > 23 KSP Residual norm 9.304700213186e-10 > 24 KSP Residual norm 7.851391468968e-10 > 25 KSP Residual norm 6.782990472312e-10 > 26 KSP Residual norm 2.542603600685e-10 > 27 KSP Residual norm 4.401858002395e-11 > NL step 3, |residual|_2 = 6.398663e-12 > 0 KSP Residual norm 4.401758090986e-11 > 1 KSP Residual norm 2.391541512835e-11 > 2 KSP Residual norm 1.514835448920e-11 > 3 KSP Residual norm 1.411430736978e-11 > 4 KSP Residual norm 1.082077200496e-11 > 5 KSP Residual norm 9.816569497836e-12 > 6 KSP Residual norm 9.370398483665e-12 > 7 KSP Residual norm 9.349907985279e-12 > 8 KSP Residual norm 8.045346126569e-12 > 9 KSP Residual norm 8.045331126452e-12 > 10 KSP Residual norm 7.579815591644e-12 > 11 KSP Residual norm 7.284737582076e-12 > 12 KSP Residual norm 6.783775150066e-12 > 13 KSP Residual norm 4.639846079482e-12 > 14 KSP Residual norm 3.135294994089e-12 > 15 KSP Residual norm 1.805256047778e-12 > 16 KSP Residual norm 1.520281278758e-12 > 17 KSP Residual norm 1.308568574591e-12 > 18 KSP Residual norm 1.230713382323e-12 > 19 KSP Residual norm 1.226915989003e-12 > 20 KSP Residual norm 1.216457811750e-12 > 21 KSP Residual norm 1.121219956880e-12 > 22 KSP Residual norm 1.108526048419e-12 > 23 KSP Residual norm 1.058254737633e-12 > 24 KSP Residual norm 5.776165288887e-13 > 25 KSP Residual norm 1.430593479447e-13 > 26 KSP Residual norm 3.256387223302e-14 > 27 KSP Residual norm 5.110458721876e-15 > 28 KSP Residual norm 9.573578653622e-16 > NL step 4, |residual|_2 = 1.376115e-16 > SNES Object: 1 MPI processes > type: newtonls > maximum iterations=50, maximum function evaluations=10000 > tolerances: relative=1e-08, absolute=1e-35, solution=1e-08 > total number of linear solver iterations=108 > total number of function evaluations=5 > SNESLineSearch Object: 1 MPI processes > type: basic > maxstep=1.000000e+08, minlambda=1.000000e-12 > tolerances: relative=1.000000e-08, absolute=1.000000e-15, > lambda=1.000000e-08 > maximum iterations=40 > KSP Object: 1 MPI processes > type: gmres > GMRES: restart=30, using Classical (unmodified) Gram-Schmidt > Orthogonalization with no iterative refinement > GMRES: happy breakdown tolerance 1e-30 > maximum iterations=10000, initial guess is zero > tolerances: relative=0.0001, absolute=1e-50, divergence=10000 > left preconditioning > using PRECONDITIONED norm type for convergence test > PC Object: 1 MPI processes > type: ilu > ILU: out-of-place factorization > 0 levels of fill > tolerance for zero pivot 2.22045e-14 > using diagonal shift on blocks to prevent zero pivot [INBLOCKS] > matrix ordering: natural > factor fill ratio given 1, needed 1 > Factored matrix follows: > Matrix Object: 1 MPI processes > type: seqaij > rows=198, cols=198 > package used to perform factorization: petsc > total: nonzeros=7812, allocated nonzeros=7812 > total number of mallocs used during MatSetValues calls =0 > using I-node routines: found 66 nodes, limit used is 5 > linear system matrix = precond matrix: > Matrix Object: () 1 MPI processes > type: seqaij > rows=198, cols=198 > total: nonzeros=7812, allocated nonzeros=7812 > total number of mallocs used during MatSetValues calls =0 > using I-node routines: found 66 nodes, limit used is 5 > StVen system solved at nonlinear iteration 4 , final nonlinear residual > norm: 1.376115e-16 > > > On Dec 9, 2013, at 11:03 PM, Dmitry Karpeyev wrote: > > Please, include -snes_view so that we can see exactly what solver options > are being used. > Dmitry. > > > On Mon, Dec 9, 2013 at 12:48 PM, John Peterson <jwp...@gm...>wrote: > >> > On Mon, Dec 9, 2013 at 11:31 AM, Lorenzo Zanon >> > <za...@ai...>wrote: >> > >> >> I get faster convergence with e.g. -snes_linesearch_type basic >> -ksp_rtol >> >> 1e-4: >> >> >> >> NL step 0, |residual|_2 = 3.464102e-05 >> >> NL step 1, |residual|_2 = 2.417540e-04 >> >> NL step 2, |residual|_2 = 6.174706e-08 >> >> NL step 3, |residual|_2 = 3.577768e-12 >> >> NL step 4, |residual|_2 = 7.687278e-17 >> >> StVen system solved at nonlinear iteration 4 , final nonlinear residual >> >> norm: 7.687278e-17 >> >> Your ksp_rtol might be hurting your convergence a bit near the root... >> >> Have you tried -snes_ksp_ew? There are several EW-specific options >> within you can play with as well: >> >> >> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESSetFromOptions.html >> >> -- >> John >> >> >> ------------------------------------------------------------------------------ >> Sponsored by Intel(R) XDK >> Develop, test and display web and hybrid apps with a single code base. >> Download it for free now! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk >> _______________________________________________ >> Libmesh-users mailing list >> Lib...@li... >> https://lists.sourceforge.net/lists/listinfo/libmesh-users >> > > > > -- > Dmitry Karpeev > Mathematics and Computer Science > Argonne National Laboratory > Argonne, Illinois, USA > and > Computation Institute > University of Chicago > 5735 S. Ellis Avenue > Chicago, IL 60637 > ----------------------- > Phone: 630-252-1229 > Fax: 630-252-5986 > > > -- Dmitry Karpeev Mathematics and Computer Science Argonne National Laboratory Argonne, Illinois, USA and Computation Institute University of Chicago 5735 S. Ellis Avenue Chicago, IL 60637 ----------------------- Phone: 630-252-1229 Fax: 630-252-5986 |