From carles.bona at uib.es Mon Jul 2 04:54:14 2018 From: carles.bona at uib.es (Carles Bona-Casas) Date: Mon, 2 Jul 2018 11:54:14 +0200 Subject: [petsc-users] Linesearch type cp change from 3.7.6 to 3.9.1 Message-ID: Dear all, I have been running a code with the option -snes_linesearch_type cp using petsc 3.7.6. I have updated my code to use petsc 3.9.1. If I run a simulation with the updated code and the option -snes_linesearch_type cp included, I obtain the same behaviour in the solution for a while, but then it suddenly stops converging for no apparent reason. If I run the same example with both petsc versions without using -snes_linesearch_type cp then I obtain exactly the same behaviour. My code currently runs quite faster with that option activated. Is there some default behaviour regarding -snes_linesearch_type cp that has been changed from petsc 3.7 to petsc 3.9? I attach my 3 outputs. With petsc 3.7.6 and cp option activated. With petsc 3.9.1 and cp option activated (not converging). And without cp option activated (only one file, same result with both petsc versions). I am also open to suggestions of different solvers that could work better than using -snes_linesearch_type cp. Many thanks, Carles -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- muS = 2.000000e-03 cS = 5.000000e+00 kappaS = 1.000000e-12 IGA: name=(null) prefix=geo_ IGA: dim=3 dof=1 order=2 geometry=3 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=u_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[3,2] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=v_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[3,2] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=w_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[3,2] rule=LEGENDRE[3] periodic=0 nnp=23 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=9200 min=4000 max=5200 max/min=1.3 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=p_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. nquadghost*commsize*user->safetyquadghost = 574452, nquadghost*nghost*user->safetyquadghost = 287226, nquadghost*user->safetyquadghost = 287226 nquadreal*commsize*user->safetyquad = 1531904, nquadreal*nghost*user->safetyquad = 765952, nquadreal*user->safetyquad = 765952 IGA: name=(null) prefix=geo_ IGA: dim=3 dof=1 order=2 geometry=3 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=p_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. user.Alpha_f: 6.666667e-01 user.Alpha_m: 8.333333e-01 user.gamma: 6.666667e-01 th->shift_V: 1.875000e+04 0 TS dt 0.0001 time 0. Linear solve converged due to CONVERGED_ATOL iterations 0 FirstNewton = 0 0 SNES Function norm 3.572897994044e+01 NORM2F: 3.572898e+01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 3.572898e+01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.299331e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 2.051284e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 0.000000e+00 NORM2dof3/NORM2dof30: -nan isolid: 0 NORM2S: 0.000000e+00 NORM2S/NORM2S0: -nan Tangent 0 KSP Residual norm 3.572897994044e+01 1 KSP Residual norm 4.590932150940e-03 2 KSP Residual norm 1.083125383106e-03 3 KSP Residual norm 2.663513431881e-04 4 KSP Residual norm 8.855948174613e-05 5 KSP Residual norm 1.384048225253e-05 6 KSP Residual norm 3.967355444542e-06 7 KSP Residual norm 6.673586109137e-07 8 KSP Residual norm 2.483423008390e-07 9 KSP Residual norm 6.132481698570e-08 10 KSP Residual norm 9.689659347469e-09 Linear solve converged due to CONVERGED_ATOL iterations 10 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 1.090748487093e-02 NORM2F: 1.090748e-02 NORM2F/NORM2F0: 3.052840e-04 NORM2dof0: 7.230531e-03 NORM2dof0/NORM2dof00: 2.023716e-04 NORM2dof1: 5.503796e-03 NORM2dof1/NORM2dof10: 4.235868e+00 NORM2dof2: 6.033314e-03 NORM2dof2/NORM2dof20: 2.941237e+00 NORM2dof3: 8.833762e-09 NORM2dof3/NORM2dof30: inf isolid: 0 NORM2S: 1.830489e-10 NORM2S/NORM2S0: inf Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1 1 TS dt 0.0001 time 0.0001 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 1.785763644723e+01 NORM2F: 1.785764e+01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 1.785762e+01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.556293e-02 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.702734e-02 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 1.325064e-08 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 9.701488e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 1.785763644723e+01 1 KSP Residual norm 5.049628562672e-02 2 KSP Residual norm 3.604517028341e-03 3 KSP Residual norm 7.619397990279e-04 4 KSP Residual norm 1.195867329688e-04 5 KSP Residual norm 2.195409915994e-05 6 KSP Residual norm 4.518605013445e-06 7 KSP Residual norm 1.857558801337e-06 8 KSP Residual norm 2.412824487070e-07 9 KSP Residual norm 9.323085453228e-08 10 KSP Residual norm 2.206166843857e-08 11 KSP Residual norm 4.267397332011e-09 Linear solve converged due to CONVERGED_ATOL iterations 11 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 2.844794057916e-03 NORM2F: 2.844794e-03 NORM2F/NORM2F0: 1.593041e-04 NORM2dof0: 2.062497e-03 NORM2dof0/NORM2dof00: 1.154967e-04 NORM2dof1: 1.454168e-03 NORM2dof1/NORM2dof10: 9.343790e-02 NORM2dof2: 1.313147e-03 NORM2dof2/NORM2dof20: 7.711992e-02 NORM2dof3: 4.141942e-09 NORM2dof3/NORM2dof30: 3.125842e-01 isolid: 0 NORM2S: 4.985943e-11 NORM2S/NORM2S0: 5.139359e-02 0 KSP Residual norm 2.844794057916e-03 1 KSP Residual norm 2.295043475141e-03 2 KSP Residual norm 1.583104677387e-04 3 KSP Residual norm 1.490919842246e-05 4 KSP Residual norm 1.548465044309e-06 5 KSP Residual norm 2.640015039860e-07 6 KSP Residual norm 4.322481936532e-08 7 KSP Residual norm 1.473218623954e-08 8 KSP Residual norm 2.888610560249e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 1.254901830802e-04 NORM2F: 1.254902e-04 NORM2F/NORM2F0: 7.027256e-06 NORM2dof0: 6.833894e-05 NORM2dof0/NORM2dof00: 3.826878e-06 NORM2dof1: 5.101309e-05 NORM2dof1/NORM2dof10: 3.277859e-03 NORM2dof2: 9.206107e-05 NORM2dof2/NORM2dof20: 5.406660e-03 NORM2dof3: 2.733176e-09 NORM2dof3/NORM2dof30: 2.062674e-01 isolid: 0 NORM2S: 5.337186e-12 NORM2S/NORM2S0: 5.501410e-03 0 KSP Residual norm 1.254901830802e-04 1 KSP Residual norm 1.003678752334e-04 2 KSP Residual norm 1.193320199479e-05 3 KSP Residual norm 5.187856996866e-07 4 KSP Residual norm 6.216090455420e-08 5 KSP Residual norm 1.241994457144e-08 6 KSP Residual norm 3.149627739665e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 8.107335723850e-06 NORM2F: 8.107336e-06 NORM2F/NORM2F0: 4.539983e-07 NORM2dof0: 4.912488e-06 NORM2dof0/NORM2dof00: 2.750920e-07 NORM2dof1: 3.357647e-06 NORM2dof1/NORM2dof10: 2.157464e-04 NORM2dof2: 5.506592e-06 NORM2dof2/NORM2dof20: 3.233970e-04 NORM2dof3: 3.023016e-09 NORM2dof3/NORM2dof30: 2.281411e-01 isolid: 0 NORM2S: 5.802563e-13 NORM2S/NORM2S0: 5.981107e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 3 2 TS dt 0.0001 time 0.0002 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 8.924122178623e+00 NORM2F: 8.924122e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 8.924122e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 2.326868e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 2.202884e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 8.367864e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.201607e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 8.924122178623e+00 1 KSP Residual norm 6.607063311348e-03 2 KSP Residual norm 3.141865121251e-04 3 KSP Residual norm 6.120575062805e-05 4 KSP Residual norm 9.242740946611e-06 5 KSP Residual norm 1.330632161167e-06 6 KSP Residual norm 5.727762329876e-07 7 KSP Residual norm 9.569604811720e-08 8 KSP Residual norm 2.510214586422e-08 9 KSP Residual norm 5.482441707317e-09 Linear solve converged due to CONVERGED_ATOL iterations 9 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 3.845740765508e-03 NORM2F: 3.845741e-03 NORM2F/NORM2F0: 4.309377e-04 NORM2dof0: 2.666434e-03 NORM2dof0/NORM2dof00: 2.987895e-04 NORM2dof1: 1.926033e-03 NORM2dof1/NORM2dof10: 8.277363e-01 NORM2dof2: 1.992548e-03 NORM2dof2/NORM2dof20: 9.045182e-01 NORM2dof3: 5.467552e-09 NORM2dof3/NORM2dof30: 6.533988e-01 isolid: 0 NORM2S: 8.819637e-11 NORM2S/NORM2S0: 1.224676e-01 0 KSP Residual norm 3.845740765508e-03 1 KSP Residual norm 3.268192036307e-03 2 KSP Residual norm 4.485759584760e-04 3 KSP Residual norm 5.155662226308e-05 4 KSP Residual norm 4.845743277285e-06 5 KSP Residual norm 1.439807997801e-06 6 KSP Residual norm 1.043760500828e-07 7 KSP Residual norm 3.976004664704e-08 8 KSP Residual norm 7.196889051981e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 1.523034956621e-04 NORM2F: 1.523035e-04 NORM2F/NORM2F0: 1.706650e-05 NORM2dof0: 1.001345e-04 NORM2dof0/NORM2dof00: 1.122066e-05 NORM2dof1: 6.852295e-05 NORM2dof1/NORM2dof10: 2.944857e-02 NORM2dof2: 9.205456e-05 NORM2dof2/NORM2dof20: 4.178821e-02 NORM2dof3: 6.848339e-09 NORM2dof3/NORM2dof30: 8.184095e-01 isolid: 0 NORM2S: 9.759938e-12 NORM2S/NORM2S0: 1.355244e-02 0 KSP Residual norm 1.523034956621e-04 1 KSP Residual norm 1.193197002149e-04 2 KSP Residual norm 1.286757063817e-05 3 KSP Residual norm 1.947459077256e-06 4 KSP Residual norm 5.526459925181e-07 5 KSP Residual norm 5.326425071623e-08 6 KSP Residual norm 4.721859648901e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 1.411908637308e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637308e-05 1 KSP Residual norm 1.147024084834e-05 2 KSP Residual norm 1.642505389573e-06 3 KSP Residual norm 9.393394026575e-08 4 KSP Residual norm 3.802608131827e-08 5 KSP Residual norm 3.488335303587e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.219642897375e-06 NORM2F: 1.219643e-06 NORM2F/NORM2F0: 1.366681e-07 NORM2dof0: 7.904453e-07 NORM2dof0/NORM2dof00: 8.857402e-08 NORM2dof1: 5.299586e-07 NORM2dof1/NORM2dof10: 2.277562e-04 NORM2dof2: 7.627955e-07 NORM2dof2/NORM2dof20: 3.462714e-04 NORM2dof3: 3.457406e-09 NORM2dof3/NORM2dof30: 4.131767e-01 isolid: 0 NORM2S: 1.174284e-13 NORM2S/NORM2S0: 1.630586e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4 3 TS dt 0.0001 time 0.0003 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 4.459023414102e+00 NORM2F: 4.459023e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 4.459018e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 4.580802e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 5.158376e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 6.755218e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.331618e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 4.459023414102e+00 1 KSP Residual norm 1.551248642940e-02 2 KSP Residual norm 1.181711188808e-03 3 KSP Residual norm 2.267481587314e-04 4 KSP Residual norm 2.354870533968e-05 5 KSP Residual norm 6.843344194293e-06 6 KSP Residual norm 1.323194294602e-06 7 KSP Residual norm 6.111386767871e-07 8 KSP Residual norm 6.462270983371e-08 9 KSP Residual norm 2.618035020596e-08 10 KSP Residual norm 4.913681339401e-09 Linear solve converged due to CONVERGED_ATOL iterations 10 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 1.235058837418e-03 NORM2F: 1.235059e-03 NORM2F/NORM2F0: 2.769797e-04 NORM2dof0: 6.981526e-04 NORM2dof0/NORM2dof00: 1.565709e-04 NORM2dof1: 4.902291e-04 NORM2dof1/NORM2dof10: 1.070182e-01 NORM2dof2: 8.931006e-04 NORM2dof2/NORM2dof20: 1.731360e-01 NORM2dof3: 4.742660e-09 NORM2dof3/NORM2dof30: 7.020735e-01 isolid: 0 NORM2S: 8.727352e-11 NORM2S/NORM2S0: 1.190372e-01 0 KSP Residual norm 1.235058837418e-03 1 KSP Residual norm 1.069627681061e-03 2 KSP Residual norm 1.751562909186e-04 3 KSP Residual norm 2.703186524530e-05 4 KSP Residual norm 5.488929738991e-06 5 KSP Residual norm 7.719484131288e-07 6 KSP Residual norm 7.094194677354e-08 7 KSP Residual norm 1.982339781034e-08 8 KSP Residual norm 4.747189973889e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 9.078241410441e-05 NORM2F: 9.078241e-05 NORM2F/NORM2F0: 2.035926e-05 NORM2dof0: 5.151981e-05 NORM2dof0/NORM2dof00: 1.155407e-05 NORM2dof1: 3.540856e-05 NORM2dof1/NORM2dof10: 7.729773e-03 NORM2dof2: 6.582849e-05 NORM2dof2/NORM2dof20: 1.276148e-02 NORM2dof3: 4.701207e-09 NORM2dof3/NORM2dof30: 6.959371e-01 isolid: 0 NORM2S: 9.561275e-12 NORM2S/NORM2S0: 1.304115e-02 0 KSP Residual norm 9.078241410441e-05 1 KSP Residual norm 7.519329586572e-05 2 KSP Residual norm 1.378553745900e-05 3 KSP Residual norm 1.089007081012e-06 4 KSP Residual norm 4.184123441247e-07 5 KSP Residual norm 4.472071463938e-08 6 KSP Residual norm 3.767042899970e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 9.925973941521e-06 NORM2F: 9.925974e-06 NORM2F/NORM2F0: 2.226042e-06 NORM2dof0: 7.244159e-06 NORM2dof0/NORM2dof00: 1.624608e-06 NORM2dof1: 4.332858e-06 NORM2dof1/NORM2dof10: 9.458732e-04 NORM2dof2: 5.222399e-06 NORM2dof2/NORM2dof20: 1.012412e-03 NORM2dof3: 3.828590e-09 NORM2dof3/NORM2dof30: 5.667603e-01 isolid: 0 NORM2S: 1.046812e-12 NORM2S/NORM2S0: 1.427805e-03 0 KSP Residual norm 9.925973941521e-06 1 KSP Residual norm 7.973871208680e-06 2 KSP Residual norm 9.575431070645e-07 3 KSP Residual norm 1.480552171494e-07 4 KSP Residual norm 4.630259649424e-08 5 KSP Residual norm 3.443641759732e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.227659573145e-06 NORM2F: 1.227660e-06 NORM2F/NORM2F0: 2.753203e-07 NORM2dof0: 7.906333e-07 NORM2dof0/NORM2dof00: 1.773111e-07 NORM2dof1: 4.780907e-07 NORM2dof1/NORM2dof10: 1.043683e-04 NORM2dof2: 8.083717e-07 NORM2dof2/NORM2dof20: 1.567105e-04 NORM2dof3: 3.386631e-09 NORM2dof3/NORM2dof30: 5.013356e-01 isolid: 0 NORM2S: 1.151816e-13 NORM2S/NORM2S0: 1.571026e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4 4 TS dt 0.0001 time 0.0004 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 2.227652021285e+00 NORM2F: 2.227652e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 2.227651e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 9.388411e-04 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.525870e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 4.190710e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.712497e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 2.227652021285e+00 1 KSP Residual norm 3.786666383186e-03 2 KSP Residual norm 3.701315772265e-04 3 KSP Residual norm 1.262250621903e-04 4 KSP Residual norm 1.679275296591e-05 5 KSP Residual norm 3.701940311263e-06 6 KSP Residual norm 8.991893299755e-07 7 KSP Residual norm 3.274255166243e-07 8 KSP Residual norm 4.205190863902e-08 9 KSP Residual norm 1.016597417602e-08 10 KSP Residual norm 2.186992150925e-09 Linear solve converged due to CONVERGED_ATOL iterations 10 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 1.277951785028e-03 NORM2F: 1.277952e-03 NORM2F/NORM2F0: 5.736766e-04 NORM2dof0: 8.837677e-04 NORM2dof0/NORM2dof00: 3.967262e-04 NORM2dof1: 5.862336e-04 NORM2dof1/NORM2dof10: 6.244226e-01 NORM2dof2: 7.130537e-04 NORM2dof2/NORM2dof20: 4.673097e-01 NORM2dof3: 2.150732e-09 NORM2dof3/NORM2dof30: 5.132143e-01 isolid: 0 NORM2S: 7.794527e-11 NORM2S/NORM2S0: 1.010636e-01 0 KSP Residual norm 1.277951785028e-03 1 KSP Residual norm 1.108159885768e-03 2 KSP Residual norm 2.090485440396e-04 3 KSP Residual norm 2.561905167721e-05 4 KSP Residual norm 5.783875463940e-06 5 KSP Residual norm 7.758000687848e-07 6 KSP Residual norm 6.231373273124e-08 7 KSP Residual norm 2.150745162428e-08 8 KSP Residual norm 4.524271362583e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 8.254873642334e-05 NORM2F: 8.254874e-05 NORM2F/NORM2F0: 3.705639e-05 NORM2dof0: 5.506456e-05 NORM2dof0/NORM2dof00: 2.471866e-05 NORM2dof1: 4.168084e-05 NORM2dof1/NORM2dof10: 4.439605e-02 NORM2dof2: 4.522052e-05 NORM2dof2/NORM2dof20: 2.963590e-02 NORM2dof3: 4.467248e-09 NORM2dof3/NORM2dof30: 1.065988e+00 isolid: 0 NORM2S: 8.595316e-12 NORM2S/NORM2S0: 1.114466e-02 0 KSP Residual norm 8.254873642334e-05 1 KSP Residual norm 6.729252136059e-05 2 KSP Residual norm 8.788120855611e-06 3 KSP Residual norm 1.201268287855e-06 4 KSP Residual norm 4.988194555893e-07 5 KSP Residual norm 2.223026886510e-08 6 KSP Residual norm 4.505928485128e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 8.239534215470e-06 NORM2F: 8.239534e-06 NORM2F/NORM2F0: 3.698753e-06 NORM2dof0: 5.660320e-06 NORM2dof0/NORM2dof00: 2.540936e-06 NORM2dof1: 3.405783e-06 NORM2dof1/NORM2dof10: 3.627645e-03 NORM2dof2: 4.924564e-06 NORM2dof2/NORM2dof20: 3.227381e-03 NORM2dof3: 4.599213e-09 NORM2dof3/NORM2dof30: 1.097478e+00 isolid: 0 NORM2S: 9.412050e-13 NORM2S/NORM2S0: 1.220363e-03 0 KSP Residual norm 8.239534215470e-06 1 KSP Residual norm 6.842412348586e-06 2 KSP Residual norm 1.256835232271e-06 3 KSP Residual norm 1.094224194536e-07 4 KSP Residual norm 4.243344132633e-08 5 KSP Residual norm 3.713281685403e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.011901923248e-06 NORM2F: 1.011902e-06 NORM2F/NORM2F0: 4.542460e-07 NORM2dof0: 6.804013e-07 NORM2dof0/NORM2dof00: 3.054344e-07 NORM2dof1: 4.824999e-07 NORM2dof1/NORM2dof10: 5.139314e-04 NORM2dof2: 5.728699e-07 NORM2dof2/NORM2dof20: 3.754383e-04 NORM2dof3: 3.679214e-09 NORM2dof3/NORM2dof30: 8.779451e-01 isolid: 0 NORM2S: 1.040252e-13 NORM2S/NORM2S0: 1.348788e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4 5 TS dt 0.0001 time 0.0005 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 1.112741935211e+00 NORM2F: 1.112742e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 1.112739e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.687493e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 2.151957e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 4.819524e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.286157e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 1.112741935211e+00 1 KSP Residual norm 6.570699837645e-03 2 KSP Residual norm 5.670137795539e-04 3 KSP Residual norm 1.103059530678e-04 4 KSP Residual norm 1.216088727932e-05 5 KSP Residual norm 4.415523502414e-06 6 KSP Residual norm 9.655680425077e-07 7 KSP Residual norm 2.771156802885e-07 8 KSP Residual norm 4.442862448976e-08 9 KSP Residual norm 9.129876075118e-09 Linear solve converged due to CONVERGED_ATOL iterations 9 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 1.015995837115e-03 NORM2F: 1.015996e-03 NORM2F/NORM2F0: 9.130561e-04 NORM2dof0: 6.305959e-04 NORM2dof0/NORM2dof00: 5.667062e-04 NORM2dof1: 4.264896e-04 NORM2dof1/NORM2dof10: 2.527356e-01 NORM2dof2: 6.728321e-04 NORM2dof2/NORM2dof20: 3.126606e-01 NORM2dof3: 8.394649e-09 NORM2dof3/NORM2dof30: 1.741800e+00 isolid: 0 NORM2S: 8.591898e-11 NORM2S/NORM2S0: 1.179209e-01 0 KSP Residual norm 1.015995837115e-03 1 KSP Residual norm 8.961031948738e-04 2 KSP Residual norm 1.803075486093e-04 3 KSP Residual norm 2.625118595007e-05 4 KSP Residual norm 7.490927206153e-06 5 KSP Residual norm 7.053295117139e-07 6 KSP Residual norm 6.224399093315e-08 7 KSP Residual norm 2.320153042766e-08 8 KSP Residual norm 4.536035912660e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 7.443055823368e-05 NORM2F: 7.443056e-05 NORM2F/NORM2F0: 6.688933e-05 NORM2dof0: 4.310318e-05 NORM2dof0/NORM2dof00: 3.873612e-05 NORM2dof1: 3.418390e-05 NORM2dof1/NORM2dof10: 2.025721e-02 NORM2dof2: 5.013467e-05 NORM2dof2/NORM2dof20: 2.329725e-02 NORM2dof3: 4.557719e-09 NORM2dof3/NORM2dof30: 9.456783e-01 isolid: 0 NORM2S: 9.433112e-12 NORM2S/NORM2S0: 1.294662e-02 0 KSP Residual norm 7.443055823368e-05 1 KSP Residual norm 6.274316285393e-05 2 KSP Residual norm 8.652669262381e-06 3 KSP Residual norm 1.005540492343e-06 4 KSP Residual norm 4.563068174216e-07 5 KSP Residual norm 2.152406398234e-08 6 KSP Residual norm 4.789585951088e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 7.692987800073e-06 NORM2F: 7.692988e-06 NORM2F/NORM2F0: 6.913542e-06 NORM2dof0: 5.335668e-06 NORM2dof0/NORM2dof00: 4.795078e-06 NORM2dof1: 3.195147e-06 NORM2dof1/NORM2dof10: 1.893428e-03 NORM2dof2: 4.528103e-06 NORM2dof2/NORM2dof20: 2.104180e-03 NORM2dof3: 4.957642e-09 NORM2dof3/NORM2dof30: 1.028658e+00 isolid: 0 NORM2S: 1.034012e-12 NORM2S/NORM2S0: 1.419146e-03 0 KSP Residual norm 7.692987800073e-06 1 KSP Residual norm 6.593187966360e-06 2 KSP Residual norm 1.156033183066e-06 3 KSP Residual norm 1.713473668329e-07 4 KSP Residual norm 6.039939982309e-08 5 KSP Residual norm 3.833553662672e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.050495442306e-06 NORM2F: 1.050495e-06 NORM2F/NORM2F0: 9.440603e-07 NORM2dof0: 7.102321e-07 NORM2dof0/NORM2dof00: 6.382740e-07 NORM2dof1: 4.404641e-07 NORM2dof1/NORM2dof10: 2.610168e-04 NORM2dof2: 6.364650e-07 NORM2dof2/NORM2dof20: 2.957611e-04 NORM2dof3: 3.839806e-09 NORM2dof3/NORM2dof30: 7.967189e-01 isolid: 0 NORM2S: 1.142188e-13 NORM2S/NORM2S0: 1.567614e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4 6 TS dt 0.0001 time 0.0006 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 5.557525996674e-01 NORM2F: 5.557526e-01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 5.557501e-01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 9.210335e-04 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.393950e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 4.445345e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.524837e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 5.557525996674e-01 1 KSP Residual norm 4.020605119036e-03 2 KSP Residual norm 3.993968677548e-04 3 KSP Residual norm 7.858906693256e-05 4 KSP Residual norm 1.187156829761e-05 5 KSP Residual norm 2.853870444655e-06 6 KSP Residual norm 5.910350554108e-07 7 KSP Residual norm 1.907378330253e-07 8 KSP Residual norm 4.109214096616e-08 9 KSP Residual norm 8.187331871712e-09 Linear solve converged due to CONVERGED_ATOL iterations 9 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 8.005861073118e-04 NORM2F: 8.005861e-04 NORM2F/NORM2F0: 1.440544e-03 NORM2dof0: 5.305707e-04 NORM2dof0/NORM2dof00: 9.546930e-04 NORM2dof1: 3.314747e-04 NORM2dof1/NORM2dof10: 3.598943e-01 NORM2dof2: 4.995572e-04 NORM2dof2/NORM2dof20: 3.583753e-01 NORM2dof3: 8.096245e-09 NORM2dof3/NORM2dof30: 1.821286e+00 isolid: 0 NORM2S: 8.036640e-11 NORM2S/NORM2S0: 1.068015e-01 0 KSP Residual norm 8.005861073118e-04 1 KSP Residual norm 7.105563993615e-04 2 KSP Residual norm 1.569400455800e-04 3 KSP Residual norm 2.148260696075e-05 4 KSP Residual norm 7.577783405191e-06 5 KSP Residual norm 4.940178488635e-07 6 KSP Residual norm 5.881184293810e-08 7 KSP Residual norm 1.681579433994e-08 8 KSP Residual norm 3.550381279058e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 6.639356173983e-05 NORM2F: 6.639356e-05 NORM2F/NORM2F0: 1.194660e-04 NORM2dof0: 4.252628e-05 NORM2dof0/NORM2dof00: 7.652052e-05 NORM2dof1: 3.279431e-05 NORM2dof1/NORM2dof10: 3.560598e-02 NORM2dof2: 3.904041e-05 NORM2dof2/NORM2dof20: 2.800704e-02 NORM2dof3: 3.699852e-09 NORM2dof3/NORM2dof30: 8.322980e-01 isolid: 0 NORM2S: 8.825986e-12 NORM2S/NORM2S0: 1.172914e-02 0 KSP Residual norm 6.639356173983e-05 1 KSP Residual norm 5.533750957699e-05 2 KSP Residual norm 5.486233489635e-06 3 KSP Residual norm 8.245430728972e-07 4 KSP Residual norm 3.400428911218e-07 5 KSP Residual norm 1.251556457453e-08 6 KSP Residual norm 4.601696859316e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 8.166871579835e-06 NORM2F: 8.166872e-06 NORM2F/NORM2F0: 1.469516e-05 NORM2dof0: 5.917787e-06 NORM2dof0/NORM2dof00: 1.064829e-05 NORM2dof1: 3.376949e-06 NORM2dof1/NORM2dof10: 3.666478e-03 NORM2dof2: 4.502641e-06 NORM2dof2/NORM2dof20: 3.230131e-03 NORM2dof3: 4.676454e-09 NORM2dof3/NORM2dof30: 1.051989e+00 isolid: 0 NORM2S: 9.699273e-13 NORM2S/NORM2S0: 1.288968e-03 0 KSP Residual norm 8.166871579835e-06 1 KSP Residual norm 7.070302120658e-06 2 KSP Residual norm 1.380763296070e-06 3 KSP Residual norm 1.822364755135e-07 4 KSP Residual norm 7.424261694518e-08 5 KSP Residual norm 3.818437565938e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.020601918719e-06 NORM2F: 1.020602e-06 NORM2F/NORM2F0: 1.836432e-06 NORM2dof0: 7.263342e-07 NORM2dof0/NORM2dof00: 1.306944e-06 NORM2dof1: 4.600303e-07 NORM2dof1/NORM2dof10: 4.994718e-04 NORM2dof2: 5.499312e-07 NORM2dof2/NORM2dof20: 3.945129e-04 NORM2dof3: 3.829265e-09 NORM2dof3/NORM2dof30: 8.614101e-01 isolid: 0 NORM2S: 1.070798e-13 NORM2S/NORM2S0: 1.423018e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4 7 TS dt 0.0001 time 0.0007 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 2.775343560554e-01 NORM2F: 2.775344e-01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 2.775296e-01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 9.197075e-04 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.341120e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 4.039119e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.359843e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 2.775343560554e-01 1 KSP Residual norm 4.234920558509e-03 2 KSP Residual norm 4.101297407319e-04 3 KSP Residual norm 6.220774614011e-05 4 KSP Residual norm 1.856125916344e-05 5 KSP Residual norm 1.147809993928e-06 6 KSP Residual norm 2.206587564519e-07 7 KSP Residual norm 4.407254089560e-08 8 KSP Residual norm 5.910241359258e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 7.939773687909e-04 NORM2F: 7.939774e-04 NORM2F/NORM2F0: 2.860826e-03 NORM2dof0: 5.117460e-04 NORM2dof0/NORM2dof00: 1.843933e-03 NORM2dof1: 3.327861e-04 NORM2dof1/NORM2dof10: 3.618391e-01 NORM2dof2: 5.077100e-04 NORM2dof2/NORM2dof20: 3.785718e-01 NORM2dof3: 5.798578e-09 NORM2dof3/NORM2dof30: 1.435605e+00 isolid: 0 NORM2S: 8.291750e-11 NORM2S/NORM2S0: 1.126620e-01 0 KSP Residual norm 7.939773687909e-04 1 KSP Residual norm 7.098870331169e-04 2 KSP Residual norm 1.545057322866e-04 3 KSP Residual norm 2.239762735179e-05 4 KSP Residual norm 8.601875261907e-06 5 KSP Residual norm 4.432969221500e-07 6 KSP Residual norm 7.368980834511e-08 7 KSP Residual norm 1.931444058250e-08 8 KSP Residual norm 3.568614645931e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 6.928122087929e-05 NORM2F: 6.928122e-05 NORM2F/NORM2F0: 2.496312e-04 NORM2dof0: 4.394462e-05 NORM2dof0/NORM2dof00: 1.583421e-04 NORM2dof1: 3.220739e-05 NORM2dof1/NORM2dof10: 3.501917e-02 NORM2dof2: 4.279535e-05 NORM2dof2/NORM2dof20: 3.191017e-02 NORM2dof3: 3.501366e-09 NORM2dof3/NORM2dof30: 8.668639e-01 isolid: 0 NORM2S: 9.097217e-12 NORM2S/NORM2S0: 1.236061e-02 0 KSP Residual norm 6.928122087929e-05 1 KSP Residual norm 5.796650034384e-05 2 KSP Residual norm 5.822934982617e-06 3 KSP Residual norm 8.504018160118e-07 4 KSP Residual norm 3.473419243295e-07 5 KSP Residual norm 1.254797217550e-08 6 KSP Residual norm 4.397946011480e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 9.057240589981e-06 NORM2F: 9.057241e-06 NORM2F/NORM2F0: 3.263466e-05 NORM2dof0: 6.675267e-06 NORM2dof0/NORM2dof00: 2.405245e-05 NORM2dof1: 3.733159e-06 NORM2dof1/NORM2dof10: 4.059072e-03 NORM2dof2: 4.851589e-06 NORM2dof2/NORM2dof20: 3.617566e-03 NORM2dof3: 4.459935e-09 NORM2dof3/NORM2dof30: 1.104185e+00 isolid: 0 NORM2S: 1.000563e-12 NORM2S/NORM2S0: 1.359490e-03 0 KSP Residual norm 9.057240589981e-06 1 KSP Residual norm 7.848573259684e-06 2 KSP Residual norm 1.415531009310e-06 3 KSP Residual norm 2.090477216219e-07 4 KSP Residual norm 8.778616371171e-08 5 KSP Residual norm 3.917243258697e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.128990046196e-06 NORM2F: 1.128990e-06 NORM2F/NORM2F0: 4.067929e-06 NORM2dof0: 8.085753e-07 NORM2dof0/NORM2dof00: 2.913474e-06 NORM2dof1: 4.836531e-07 NORM2dof1/NORM2dof10: 5.258771e-04 NORM2dof2: 6.220040e-07 NORM2dof2/NORM2dof20: 4.637946e-04 NORM2dof3: 3.887829e-09 NORM2dof3/NORM2dof30: 9.625438e-01 isolid: 0 NORM2S: 1.103398e-13 NORM2S/NORM2S0: 1.499214e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4 8 TS dt 0.0001 time 0.0008 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 1.385849581340e-01 NORM2F: 1.385850e-01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 1.385776e-01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 8.010985e-04 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.183445e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 4.108561e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.401836e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 1.385849581340e-01 1 KSP Residual norm 3.795277329624e-03 2 KSP Residual norm 3.620738698674e-04 3 KSP Residual norm 5.684093723273e-05 4 KSP Residual norm 2.107087522506e-05 5 KSP Residual norm 8.654267157263e-07 6 KSP Residual norm 2.119521401284e-07 7 KSP Residual norm 5.288058582681e-08 8 KSP Residual norm 7.166323508088e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 7.436038015632e-04 NORM2F: 7.436038e-04 NORM2F/NORM2F0: 5.365689e-03 NORM2dof0: 4.954851e-04 NORM2dof0/NORM2dof00: 3.575507e-03 NORM2dof1: 3.102044e-04 NORM2dof1/NORM2dof10: 3.872237e-01 NORM2dof2: 4.595806e-04 NORM2dof2/NORM2dof20: 3.883413e-01 NORM2dof3: 6.972809e-09 NORM2dof3/NORM2dof30: 1.697141e+00 isolid: 0 NORM2S: 8.136219e-11 NORM2S/NORM2S0: 1.099216e-01 0 KSP Residual norm 7.436038015632e-04 1 KSP Residual norm 6.662293245257e-04 2 KSP Residual norm 1.413956125033e-04 3 KSP Residual norm 2.108582723653e-05 4 KSP Residual norm 8.858941280713e-06 5 KSP Residual norm 3.654990999848e-07 6 KSP Residual norm 9.586321175573e-08 7 KSP Residual norm 2.762663610396e-08 8 KSP Residual norm 3.998792805484e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 6.401830454268e-05 NORM2F: 6.401830e-05 NORM2F/NORM2F0: 4.619427e-04 NORM2dof0: 4.448204e-05 NORM2dof0/NORM2dof00: 3.209901e-04 NORM2dof1: 2.897829e-05 NORM2dof1/NORM2dof10: 3.617319e-02 NORM2dof2: 3.577640e-05 NORM2dof2/NORM2dof20: 3.023072e-02 NORM2dof3: 3.731667e-09 NORM2dof3/NORM2dof30: 9.082661e-01 isolid: 0 NORM2S: 8.919674e-12 NORM2S/NORM2S0: 1.205062e-02 0 KSP Residual norm 6.401830454268e-05 1 KSP Residual norm 5.313000718007e-05 2 KSP Residual norm 4.667333074756e-06 3 KSP Residual norm 7.091731589709e-07 4 KSP Residual norm 2.703713228598e-07 5 KSP Residual norm 1.059749901104e-08 6 KSP Residual norm 3.193872235940e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 9.295793273187e-06 NORM2F: 9.295793e-06 NORM2F/NORM2F0: 6.707650e-05 NORM2dof0: 6.778351e-06 NORM2dof0/NORM2dof00: 4.891376e-05 NORM2dof1: 3.880551e-06 NORM2dof1/NORM2dof10: 4.844037e-03 NORM2dof2: 5.040540e-06 NORM2dof2/NORM2dof20: 4.259209e-03 NORM2dof3: 3.225597e-09 NORM2dof3/NORM2dof30: 7.850916e-01 isolid: 0 NORM2S: 9.832155e-13 NORM2S/NORM2S0: 1.328340e-03 0 KSP Residual norm 9.295793273187e-06 1 KSP Residual norm 8.122103991633e-06 2 KSP Residual norm 1.448552073625e-06 3 KSP Residual norm 2.236736711700e-07 4 KSP Residual norm 9.711651165709e-08 5 KSP Residual norm 4.059417366128e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.145371023432e-06 NORM2F: 1.145371e-06 NORM2F/NORM2F0: 8.264757e-06 NORM2dof0: 8.001733e-07 NORM2dof0/NORM2dof00: 5.774190e-06 NORM2dof1: 4.949525e-07 NORM2dof1/NORM2dof10: 6.178422e-04 NORM2dof2: 6.531490e-07 NORM2dof2/NORM2dof20: 5.519047e-04 NORM2dof3: 3.992162e-09 NORM2dof3/NORM2dof30: 9.716691e-01 isolid: 0 NORM2S: 1.082875e-13 NORM2S/NORM2S0: 1.462982e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4 9 TS dt 0.0001 time 0.0009 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 6.920543911323e-02 NORM2F: 6.920544e-02 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 6.919171e-02 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 7.826959e-04 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.134674e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 4.044615e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.352641e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 6.920543911323e-02 1 KSP Residual norm 3.838256459620e-03 2 KSP Residual norm 3.510324160726e-04 3 KSP Residual norm 5.431659267182e-05 4 KSP Residual norm 2.278975999573e-05 5 KSP Residual norm 9.811155532599e-07 6 KSP Residual norm 2.283277281734e-07 7 KSP Residual norm 6.419176632026e-08 8 KSP Residual norm 9.712248434270e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 7.543897594395e-04 NORM2F: 7.543898e-04 NORM2F/NORM2F0: 1.090073e-02 NORM2dof0: 5.111752e-04 NORM2dof0/NORM2dof00: 7.387810e-03 NORM2dof1: 3.164793e-04 NORM2dof1/NORM2dof10: 4.043452e-01 NORM2dof2: 4.556804e-04 NORM2dof2/NORM2dof20: 4.015958e-01 NORM2dof3: 9.463672e-09 NORM2dof3/NORM2dof30: 2.339820e+00 isolid: 0 NORM2S: 8.159367e-11 NORM2S/NORM2S0: 1.109719e-01 0 KSP Residual norm 7.543897594395e-04 1 KSP Residual norm 6.779421207165e-04 2 KSP Residual norm 1.389710000060e-04 3 KSP Residual norm 2.154186771758e-05 4 KSP Residual norm 9.288592492057e-06 5 KSP Residual norm 3.637246988448e-07 6 KSP Residual norm 1.189806558533e-07 7 KSP Residual norm 3.446205571478e-08 8 KSP Residual norm 4.261989924471e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 6.335607148875e-05 NORM2F: 6.335607e-05 NORM2F/NORM2F0: 9.154782e-04 NORM2dof0: 4.386965e-05 NORM2dof0/NORM2dof00: 6.340304e-04 NORM2dof1: 2.808424e-05 NORM2dof1/NORM2dof10: 3.588141e-02 NORM2dof2: 3.606552e-05 NORM2dof2/NORM2dof20: 3.178491e-02 NORM2dof3: 3.835533e-09 NORM2dof3/NORM2dof30: 9.483059e-01 isolid: 0 NORM2S: 8.941439e-12 NORM2S/NORM2S0: 1.216085e-02 0 KSP Residual norm 6.335607148875e-05 1 KSP Residual norm 5.260333974931e-05 2 KSP Residual norm 4.526058539996e-06 3 KSP Residual norm 7.065769231872e-07 4 KSP Residual norm 2.656748864253e-07 5 KSP Residual norm 1.055820588803e-08 6 KSP Residual norm 2.914593642662e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 9.501611098620e-06 NORM2F: 9.501611e-06 NORM2F/NORM2F0: 1.372957e-04 NORM2dof0: 6.864630e-06 NORM2dof0/NORM2dof00: 9.921175e-05 NORM2dof1: 4.064798e-06 NORM2dof1/NORM2dof10: 5.193330e-03 NORM2dof2: 5.160898e-06 NORM2dof2/NORM2dof20: 4.548352e-03 NORM2dof3: 2.921009e-09 NORM2dof3/NORM2dof30: 7.221970e-01 isolid: 0 NORM2S: 9.863644e-13 NORM2S/NORM2S0: 1.341510e-03 0 KSP Residual norm 9.501611098620e-06 1 KSP Residual norm 8.379522147750e-06 2 KSP Residual norm 1.468612165223e-06 3 KSP Residual norm 2.384601373074e-07 4 KSP Residual norm 1.034426483411e-07 5 KSP Residual norm 4.383898257933e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.119356548797e-06 NORM2F: 1.119357e-06 NORM2F/NORM2F0: 1.617440e-05 NORM2dof0: 8.229122e-07 NORM2dof0/NORM2dof00: 1.189322e-05 NORM2dof1: 4.832121e-07 NORM2dof1/NORM2dof10: 6.173689e-04 NORM2dof2: 5.850318e-07 NORM2dof2/NORM2dof20: 5.155945e-04 NORM2dof3: 4.296044e-09 NORM2dof3/NORM2dof30: 1.062164e+00 isolid: 0 NORM2S: 1.085892e-13 NORM2S/NORM2S0: 1.476873e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4 10 TS dt 0.0001 time 0.001 TS Object: 2 MPI processes type: alpha1 maximum steps=10 maximum time=5000. total number of nonlinear solver iterations=36 total number of nonlinear solve failures=0 total number of linear solver iterations=258 total number of rejected steps=0 Alpha_m=0.833333, Alpha_f=0.666667, Gamma=0.666667 TSAdapt Object: 2 MPI processes type: none number of candidates 0 SNES Object: 2 MPI processes type: newtonls maximum iterations=150, maximum function evaluations=10000 tolerances: relative=0.001, absolute=1e-50, solution=1e-08 total number of linear solver iterations=27 total number of function evaluations=9 norm schedule ALWAYS Jacobian is rebuilt every 20 SNES iterations SNESLineSearch Object: 2 MPI processes type: cp maxstep=1.000000e+08, minlambda=1.000000e-12 tolerances: relative=1.000000e-08, absolute=1.000000e-15, lambda=1.000000e-08 maximum iterations=1 KSP Object: 2 MPI processes type: fgmres 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., absolute=1e-08, divergence=10000. right preconditioning using UNPRECONDITIONED norm type for convergence test PC Object: 2 MPI processes type: fieldsplit FieldSplit with Schur preconditioner, factorization UPPER Preconditioner for the Schur complement formed from user provided matrix Split info: Split number 0 Defined by IS Split number 1 Defined by IS KSP solver for A00 block KSP Object: (fieldsplit_m_) 2 MPI processes type: fgmres GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement GMRES: happy breakdown tolerance 1e-30 maximum iterations=5, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. right preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_m_) 2 MPI processes type: bjacobi block Jacobi: number of blocks = 2 Local solve is same for all blocks, in the following KSP and PC objects: KSP Object: (fieldsplit_m_sub_) 1 MPI processes type: preonly maximum iterations=10000, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_m_sub_) 1 MPI processes type: ilu ILU: out-of-place factorization 0 levels of fill tolerance for zero pivot 2.22045e-14 matrix ordering: natural factor fill ratio given 1., needed 1. Factored matrix follows: Mat Object: 1 MPI processes type: seqaij rows=12000, cols=12000 package used to perform factorization: petsc total: nonzeros=5527200, allocated nonzeros=5527200 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: (fieldsplit_m_) 1 MPI processes type: seqaij rows=12000, cols=12000 total: nonzeros=5527200, allocated nonzeros=5527200 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: (fieldsplit_m_) 2 MPI processes type: mpiaij rows=26800, cols=26800 total: nonzeros=13445200, allocated nonzeros=13445200 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines KSP solver for S = A11 - A10 inv(A00) A01 KSP Object: (fieldsplit_p_) 2 MPI processes type: preonly maximum iterations=10000, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_p_) 2 MPI processes type: ksp KSP and PC on KSP preconditioner follow --------------------------------- KSP Object: (fieldsplit_p_ksp_) 2 MPI processes type: cg maximum iterations=5, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_p_ksp_) 2 MPI processes type: bjacobi block Jacobi: number of blocks = 2 Local solve is same for all blocks, in the following KSP and PC objects: KSP Object: (fieldsplit_p_ksp_sub_) 1 MPI processes type: preonly maximum iterations=10000, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_p_ksp_sub_) 1 MPI processes type: ilu ILU: out-of-place factorization 0 levels of fill tolerance for zero pivot 2.22045e-14 matrix ordering: natural factor fill ratio given 1., needed 1. Factored matrix follows: Mat Object: 1 MPI processes type: seqaij rows=4000, cols=4000 package used to perform factorization: petsc total: nonzeros=440000, allocated nonzeros=440000 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: 1 MPI processes type: seqaij rows=4000, cols=4000 total: nonzeros=440000, allocated nonzeros=440000 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: 2 MPI processes type: mpiaij rows=8800, cols=8800 total: nonzeros=1040000, allocated nonzeros=1040000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines --------------------------------- linear system matrix followed by preconditioner matrix: Mat Object: (fieldsplit_p_) 2 MPI processes type: schurcomplement rows=8800, cols=8800 Schur complement A11 - A10 inv(A00) A01 A11 Mat Object: (fieldsplit_p_) 2 MPI processes type: mpiaij rows=8800, cols=8800 total: nonzeros=1040000, allocated nonzeros=1040000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines A10 Mat Object: 2 MPI processes type: mpiaij rows=8800, cols=26800 total: nonzeros=3756000, allocated nonzeros=3756000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines KSP of A00 KSP Object: (fieldsplit_m_) 2 MPI processes type: fgmres GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement GMRES: happy breakdown tolerance 1e-30 maximum iterations=5, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. right preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_m_) 2 MPI processes type: bjacobi block Jacobi: number of blocks = 2 Local solve is same for all blocks, in the following KSP and PC objects: KSP Object: (fieldsplit_m_sub_) 1 MPI processes type: preonly maximum iterations=10000, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_m_sub_) 1 MPI processes type: ilu ILU: out-of-place factorization 0 levels of fill tolerance for zero pivot 2.22045e-14 matrix ordering: natural factor fill ratio given 1., needed 1. Factored matrix follows: Mat Object: 1 MPI processes type: seqaij rows=12000, cols=12000 package used to perform factorization: petsc total: nonzeros=5527200, allocated nonzeros=5527200 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: (fieldsplit_m_) 1 MPI processes type: seqaij rows=12000, cols=12000 total: nonzeros=5527200, allocated nonzeros=5527200 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: (fieldsplit_m_) 2 MPI processes type: mpiaij rows=26800, cols=26800 total: nonzeros=13445200, allocated nonzeros=13445200 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines A01 Mat Object: 2 MPI processes type: mpiaij rows=26800, cols=8800 total: nonzeros=3756000, allocated nonzeros=3756000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines Mat Object: 2 MPI processes type: mpiaij rows=8800, cols=8800 total: nonzeros=1040000, allocated nonzeros=1040000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines linear system matrix = precond matrix: Mat Object: 2 MPI processes type: mpiaij rows=35600, cols=35600 total: nonzeros=21997200, allocated nonzeros=21997200 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines solve: ndof= 35600 time= 4.885358e+02 time/ndof= 1.372292e-02 ************************************************************************************************************************ *** WIDEN YOUR WINDOW TO 120 CHARACTERS. Use 'enscript -r -fCourier9' to print this document *** ************************************************************************************************************************ ---------------------------------------------- PETSc Performance Summary: ---------------------------------------------- ./fsisurface on a optimO3fftw named ubuntu with 2 processors, by hcasquer Mon Apr 30 12:03:20 2018 Using Petsc Release Version 3.7.6, unknown Max Max/Min Avg Total Time (sec): 5.359e+02 1.00000 5.359e+02 Objects: 2.952e+03 2.77183 2.008e+03 Flops: 1.138e+11 1.04041 1.116e+11 2.232e+11 Flops/sec: 2.123e+08 1.04041 2.082e+08 4.164e+08 MPI Messages: 4.924e+03 1.00000 4.924e+03 9.849e+03 MPI Message Lengths: 1.353e+09 1.00009 2.748e+05 2.707e+09 MPI Reductions: 1.169e+04 1.00000 Flop counting convention: 1 flop = 1 real number operation of type (multiply/divide/add/subtract) e.g., VecAXPY() for real vectors of length N --> 2N flops and VecAXPY() for complex vectors of length N --> 8N flops Summary of Stages: ----- Time ------ ----- Flops ----- --- Messages --- -- Message Lengths -- -- Reductions -- Avg %Total Avg %Total counts %Total Avg %Total counts %Total 0: Main Stage: 5.3588e+02 100.0% 2.2317e+11 100.0% 9.849e+03 100.0% 2.748e+05 100.0% 1.169e+04 100.0% ------------------------------------------------------------------------------------------------------------------------ See the 'Profiling' chapter of the users' manual for details on interpreting output. Phase summary info: Count: number of times phase was executed Time and Flops: Max - maximum over all processors Ratio - ratio of maximum to minimum over all processors Mess: number of messages sent Avg. len: average message length (bytes) Reduct: number of global reductions Global: entire computation Stage: stages of a computation. Set stages with PetscLogStagePush() and PetscLogStagePop(). %T - percent time in this phase %F - percent flops in this phase %M - percent messages in this phase %L - percent message lengths in this phase %R - percent reductions in this phase Total Mflop/s: 10e-6 * (sum of flops over all processors)/(max time over all processors) ------------------------------------------------------------------------------------------------------------------------ Event Count Time (sec) Flops --- Global --- --- Stage --- Total Max Ratio Max Ratio Max Ratio Mess Avg len Reduct %T %F %M %L %R %T %F %M %L %R Mflop/s ------------------------------------------------------------------------------------------------------------------------ --- Event Stage 0: Main Stage IGAFormScalar 11 1.0 4.9933e+00 1.0 4.75e+06 1.0 0.0e+00 0.0e+00 0.0e+00 1 0 0 0 0 1 0 0 0 0 2 IGAFormSystem 1 1.0 4.5438e-01 1.0 1.63e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 719 IGAFormIFunction 82 1.0 1.0503e+02 1.0 2.47e+09 1.0 0.0e+00 0.0e+00 0.0e+00 20 2 0 0 0 20 2 0 0 0 47 IGAFormIJacobian 10 1.0 2.3141e+02 1.0 4.07e+10 1.0 0.0e+00 0.0e+00 0.0e+00 43 36 0 0 0 43 36 0 0 0 352 VecView 48 1.0 9.8464e-03 1.0 0.00e+00 0.0 4.8e+01 4.8e+04 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecDot 72 1.0 1.0435e-02 1.3 2.82e+06 1.2 0.0e+00 0.0e+00 7.2e+01 0 0 0 0 1 0 0 0 0 1 491 VecMDot 2115 1.4 5.3507e+0020.7 1.59e+08 1.0 0.0e+00 0.0e+00 1.5e+03 1 0 0 0 13 1 0 0 0 13 59 VecTDot 2595 1.0 6.2390e-01 2.0 2.49e+07 1.2 0.0e+00 0.0e+00 2.6e+03 0 0 0 0 22 0 0 0 0 22 73 VecNorm 2744 1.3 2.4158e+00 9.4 5.97e+07 1.0 0.0e+00 0.0e+00 2.0e+03 0 0 0 0 18 0 0 0 0 18 49 VecScale 2830 1.3 1.3459e-02 1.1 3.41e+07 1.1 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 4916 VecCopy 1061 1.1 9.5375e-03 1.4 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecSet 5711 1.5 4.3843e-02 1.3 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecAXPY 3226 1.1 1.3904e-02 1.0 4.17e+07 1.1 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 5637 VecAYPX 1203 1.0 4.1418e-03 1.2 1.64e+07 1.2 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 7234 VecAXPBYCZ 348 0.0 2.4459e-03 0.0 7.61e+06 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 3110 VecWAXPY 339 1.4 6.9184e-03 1.2 4.82e+06 1.1 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 1357 VecMAXPY 2490 1.4 4.6477e-02 1.0 2.06e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 8866 VecAssemblyBegin 1550 1.1 2.4032e+0121.3 0.00e+00 0.0 1.6e+03 5.3e+05 4.4e+03 2 0 17 32 38 2 0 17 32 38 0 VecAssemblyEnd 1550 1.1 1.5775e-01 1.2 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecLoad 1 1.0 1.1816e-03 1.0 0.00e+00 0.0 1.0e+00 1.9e+05 3.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecScatterBegin 5747 1.0 1.4383e-01 1.1 0.00e+00 0.0 7.9e+03 6.3e+04 0.0e+00 0 0 80 18 0 0 0 80 18 0 0 VecScatterEnd 5747 1.0 2.1346e-01 1.2 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecReduceArith 108 1.0 3.1109e-03 1.2 4.23e+06 1.2 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 2472 VecReduceComm 36 1.0 6.4516e-03 1.2 0.00e+00 0.0 0.0e+00 0.0e+00 3.6e+01 0 0 0 0 0 0 0 0 0 0 0 VecNormalize 649 0.0 6.2337e-03 0.0 1.31e+07 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 2109 MatMult 3670 1.2 1.7203e+01 1.2 2.81e+10 1.2 6.2e+03 1.7e+04 0.0e+00 3 23 63 4 0 3 23 63 4 0 3007 MatSolve 3238 1.3 1.1799e+01 1.2 1.95e+10 1.2 0.0e+00 0.0e+00 0.0e+00 2 16 0 0 0 2 16 0 0 0 3064 MatLUFactorNum 94 7.8 9.6308e+00 1.0 2.52e+10 1.1 0.0e+00 0.0e+00 0.0e+00 2 21 0 0 0 2 21 0 0 0 4939 MatILUFactorSym 8528.3 7.0743e-02 2.1 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatScale 1 1.0 5.5289e-04 1.2 5.70e+05 1.2 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 1881 MatAssemblyBegin 361 1.3 6.0246e+0027.3 0.00e+00 0.0 3.3e+01 4.0e+07 1.5e+02 1 0 0 49 1 1 0 0 49 1 0 MatAssemblyEnd 361 1.3 4.1197e+00 5.3 0.00e+00 0.0 9.2e+01 2.4e+03 1.8e+02 0 0 1 0 2 0 0 1 0 2 0 MatGetRow 249600 1.2 3.2938e-02 1.2 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatGetRowIJ 8528.3 1.5736e-0516.5 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatGetSubMatrix 44 1.0 1.3199e+01 1.0 0.00e+00 0.0 1.6e+01 3.8e+03 1.9e+02 2 0 0 0 2 2 0 0 0 2 0 MatGetOrdering 8528.3 1.4243e-0310.7 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatZeroEntries 133 2.6 4.8704e-01 4.7 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatView 9 1.8 2.1822e-03 1.5 0.00e+00 0.0 0.0e+00 0.0e+00 8.0e+00 0 0 0 0 0 0 0 0 0 0 0 KSPGMRESOrthog 2115 1.4 5.3908e+0018.3 3.18e+08 1.0 0.0e+00 0.0e+00 1.5e+03 1 0 0 0 13 1 0 0 0 13 118 KSPSetUp 152 2.2 2.5470e-03 4.8 0.00e+00 0.0 0.0e+00 0.0e+00 2.0e+00 0 0 0 0 0 0 0 0 0 0 0 KSPSolve 119 3.2 5.6646e+01 1.1 7.04e+10 1.1 6.2e+03 1.7e+04 6.2e+03 10 61 63 4 53 10 61 63 4 53 2409 PCSetUp 117 3.3 2.5130e+01 1.1 2.52e+10 1.1 2.4e+01 1.4e+04 2.8e+02 4 21 0 0 2 4 21 0 0 2 1893 PCSetUpOnBlocks 517 1.0 9.6650e+00 1.3 2.23e+10 1.3 0.0e+00 0.0e+00 0.0e+00 2 18 0 0 0 2 18 0 0 0 4067 PCApply 920 3.4 3.5882e+01 1.0 6.40e+10 1.2 5.7e+03 1.5e+04 5.4e+03 7 52 58 3 46 7 52 58 3 46 3216 KSPSolve_FS_0 258 1.0 3.2824e+01 1.0 6.00e+10 1.3 2.6e+03 2.6e+04 2.8e+03 6 48 26 2 24 6 48 26 2 24 3254 KSPSolve_FS_Schu 258 1.0 2.1657e+00 1.0 2.93e+09 1.2 2.6e+03 6.4e+03 2.6e+03 0 2 26 1 22 0 2 26 1 22 2464 TSStep 10 1.0 4.7033e+02 1.0 1.14e+11 1.0 9.4e+03 2.9e+05 1.1e+04 88100 96100 93 88100 96100 93 474 TSFunctionEval 82 1.0 1.8310e+02 1.0 1.32e+10 5.3 3.1e+03 4.1e+05 3.8e+03 34 7 32 47 32 34 7 32 47 32 86 TSJacobianEval 10 1.0 2.3556e+02 1.0 4.07e+10 1.0 1.1e+02 1.2e+07 2.0e+01 44 36 1 49 0 44 36 1 49 0 345 SNESSolve 10 1.0 4.7033e+02 1.0 1.14e+11 1.0 9.4e+03 2.9e+05 1.1e+04 88100 96100 93 88100 96100 93 474 SNESFunctionEval 82 1.0 1.8311e+02 1.0 1.32e+10 5.3 3.1e+03 4.1e+05 3.8e+03 34 7 32 47 32 34 7 32 47 32 86 SNESJacobianEval 10 1.0 2.3556e+02 1.0 4.07e+10 1.0 1.1e+02 1.2e+07 2.0e+01 44 36 1 49 0 44 36 1 49 0 345 SNESLineSearch 36 1.0 1.6004e+02 1.0 1.16e+10 5.3 2.7e+03 4.1e+05 3.4e+03 30 6 28 41 29 30 6 28 41 29 86 ------------------------------------------------------------------------------------------------------------------------ Memory usage is given in bytes: Object Type Creations Destructions Memory Descendants' Mem. Reports information only for process 0. --- Event Stage 0: Main Stage IGA 5 5 6200 0. IGAM 2 2 4640 0. Viewer 58 56 45744 0. Vector 1569 1555 88469584 0. Vector Scatter 48 47 1086224 0. Index Set 397 397 3577968 0. IS L to G Mapping 314 311 7887424 0. Application Order 6 6 224176 0. Matrix 321 320 1247373260 0. Distributed Mesh 10 10 45896 0. Star Forest Bipartite Graph 20 20 15840 0. Discrete System 10 10 8640 0. Krylov Solver 92 92 1556536 0. DMKSP interface 1 1 648 0. Preconditioner 92 92 91336 0. TSAdapt 1 1 1216 0. TS 1 1 1840 0. DMTS 1 1 736 0. SNES 1 1 1332 0. SNESLineSearch 1 1 992 0. DMSNES 2 2 1328 0. ======================================================================================================================== Average time to get PetscTime(): 2.38419e-08 Average time for MPI_Barrier(): 5.19753e-05 Average time for zero size MPI_Send(): 2.11e-05 #PETSc Option Table entries: -fieldsplit_m_ksp_convergence_test skip -fieldsplit_m_ksp_max_it 5 -fieldsplit_m_ksp_norm_type none -fieldsplit_m_ksp_type fgmres -fieldsplit_m_pc_type bjacobi -fieldsplit_m_sub_ksp_type preonly -fieldsplit_m_sub_pc_factor_levels 0 -fieldsplit_m_sub_pc_type ilu -fieldsplit_p_ksp_ksp_convergence_test skip -fieldsplit_p_ksp_ksp_max_it 5 -fieldsplit_p_ksp_ksp_norm_type none -fieldsplit_p_ksp_ksp_type cg -fieldsplit_p_ksp_pc_type bjacobi -fieldsplit_p_ksp_type preonly -fieldsplit_p_pc_type ksp -geo_iga_load em3d_geo.dat -geo_iga_order 2 -geo_iga_periodic 1,1,0 -geo_iga_quadrature 3,3,3 -iga_view -igam_view -ksp_atol 1e-8 -ksp_converged_reason -ksp_monitor -ksp_norm_type unpreconditioned -ksp_rtol 0.0 -ksp_type fgmres -log_view -p_iga_load em3d_p.dat -p_iga_order 1 -p_iga_periodic 1,1,0 -p_iga_quadrature 3,3,3 -pc_fieldsplit_schur_fact_type upper -pc_fieldsplit_schur_precondition user -pc_fieldsplit_type schur -pc_type fieldsplit -press_ksp_rtol 1e-10 -snes_converged_reason -snes_lag_jacobian 20 -snes_linesearch_type cp -snes_max_it 150 -snes_monitor -snes_rtol 1e-3 -ts_max_snes_failures 20000 -ts_monitor -ts_view -u_iga_load em3d_u.dat -u_iga_order 1 -u_iga_periodic 1,1,0 -u_iga_quadrature 3,3,3 -v_iga_load em3d_v.dat -v_iga_order 1 -v_iga_periodic 1,1,0 -v_iga_quadrature 3,3,3 -w_iga_load em3d_w.dat -w_iga_order 1 -w_iga_periodic 1,1,0 -w_iga_quadrature 3,3,3 #End of PETSc Option Table entries Compiled without FORTRAN kernels Compiled with full precision matrices (default) sizeof(short) 2 sizeof(int) 4 sizeof(long) 8 sizeof(void*) 8 sizeof(PetscScalar) 8 sizeof(PetscInt) 4 Configure options: --with-cc=gcc --with-fc=gfortran --download-fblaslapack --download-mpich --with-debugging=0 COPTFLAGS=-O3 FOPTFLAGS=-O3 CXXOPTFLAGS=-O3 PETSC_ARCH=optimO3fftw --download-mumps --download-hypre --download-scalapack --download-parmetis --download-metis --download-fftw --download-cmake ----------------------------------------- Libraries compiled on Thu Feb 22 11:36:47 2018 on ubuntu Machine characteristics: Linux-4.13.0-32-generic-x86_64-with-Ubuntu-16.04-xenial Using PETSc directory: /home/hcasquer/petsc-3.7.6 Using PETSc arch: optimO3fftw ----------------------------------------- Using C compiler: /home/hcasquer/petsc-3.7.6/optimO3fftw/bin/mpicc -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fvisibility=hidden -O3 ${COPTFLAGS} ${CFLAGS} Using Fortran compiler: /home/hcasquer/petsc-3.7.6/optimO3fftw/bin/mpif90 -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -O3 ${FOPTFLAGS} ${FFLAGS} ----------------------------------------- Using include paths: -I/home/hcasquer/petsc-3.7.6/optimO3fftw/include -I/home/hcasquer/petsc-3.7.6/include -I/home/hcasquer/petsc-3.7.6/include -I/home/hcasquer/petsc-3.7.6/optimO3fftw/include ----------------------------------------- Using C linker: /home/hcasquer/petsc-3.7.6/optimO3fftw/bin/mpicc Using Fortran linker: /home/hcasquer/petsc-3.7.6/optimO3fftw/bin/mpif90 Using libraries: -Wl,-rpath,/home/hcasquer/petsc-3.7.6/optimO3fftw/lib -L/home/hcasquer/petsc-3.7.6/optimO3fftw/lib -lpetsc -Wl,-rpath,/home/hcasquer/petsc-3.7.6/optimO3fftw/lib -L/home/hcasquer/petsc-3.7.6/optimO3fftw/lib -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lpthread -lparmetis -lmetis -lfftw3_mpi -lfftw3 -lHYPRE -lmpicxx -lstdc++ -lm -lscalapack -lflapack -lfblas -lpthread -lm -lmpifort -lgfortran -lm -lgfortran -lm -lquadmath -lmpicxx -lstdc++ -lm -ldl -lmpi -lgcc_s -ldl ----------------------------------------- -------------- next part -------------- muS = 2.000000e-03 cS = 5.000000e+00 kappaS = 1.000000e-12 IGA: name=(null) prefix=geo_ IGA: dim=3 dof=1 order=2 geometry=3 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=u_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[3,2] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=v_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[3,2] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=w_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[3,2] rule=LEGENDRE[3] periodic=0 nnp=23 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=9200 min=4000 max=5200 max/min=1.3 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=p_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. nquadghost*commsize*user->safetyquadghost = 574452, nquadghost*nghost*user->safetyquadghost = 287226, nquadghost*user->safetyquadghost = 287226 nquadreal*commsize*user->safetyquad = 1531904, nquadreal*nghost*user->safetyquad = 765952, nquadreal*user->safetyquad = 765952 IGA: name=(null) prefix=geo_ IGA: dim=3 dof=1 order=2 geometry=3 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=p_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. user.Alpha_f: 6.666667e-01 user.Alpha_m: 8.333333e-01 user.gamma: 6.666667e-01 th->shift_V: 1.875000e+04 0 TS dt 0.0001 time 0. Linear solve converged due to CONVERGED_ATOL iterations 0 FirstNewton = 0 0 SNES Function norm 3.572897994044e+01 NORM2F: 3.572898e+01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 3.572898e+01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.299331e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 2.051284e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 0.000000e+00 NORM2dof3/NORM2dof30: -nan isolid: 0 NORM2S: 0.000000e+00 NORM2S/NORM2S0: -nan Tangent 0 KSP Residual norm 3.572897994044e+01 1 KSP Residual norm 4.590932150940e-03 2 KSP Residual norm 1.083125383106e-03 3 KSP Residual norm 2.663513431881e-04 4 KSP Residual norm 8.855948174614e-05 5 KSP Residual norm 1.384048225253e-05 6 KSP Residual norm 3.967355444540e-06 7 KSP Residual norm 6.673586109137e-07 8 KSP Residual norm 2.483423008400e-07 9 KSP Residual norm 6.132481698670e-08 10 KSP Residual norm 9.689659346506e-09 Linear solve converged due to CONVERGED_ATOL iterations 10 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 1.090748487093e-02 NORM2F: 1.090748e-02 NORM2F/NORM2F0: 3.052840e-04 NORM2dof0: 7.230531e-03 NORM2dof0/NORM2dof00: 2.023716e-04 NORM2dof1: 5.503796e-03 NORM2dof1/NORM2dof10: 4.235868e+00 NORM2dof2: 6.033314e-03 NORM2dof2/NORM2dof20: 2.941237e+00 NORM2dof3: 8.833763e-09 NORM2dof3/NORM2dof30: inf isolid: 0 NORM2S: 1.830489e-10 NORM2S/NORM2S0: inf Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1 1 TS dt 0.0001 time 0.0001 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 1.785763644723e+01 NORM2F: 1.785764e+01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 1.785762e+01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.556293e-02 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.702734e-02 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 1.325064e-08 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 9.701488e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 1.785763644723e+01 1 KSP Residual norm 5.049628562672e-02 2 KSP Residual norm 3.604517028340e-03 3 KSP Residual norm 7.619397990279e-04 4 KSP Residual norm 1.195867329688e-04 5 KSP Residual norm 2.195409915994e-05 6 KSP Residual norm 4.518605013445e-06 7 KSP Residual norm 1.857558801337e-06 8 KSP Residual norm 2.412824487049e-07 9 KSP Residual norm 9.323085453447e-08 10 KSP Residual norm 2.206166844090e-08 11 KSP Residual norm 4.267397332757e-09 Linear solve converged due to CONVERGED_ATOL iterations 11 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 2.844794057914e-03 NORM2F: 2.844794e-03 NORM2F/NORM2F0: 1.593041e-04 NORM2dof0: 2.062497e-03 NORM2dof0/NORM2dof00: 1.154967e-04 NORM2dof1: 1.454168e-03 NORM2dof1/NORM2dof10: 9.343790e-02 NORM2dof2: 1.313147e-03 NORM2dof2/NORM2dof20: 7.711992e-02 NORM2dof3: 4.141942e-09 NORM2dof3/NORM2dof30: 3.125842e-01 isolid: 0 NORM2S: 4.985943e-11 NORM2S/NORM2S0: 5.139359e-02 0 KSP Residual norm 2.844794057914e-03 1 KSP Residual norm 2.295043475140e-03 2 KSP Residual norm 1.583104677397e-04 3 KSP Residual norm 1.490919842249e-05 4 KSP Residual norm 1.548465044314e-06 5 KSP Residual norm 2.640015039882e-07 6 KSP Residual norm 4.322481936505e-08 7 KSP Residual norm 1.473218623930e-08 8 KSP Residual norm 2.888610560303e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 1.254901830764e-04 NORM2F: 1.254902e-04 NORM2F/NORM2F0: 7.027256e-06 NORM2dof0: 6.833894e-05 NORM2dof0/NORM2dof00: 3.826878e-06 NORM2dof1: 5.101309e-05 NORM2dof1/NORM2dof10: 3.277859e-03 NORM2dof2: 9.206107e-05 NORM2dof2/NORM2dof20: 5.406660e-03 NORM2dof3: 2.733176e-09 NORM2dof3/NORM2dof30: 2.062674e-01 isolid: 0 NORM2S: 5.337186e-12 NORM2S/NORM2S0: 5.501410e-03 0 KSP Residual norm 1.254901830764e-04 1 KSP Residual norm 1.003678752319e-04 2 KSP Residual norm 1.193320199662e-05 3 KSP Residual norm 5.187856997250e-07 4 KSP Residual norm 6.216090456497e-08 5 KSP Residual norm 1.241994457162e-08 6 KSP Residual norm 3.149627739638e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 8.107335727411e-06 NORM2F: 8.107336e-06 NORM2F/NORM2F0: 4.539983e-07 NORM2dof0: 4.912488e-06 NORM2dof0/NORM2dof00: 2.750920e-07 NORM2dof1: 3.357647e-06 NORM2dof1/NORM2dof10: 2.157464e-04 NORM2dof2: 5.506592e-06 NORM2dof2/NORM2dof20: 3.233970e-04 NORM2dof3: 3.023016e-09 NORM2dof3/NORM2dof30: 2.281411e-01 isolid: 0 NORM2S: 5.802563e-13 NORM2S/NORM2S0: 5.981107e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 3 2 TS dt 0.0001 time 0.0002 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 8.924122178623e+00 NORM2F: 8.924122e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 8.924122e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 2.326868e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 2.202884e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 8.367864e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.201607e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 8.924122178623e+00 1 KSP Residual norm 6.607063311337e-03 2 KSP Residual norm 3.141865121249e-04 3 KSP Residual norm 6.120575062793e-05 4 KSP Residual norm 9.242740946536e-06 5 KSP Residual norm 1.330632161204e-06 6 KSP Residual norm 5.727762329871e-07 7 KSP Residual norm 9.569604813401e-08 8 KSP Residual norm 2.510214585840e-08 9 KSP Residual norm 5.482441703249e-09 Linear solve converged due to CONVERGED_ATOL iterations 9 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 3.845740765509e-03 NORM2F: 3.845741e-03 NORM2F/NORM2F0: 4.309377e-04 NORM2dof0: 2.666434e-03 NORM2dof0/NORM2dof00: 2.987895e-04 NORM2dof1: 1.926033e-03 NORM2dof1/NORM2dof10: 8.277363e-01 NORM2dof2: 1.992548e-03 NORM2dof2/NORM2dof20: 9.045182e-01 NORM2dof3: 5.467552e-09 NORM2dof3/NORM2dof30: 6.533988e-01 isolid: 0 NORM2S: 8.819637e-11 NORM2S/NORM2S0: 1.224676e-01 0 KSP Residual norm 3.845740765509e-03 1 KSP Residual norm 3.268192036308e-03 2 KSP Residual norm 4.485759584749e-04 3 KSP Residual norm 5.155662226310e-05 4 KSP Residual norm 4.845743277427e-06 5 KSP Residual norm 1.439807997833e-06 6 KSP Residual norm 1.043760500879e-07 7 KSP Residual norm 3.976004664735e-08 8 KSP Residual norm 7.196889052151e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 1.523034956682e-04 NORM2F: 1.523035e-04 NORM2F/NORM2F0: 1.706650e-05 NORM2dof0: 1.001345e-04 NORM2dof0/NORM2dof00: 1.122066e-05 NORM2dof1: 6.852295e-05 NORM2dof1/NORM2dof10: 2.944857e-02 NORM2dof2: 9.205456e-05 NORM2dof2/NORM2dof20: 4.178821e-02 NORM2dof3: 6.848339e-09 NORM2dof3/NORM2dof30: 8.184095e-01 isolid: 0 NORM2S: 9.759938e-12 NORM2S/NORM2S0: 1.355244e-02 0 KSP Residual norm 1.523034956682e-04 1 KSP Residual norm 1.193197002186e-04 2 KSP Residual norm 1.286757063887e-05 3 KSP Residual norm 1.947459077245e-06 4 KSP Residual norm 5.526459923945e-07 5 KSP Residual norm 5.326425072565e-08 6 KSP Residual norm 4.721859648580e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 4 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 5 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 6 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 7 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 8 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 9 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 10 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 11 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 12 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 13 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 14 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 15 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 16 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 17 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 18 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 19 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147024084989e-05 2 KSP Residual norm 1.642505389042e-06 3 KSP Residual norm 9.393394019526e-08 4 KSP Residual norm 3.802608124054e-08 5 KSP Residual norm 3.488335294398e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 20 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 Tangent 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 21 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 22 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 23 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 24 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 25 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 26 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 27 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 28 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 29 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 30 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 31 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 32 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 33 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 34 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 35 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 36 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 37 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 38 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 39 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 40 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 Tangent 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 41 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 42 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 43 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 44 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 45 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 46 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 47 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 48 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 49 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 0 KSP Residual norm 1.411908637477e-05 1 KSP Residual norm 1.147023578592e-05 2 KSP Residual norm 1.642507630910e-06 3 KSP Residual norm 9.393490366608e-08 4 KSP Residual norm 3.802566188907e-08 5 KSP Residual norm 3.488598835081e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 50 SNES Function norm 1.411908637477e-05 NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 50 3 TS dt 0.0001 time 0.0003 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 4.459023374308e+00 NORM2F: 4.459023e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 4.459018e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 4.578319e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 5.151374e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 8.168056e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.330777e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 4.459023374308e+00 1 KSP Residual norm 1.550613487152e-02 2 KSP Residual norm 1.183783138283e-03 3 KSP Residual norm 2.267886395266e-04 4 KSP Residual norm 2.353995026891e-05 5 KSP Residual norm 6.835200755683e-06 6 KSP Residual norm 1.321943427943e-06 7 KSP Residual norm 6.109725800169e-07 8 KSP Residual norm 6.446081981328e-08 9 KSP Residual norm 2.632010042493e-08 10 KSP Residual norm 4.920689591102e-09 Linear solve converged due to CONVERGED_ATOL iterations 10 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 1.236926864027e-03 NORM2F: 1.236927e-03 NORM2F/NORM2F0: 2.773986e-04 NORM2dof0: 6.991018e-04 NORM2dof0/NORM2dof00: 1.567838e-04 NORM2dof1: 4.909298e-04 NORM2dof1/NORM2dof10: 1.072292e-01 NORM2dof2: 8.945573e-04 NORM2dof2/NORM2dof20: 1.736541e-01 NORM2dof3: 4.747502e-09 NORM2dof3/NORM2dof30: 5.812279e-01 isolid: 0 NORM2S: 8.726198e-11 NORM2S/NORM2S0: 1.190351e-01 0 KSP Residual norm 1.236926864027e-03 1 KSP Residual norm 1.071127264500e-03 2 KSP Residual norm 1.751214473962e-04 3 KSP Residual norm 2.704156117881e-05 4 KSP Residual norm 5.488005113558e-06 5 KSP Residual norm 7.722886659587e-07 6 KSP Residual norm 7.098438747194e-08 7 KSP Residual norm 1.983193288033e-08 8 KSP Residual norm 4.748543039977e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 9.096330543561e-05 NORM2F: 9.096331e-05 NORM2F/NORM2F0: 2.039983e-05 NORM2dof0: 5.166861e-05 NORM2dof0/NORM2dof00: 1.158744e-05 NORM2dof1: 3.547412e-05 NORM2dof1/NORM2dof10: 7.748284e-03 NORM2dof2: 6.592621e-05 NORM2dof2/NORM2dof20: 1.279779e-02 NORM2dof3: 4.701915e-09 NORM2dof3/NORM2dof30: 5.756467e-01 isolid: 0 NORM2S: 9.560042e-12 NORM2S/NORM2S0: 1.304097e-02 0 KSP Residual norm 9.096330543561e-05 1 KSP Residual norm 7.533403951589e-05 2 KSP Residual norm 1.381728268481e-05 3 KSP Residual norm 1.091611453418e-06 4 KSP Residual norm 4.192008920668e-07 5 KSP Residual norm 4.482015838680e-08 6 KSP Residual norm 3.774406616492e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 4 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 5 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 6 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 7 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 8 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 9 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 10 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 11 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 12 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 13 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 14 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 15 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 16 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 17 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 18 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 19 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990857028187e-06 2 KSP Residual norm 9.578210213199e-07 3 KSP Residual norm 1.479683659993e-07 4 KSP Residual norm 4.631330261324e-08 5 KSP Residual norm 3.440725247739e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 20 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 Tangent 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 21 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 22 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 23 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 24 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 25 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 26 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 27 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 28 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 29 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 30 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 31 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 32 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 33 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 34 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 35 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 36 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 37 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 38 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 39 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 40 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 Tangent 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 41 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 42 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 43 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 44 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 45 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 46 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 47 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 48 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 49 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 0 KSP Residual norm 9.951450618798e-06 1 KSP Residual norm 7.990856944949e-06 2 KSP Residual norm 9.578210894798e-07 3 KSP Residual norm 1.479686480708e-07 4 KSP Residual norm 4.631312748017e-08 5 KSP Residual norm 3.440843607197e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 50 SNES Function norm 9.951450618798e-06 NORM2F: 9.951451e-06 NORM2F/NORM2F0: 2.231756e-06 NORM2dof0: 7.264841e-06 NORM2dof0/NORM2dof00: 1.629247e-06 NORM2dof1: 4.344457e-06 NORM2dof1/NORM2dof10: 9.489196e-04 NORM2dof2: 5.232507e-06 NORM2dof2/NORM2dof20: 1.015750e-03 NORM2dof3: 3.834626e-09 NORM2dof3/NORM2dof30: 4.694662e-01 isolid: 0 NORM2S: 1.046678e-12 NORM2S/NORM2S0: 1.427786e-03 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 50 4 TS dt 0.0001 time 0.0004 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 2.227652018978e+00 NORM2F: 2.227652e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 2.227651e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 9.432557e-04 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.534747e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 5.335951e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.711838e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent [mpiexec at ubuntu] Sending Ctrl-C to processes as requested [mpiexec at ubuntu] Press Ctrl-C again to force abort -------------- next part -------------- muS = 2.000000e-03 cS = 5.000000e+00 kappaS = 1.000000e-12 IGA: name=(null) prefix=geo_ IGA: dim=3 dof=1 order=2 geometry=3 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=u_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[3,2] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=v_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[3,2] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=w_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[3,2] rule=LEGENDRE[3] periodic=0 nnp=23 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=9200 min=4000 max=5200 max/min=1.3 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=p_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. nquadghost*commsize*user->safetyquadghost = 574452, nquadghost*nghost*user->safetyquadghost = 287226, nquadghost*user->safetyquadghost = 287226 nquadreal*commsize*user->safetyquad = 1531904, nquadreal*nghost*user->safetyquad = 765952, nquadreal*user->safetyquad = 765952 IGA: name=(null) prefix=geo_ IGA: dim=3 dof=1 order=2 geometry=3 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. IGA: name=(null) prefix=p_ IGA: dim=3 dof=1 order=1 geometry=0 rational=0 property=0 Axis 0: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 1: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=1 nnp=20 nel=20 Axis 2: basis=BSPLINE[2,1] rule=LEGENDRE[3] periodic=0 nnp=22 nel=20 Partition - MPI: processors=[1,1,2] total=2 Partition - nnp: sum=8800 min=4000 max=4800 max/min=1.2 Partition - nel: sum=8000 min=4000 max=4000 max/min=1. user.Alpha_f: 6.666667e-01 user.Alpha_m: 8.333333e-01 user.gamma: 6.666667e-01 th->shift_V: 1.875000e+04 0 TS dt 0.0001 time 0. Linear solve converged due to CONVERGED_ATOL iterations 0 FirstNewton = 0 0 SNES Function norm 3.572897994044e+01 NORM2F: 3.572898e+01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 3.572898e+01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.299331e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 2.051284e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 0.000000e+00 NORM2dof3/NORM2dof30: -nan isolid: 0 NORM2S: 0.000000e+00 NORM2S/NORM2S0: -nan Tangent 0 KSP Residual norm 3.572897994044e+01 1 KSP Residual norm 4.590932150940e-03 2 KSP Residual norm 1.083125383106e-03 3 KSP Residual norm 2.663513431881e-04 4 KSP Residual norm 8.855948174614e-05 5 KSP Residual norm 1.384048225253e-05 6 KSP Residual norm 3.967355444540e-06 7 KSP Residual norm 6.673586109137e-07 8 KSP Residual norm 2.483423008400e-07 9 KSP Residual norm 6.132481698670e-08 10 KSP Residual norm 9.689659346506e-09 Linear solve converged due to CONVERGED_ATOL iterations 10 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 8.179534168795e-03 NORM2F: 8.179534e-03 NORM2F/NORM2F0: 2.289328e-04 NORM2dof0: 5.417333e-03 NORM2dof0/NORM2dof00: 1.516229e-04 NORM2dof1: 4.128207e-03 NORM2dof1/NORM2dof10: 3.177177e+00 NORM2dof2: 4.529371e-03 NORM2dof2/NORM2dof20: 2.208066e+00 NORM2dof3: 8.833843e-09 NORM2dof3/NORM2dof30: inf isolid: 0 NORM2S: 5.491667e-10 NORM2S/NORM2S0: inf Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1 1 TS dt 0.0001 time 0.0001 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 1.785811875746e+01 NORM2F: 1.785812e+01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 1.785811e+01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.322644e-02 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.447647e-02 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 1.325076e-08 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 9.335547e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 1.785811875746e+01 1 KSP Residual norm 4.296571408960e-02 2 KSP Residual norm 3.122248048448e-03 3 KSP Residual norm 7.130517384309e-04 4 KSP Residual norm 1.200695618806e-04 5 KSP Residual norm 2.051457303686e-05 6 KSP Residual norm 4.752085930166e-06 7 KSP Residual norm 1.460661506211e-06 8 KSP Residual norm 2.174375435375e-07 9 KSP Residual norm 6.433692523485e-08 10 KSP Residual norm 1.394483067890e-08 11 KSP Residual norm 2.009854195400e-09 Linear solve converged due to CONVERGED_ATOL iterations 11 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 1.807740322922e-03 NORM2F: 1.807740e-03 NORM2F/NORM2F0: 1.012279e-04 NORM2dof0: 1.314040e-03 NORM2dof0/NORM2dof00: 7.358226e-05 NORM2dof1: 9.149102e-04 NORM2dof1/NORM2dof10: 6.917281e-02 NORM2dof2: 8.391445e-04 NORM2dof2/NORM2dof20: 5.796611e-02 NORM2dof3: 1.948126e-09 NORM2dof3/NORM2dof30: 1.470199e-01 isolid: 0 NORM2S: 1.371767e-10 NORM2S/NORM2S0: 1.469402e-01 0 KSP Residual norm 1.807740322922e-03 1 KSP Residual norm 1.451506444230e-03 2 KSP Residual norm 9.510919862795e-05 3 KSP Residual norm 8.399504895801e-06 4 KSP Residual norm 8.657398775652e-07 5 KSP Residual norm 1.485686856288e-07 6 KSP Residual norm 2.630954389838e-08 7 KSP Residual norm 9.208863855727e-09 Linear solve converged due to CONVERGED_ATOL iterations 7 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 3.562298901787e-04 NORM2F: 3.562299e-04 NORM2F/NORM2F0: 1.994778e-05 NORM2dof0: 2.576370e-04 NORM2dof0/NORM2dof00: 1.442689e-05 NORM2dof1: 1.827372e-04 NORM2dof1/NORM2dof10: 1.381605e-02 NORM2dof2: 1.647119e-04 NORM2dof2/NORM2dof20: 1.137791e-02 NORM2dof3: 8.991546e-09 NORM2dof3/NORM2dof30: 6.785681e-01 isolid: 0 NORM2S: 4.523333e-11 NORM2S/NORM2S0: 4.845279e-02 0 KSP Residual norm 3.562298901787e-04 1 KSP Residual norm 2.874774960479e-04 2 KSP Residual norm 1.377691650681e-05 3 KSP Residual norm 1.649125322363e-06 4 KSP Residual norm 2.048704731035e-07 5 KSP Residual norm 2.862642640770e-08 6 KSP Residual norm 6.184460810271e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 7.432116405686e-05 NORM2F: 7.432116e-05 NORM2F/NORM2F0: 4.161758e-06 NORM2dof0: 5.292265e-05 NORM2dof0/NORM2dof00: 2.963508e-06 NORM2dof1: 3.812343e-05 NORM2dof1/NORM2dof10: 2.882364e-03 NORM2dof2: 3.562910e-05 NORM2dof2/NORM2dof20: 2.461173e-03 NORM2dof3: 6.104188e-09 NORM2dof3/NORM2dof30: 4.606668e-01 isolid: 0 NORM2S: 1.495513e-11 NORM2S/NORM2S0: 1.601955e-02 0 KSP Residual norm 7.432116405686e-05 1 KSP Residual norm 6.012965573878e-05 2 KSP Residual norm 1.290383408559e-06 3 KSP Residual norm 2.827520158979e-07 4 KSP Residual norm 4.658855980387e-08 5 KSP Residual norm 1.136337746901e-08 6 KSP Residual norm 1.609818301928e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.654931139050e-05 NORM2F: 1.654931e-05 NORM2F/NORM2F0: 9.267108e-07 NORM2dof0: 1.148377e-05 NORM2dof0/NORM2dof00: 6.430562e-07 NORM2dof1: 8.318505e-06 NORM2dof1/NORM2dof10: 6.289299e-04 NORM2dof2: 8.532599e-06 NORM2dof2/NORM2dof20: 5.894117e-04 NORM2dof3: 1.570635e-09 NORM2dof3/NORM2dof30: 1.185316e-01 isolid: 0 NORM2S: 4.951918e-12 NORM2S/NORM2S0: 5.304368e-03 0 KSP Residual norm 1.654931139050e-05 1 KSP Residual norm 1.338742562915e-05 2 KSP Residual norm 4.528291440124e-07 3 KSP Residual norm 6.304923603869e-08 4 KSP Residual norm 1.035515227239e-08 5 KSP Residual norm 2.609822453988e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 5 SNES Function norm 3.956058392676e-06 NORM2F: 3.956058e-06 NORM2F/NORM2F0: 2.215272e-07 NORM2dof0: 2.659137e-06 NORM2dof0/NORM2dof00: 1.489036e-07 NORM2dof1: 1.899924e-06 NORM2dof1/NORM2dof10: 1.436459e-04 NORM2dof2: 2.229276e-06 NORM2dof2/NORM2dof20: 1.539931e-04 NORM2dof3: 2.513204e-09 NORM2dof3/NORM2dof30: 1.896648e-01 isolid: 0 NORM2S: 1.641180e-12 NORM2S/NORM2S0: 1.757990e-03 0 KSP Residual norm 3.956058392676e-06 1 KSP Residual norm 3.197570977809e-06 2 KSP Residual norm 2.748057468149e-07 3 KSP Residual norm 2.299688960592e-08 4 KSP Residual norm 5.261852437122e-09 Linear solve converged due to CONVERGED_ATOL iterations 4 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 6 SNES Function norm 1.018303282453e-06 NORM2F: 1.018303e-06 NORM2F/NORM2F0: 5.702187e-08 NORM2dof0: 6.638374e-07 NORM2dof0/NORM2dof00: 3.717289e-08 NORM2dof1: 4.552106e-07 NORM2dof1/NORM2dof10: 3.441671e-05 NORM2dof2: 6.237124e-07 NORM2dof2/NORM2dof20: 4.308457e-05 NORM2dof3: 5.252224e-09 NORM2dof3/NORM2dof30: 3.963714e-01 isolid: 0 NORM2S: 5.442581e-13 NORM2S/NORM2S0: 5.829954e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 6 2 TS dt 0.0001 time 0.0002 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 8.924366614113e+00 NORM2F: 8.924367e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 8.924366e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.039285e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.311270e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 1.078482e-08 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.282375e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 8.924366614113e+00 1 KSP Residual norm 2.948318247217e-03 2 KSP Residual norm 1.609798634706e-04 3 KSP Residual norm 3.198849647624e-05 4 KSP Residual norm 1.174804810293e-05 5 KSP Residual norm 1.554033028085e-06 6 KSP Residual norm 4.588793184781e-07 7 KSP Residual norm 1.024666188198e-07 8 KSP Residual norm 2.252862941671e-08 9 KSP Residual norm 4.561377911766e-09 Linear solve converged due to CONVERGED_ATOL iterations 9 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 2.871784646094e-03 NORM2F: 2.871785e-03 NORM2F/NORM2F0: 3.217914e-04 NORM2dof0: 1.983381e-03 NORM2dof0/NORM2dof00: 2.222433e-04 NORM2dof1: 1.434857e-03 NORM2dof1/NORM2dof10: 1.380619e+00 NORM2dof2: 1.501511e-03 NORM2dof2/NORM2dof20: 1.145081e+00 NORM2dof3: 4.311166e-09 NORM2dof3/NORM2dof30: 3.997439e-01 isolid: 0 NORM2S: 2.671486e-10 NORM2S/NORM2S0: 3.668427e-01 0 KSP Residual norm 2.871784646094e-03 1 KSP Residual norm 2.441603019966e-03 2 KSP Residual norm 3.357514143288e-04 3 KSP Residual norm 3.867792059380e-05 4 KSP Residual norm 3.448954948914e-06 5 KSP Residual norm 1.054948539852e-06 6 KSP Residual norm 7.390933578667e-08 7 KSP Residual norm 2.899606997760e-08 8 KSP Residual norm 5.225461480120e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 6.342201955712e-04 NORM2F: 6.342202e-04 NORM2F/NORM2F0: 7.106613e-05 NORM2dof0: 4.300068e-04 NORM2dof0/NORM2dof00: 4.818345e-05 NORM2dof1: 3.060014e-04 NORM2dof1/NORM2dof10: 2.944346e-01 NORM2dof2: 3.516995e-04 NORM2dof2/NORM2dof20: 2.682130e-01 NORM2dof3: 5.087391e-09 NORM2dof3/NORM2dof30: 4.717177e-01 isolid: 0 NORM2S: 8.873816e-11 NORM2S/NORM2S0: 1.218533e-01 0 KSP Residual norm 6.342201955712e-04 1 KSP Residual norm 5.445764200090e-04 2 KSP Residual norm 8.367942390528e-05 3 KSP Residual norm 9.995349815534e-06 4 KSP Residual norm 1.100800320727e-06 5 KSP Residual norm 2.893113064436e-07 6 KSP Residual norm 2.243754504028e-08 7 KSP Residual norm 6.401638759353e-09 Linear solve converged due to CONVERGED_ATOL iterations 7 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 1.444641188825e-04 NORM2F: 1.444641e-04 NORM2F/NORM2F0: 1.618760e-05 NORM2dof0: 9.681361e-05 NORM2dof0/NORM2dof00: 1.084823e-05 NORM2dof1: 6.600938e-05 NORM2dof1/NORM2dof10: 6.351423e-02 NORM2dof2: 8.449715e-05 NORM2dof2/NORM2dof20: 6.443918e-02 NORM2dof3: 6.222114e-09 NORM2dof3/NORM2dof30: 5.769325e-01 isolid: 0 NORM2S: 2.950147e-11 NORM2S/NORM2S0: 4.051078e-02 0 KSP Residual norm 1.444641188825e-04 1 KSP Residual norm 1.250825921546e-04 2 KSP Residual norm 2.183478739945e-05 3 KSP Residual norm 2.634141022942e-06 4 KSP Residual norm 3.484980278422e-07 5 KSP Residual norm 7.770556133046e-08 6 KSP Residual norm 6.439444025435e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 3.404974125735e-05 NORM2F: 3.404974e-05 NORM2F/NORM2F0: 3.815368e-06 NORM2dof0: 2.272249e-05 NORM2dof0/NORM2dof00: 2.546118e-06 NORM2dof1: 1.436132e-05 NORM2dof1/NORM2dof10: 1.381846e-02 NORM2dof2: 2.090038e-05 NORM2dof2/NORM2dof20: 1.593904e-02 NORM2dof3: 6.333960e-09 NORM2dof3/NORM2dof30: 5.873031e-01 isolid: 0 NORM2S: 9.810853e-12 NORM2S/NORM2S0: 1.347205e-02 0 KSP Residual norm 3.404974125735e-05 1 KSP Residual norm 2.968795832402e-05 2 KSP Residual norm 5.933576632059e-06 3 KSP Residual norm 7.097281375035e-07 4 KSP Residual norm 1.099662748181e-07 5 KSP Residual norm 2.121937393132e-08 6 KSP Residual norm 1.780091758034e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 5 SNES Function norm 8.394933416134e-06 NORM2F: 8.394933e-06 NORM2F/NORM2F0: 9.406755e-07 NORM2dof0: 5.600056e-06 NORM2dof0/NORM2dof00: 6.275018e-07 NORM2dof1: 3.170236e-06 NORM2dof1/NORM2dof10: 3.050401e-03 NORM2dof2: 5.391093e-06 NORM2dof2/NORM2dof20: 4.111353e-03 NORM2dof3: 1.751450e-09 NORM2dof3/NORM2dof30: 1.623996e-01 isolid: 0 NORM2S: 3.262880e-12 NORM2S/NORM2S0: 4.480516e-03 0 KSP Residual norm 8.394933416134e-06 1 KSP Residual norm 7.356164396242e-06 2 KSP Residual norm 1.668067457609e-06 3 KSP Residual norm 1.953889313819e-07 4 KSP Residual norm 3.441296077683e-08 5 KSP Residual norm 5.873915380746e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 6 SNES Function norm 2.197166986925e-06 NORM2F: 2.197167e-06 NORM2F/NORM2F0: 2.461986e-07 NORM2dof0: 1.463049e-06 NORM2dof0/NORM2dof00: 1.639387e-07 NORM2dof1: 7.280334e-07 NORM2dof1/NORM2dof10: 7.005137e-04 NORM2dof2: 1.468661e-06 NORM2dof2/NORM2dof20: 1.120029e-03 NORM2dof3: 5.818840e-09 NORM2dof3/NORM2dof30: 5.395397e-01 isolid: 0 NORM2S: 1.085165e-12 NORM2S/NORM2S0: 1.490125e-03 0 KSP Residual norm 2.197166986925e-06 1 KSP Residual norm 1.929059425192e-06 2 KSP Residual norm 4.829978507880e-07 3 KSP Residual norm 5.487586753744e-08 4 KSP Residual norm 1.087871661245e-08 5 KSP Residual norm 1.815733500571e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 7 SNES Function norm 6.149432005351e-07 NORM2F: 6.149432e-07 NORM2F/NORM2F0: 6.890609e-08 NORM2dof0: 4.063714e-07 NORM2dof0/NORM2dof00: 4.553504e-08 NORM2dof1: 1.823771e-07 NORM2dof1/NORM2dof10: 1.754833e-04 NORM2dof2: 4.239726e-07 NORM2dof2/NORM2dof20: 3.233298e-04 NORM2dof3: 1.799799e-09 NORM2dof3/NORM2dof30: 1.668826e-01 isolid: 0 NORM2S: 3.608987e-13 NORM2S/NORM2S0: 4.955783e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 7 3 TS dt 0.0001 time 0.0003 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 4.459144715069e+00 NORM2F: 4.459145e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 4.459140e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 4.223876e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 4.770992e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 5.816681e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.322273e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 4.459144715069e+00 1 KSP Residual norm 1.430054211791e-02 2 KSP Residual norm 1.099723491566e-03 3 KSP Residual norm 2.191178105926e-04 4 KSP Residual norm 2.347923388451e-05 5 KSP Residual norm 6.913259216773e-06 6 KSP Residual norm 1.244769342719e-06 7 KSP Residual norm 6.494962371580e-07 8 KSP Residual norm 6.840468608238e-08 9 KSP Residual norm 1.623380135908e-08 10 KSP Residual norm 4.267476189880e-09 Linear solve converged due to CONVERGED_ATOL iterations 10 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 1.009931624841e-03 NORM2F: 1.009932e-03 NORM2F/NORM2F0: 2.264855e-04 NORM2dof0: 5.690566e-04 NORM2dof0/NORM2dof00: 1.276158e-04 NORM2dof1: 4.148465e-04 NORM2dof1/NORM2dof10: 9.821465e-02 NORM2dof2: 7.239053e-04 NORM2dof2/NORM2dof20: 1.517306e-01 NORM2dof3: 4.074435e-09 NORM2dof3/NORM2dof30: 7.004743e-01 isolid: 0 NORM2S: 2.614560e-10 NORM2S/NORM2S0: 3.570694e-01 0 KSP Residual norm 1.009931624841e-03 1 KSP Residual norm 8.783994285493e-04 2 KSP Residual norm 1.441108550593e-04 3 KSP Residual norm 2.176288364317e-05 4 KSP Residual norm 3.918465127387e-06 5 KSP Residual norm 6.299082990315e-07 6 KSP Residual norm 5.907647901706e-08 7 KSP Residual norm 1.494853339682e-08 8 KSP Residual norm 3.675688476351e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 2.425866717982e-04 NORM2F: 2.425867e-04 NORM2F/NORM2F0: 5.440206e-05 NORM2dof0: 1.411812e-04 NORM2dof0/NORM2dof00: 3.166109e-05 NORM2dof1: 9.619262e-05 NORM2dof1/NORM2dof10: 2.277354e-02 NORM2dof2: 1.722299e-04 NORM2dof2/NORM2dof20: 3.609938e-02 NORM2dof3: 3.638929e-09 NORM2dof3/NORM2dof30: 6.256023e-01 isolid: 0 NORM2S: 8.679633e-11 NORM2S/NORM2S0: 1.185374e-01 0 KSP Residual norm 2.425866717982e-04 1 KSP Residual norm 2.126906752798e-04 2 KSP Residual norm 4.235059789636e-05 3 KSP Residual norm 6.016024694895e-06 4 KSP Residual norm 1.238075519193e-06 5 KSP Residual norm 1.733977911998e-07 6 KSP Residual norm 1.519524757192e-08 7 KSP Residual norm 3.731285653323e-09 Linear solve converged due to CONVERGED_ATOL iterations 7 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 6.214796770176e-05 NORM2F: 6.214797e-05 NORM2F/NORM2F0: 1.393719e-05 NORM2dof0: 3.732738e-05 NORM2dof0/NORM2dof00: 8.370981e-06 NORM2dof1: 2.335159e-05 NORM2dof1/NORM2dof10: 5.528474e-03 NORM2dof2: 4.386046e-05 NORM2dof2/NORM2dof20: 9.193152e-03 NORM2dof3: 3.614204e-09 NORM2dof3/NORM2dof30: 6.213516e-01 isolid: 0 NORM2S: 2.882395e-11 NORM2S/NORM2S0: 3.936476e-02 0 KSP Residual norm 6.214796770176e-05 1 KSP Residual norm 5.480359919001e-05 2 KSP Residual norm 1.264551707739e-05 3 KSP Residual norm 1.693095445848e-06 4 KSP Residual norm 3.905820075265e-07 5 KSP Residual norm 4.858554198022e-08 6 KSP Residual norm 3.997373438492e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.714543439076e-05 NORM2F: 1.714543e-05 NORM2F/NORM2F0: 3.845005e-06 NORM2dof0: 1.051444e-05 NORM2dof0/NORM2dof00: 2.357952e-06 NORM2dof1: 6.099625e-06 NORM2dof1/NORM2dof10: 1.444082e-03 NORM2dof2: 1.209161e-05 NORM2dof2/NORM2dof20: 2.534402e-03 NORM2dof3: 3.895744e-09 NORM2dof3/NORM2dof30: 6.697539e-01 isolid: 0 NORM2S: 9.573609e-12 NORM2S/NORM2S0: 1.307464e-02 0 KSP Residual norm 1.714543439076e-05 1 KSP Residual norm 1.515496624794e-05 2 KSP Residual norm 3.835547279511e-06 3 KSP Residual norm 4.864209198956e-07 4 KSP Residual norm 1.241513578241e-07 5 KSP Residual norm 1.379658721534e-08 6 KSP Residual norm 1.110182651776e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 5 SNES Function norm 5.065175701161e-06 NORM2F: 5.065176e-06 NORM2F/NORM2F0: 1.135907e-06 NORM2dof0: 3.123073e-06 NORM2dof0/NORM2dof00: 7.003757e-07 NORM2dof1: 1.744299e-06 NORM2dof1/NORM2dof10: 4.129618e-04 NORM2dof2: 3.586061e-06 NORM2dof2/NORM2dof20: 7.516385e-04 NORM2dof3: 1.081461e-09 NORM2dof3/NORM2dof30: 1.859242e-01 isolid: 0 NORM2S: 3.180103e-12 NORM2S/NORM2S0: 4.343055e-03 0 KSP Residual norm 5.065175701161e-06 1 KSP Residual norm 4.472023238259e-06 2 KSP Residual norm 1.182936934229e-06 3 KSP Residual norm 1.432720165026e-07 4 KSP Residual norm 3.953945500222e-08 5 KSP Residual norm 3.985711262214e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 6 SNES Function norm 1.570301324742e-06 NORM2F: 1.570301e-06 NORM2F/NORM2F0: 3.521530e-07 NORM2dof0: 9.646941e-07 NORM2dof0/NORM2dof00: 2.163408e-07 NORM2dof1: 5.382009e-07 NORM2dof1/NORM2dof10: 1.274187e-04 NORM2dof2: 1.116036e-06 NORM2dof2/NORM2dof20: 2.339211e-04 NORM2dof3: 3.958295e-09 NORM2dof3/NORM2dof30: 6.805076e-01 isolid: 0 NORM2S: 1.056443e-12 NORM2S/NORM2S0: 1.442780e-03 0 KSP Residual norm 1.570301324742e-06 1 KSP Residual norm 1.382157925031e-06 2 KSP Residual norm 3.704819182722e-07 3 KSP Residual norm 4.332114937773e-08 4 KSP Residual norm 1.271531123606e-08 5 KSP Residual norm 1.242030316262e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 7 SNES Function norm 5.004889615780e-07 NORM2F: 5.004890e-07 NORM2F/NORM2F0: 1.122388e-07 NORM2dof0: 3.055851e-07 NORM2dof0/NORM2dof00: 6.853004e-08 NORM2dof1: 1.737459e-07 NORM2dof1/NORM2dof10: 4.113423e-05 NORM2dof2: 3.562553e-07 NORM2dof2/NORM2dof20: 7.467110e-05 NORM2dof3: 1.234573e-09 NORM2dof3/NORM2dof30: 2.122469e-01 isolid: 0 NORM2S: 3.509873e-13 NORM2S/NORM2S0: 4.793420e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 7 4 TS dt 0.0001 time 0.0004 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 2.227714008716e+00 NORM2F: 2.227714e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 2.227713e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.190619e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.831842e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 2.590378e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.719967e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 2.227714008716e+00 1 KSP Residual norm 4.746600445376e-03 2 KSP Residual norm 4.409010411023e-04 3 KSP Residual norm 1.404618920809e-04 4 KSP Residual norm 1.831888618610e-05 5 KSP Residual norm 5.018350224586e-06 6 KSP Residual norm 1.017646288532e-06 7 KSP Residual norm 3.671995304249e-07 8 KSP Residual norm 6.091669143225e-08 9 KSP Residual norm 1.379709606698e-08 10 KSP Residual norm 3.278672639947e-09 Linear solve converged due to CONVERGED_ATOL iterations 10 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 9.799793450225e-04 NORM2F: 9.799793e-04 NORM2F/NORM2F0: 4.399036e-04 NORM2dof0: 6.756995e-04 NORM2dof0/NORM2dof00: 3.033153e-04 NORM2dof1: 4.505928e-04 NORM2dof1/NORM2dof10: 3.784525e-01 NORM2dof2: 5.484121e-04 NORM2dof2/NORM2dof20: 2.993774e-01 NORM2dof3: 3.197166e-09 NORM2dof3/NORM2dof30: 1.234247e+00 isolid: 0 NORM2S: 2.340774e-10 NORM2S/NORM2S0: 3.032104e-01 0 KSP Residual norm 9.799793450225e-04 1 KSP Residual norm 8.496336630538e-04 2 KSP Residual norm 1.589845235952e-04 3 KSP Residual norm 1.948264727094e-05 4 KSP Residual norm 4.182027781665e-06 5 KSP Residual norm 5.917861645028e-07 6 KSP Residual norm 4.825781709476e-08 7 KSP Residual norm 1.601322339760e-08 8 KSP Residual norm 3.437092029191e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 2.342429858616e-04 NORM2F: 2.342430e-04 NORM2F/NORM2F0: 1.051495e-04 NORM2dof0: 1.584271e-04 NORM2dof0/NORM2dof00: 7.111647e-05 NORM2dof1: 9.983075e-05 NORM2dof1/NORM2dof10: 8.384774e-02 NORM2dof2: 1.407283e-04 NORM2dof2/NORM2dof20: 7.682339e-02 NORM2dof3: 3.402101e-09 NORM2dof3/NORM2dof30: 1.313361e+00 isolid: 0 NORM2S: 7.782780e-11 NORM2S/NORM2S0: 1.008136e-01 0 KSP Residual norm 2.342429858616e-04 1 KSP Residual norm 2.054005492620e-04 2 KSP Residual norm 4.367831164465e-05 3 KSP Residual norm 5.474999473429e-06 4 KSP Residual norm 1.351783042540e-06 5 KSP Residual norm 1.630310541965e-07 6 KSP Residual norm 1.255726348464e-08 7 KSP Residual norm 4.091510648836e-09 Linear solve converged due to CONVERGED_ATOL iterations 7 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 6.005771479449e-05 NORM2F: 6.005771e-05 NORM2F/NORM2F0: 2.695935e-05 NORM2dof0: 3.989762e-05 NORM2dof0/NORM2dof00: 1.790968e-05 NORM2dof1: 2.357359e-05 NORM2dof1/NORM2dof10: 1.979943e-02 NORM2dof2: 3.820203e-05 NORM2dof2/NORM2dof20: 2.085443e-02 NORM2dof3: 4.033741e-09 NORM2dof3/NORM2dof30: 1.557202e+00 isolid: 0 NORM2S: 2.587554e-11 NORM2S/NORM2S0: 3.351768e-02 0 KSP Residual norm 6.005771479449e-05 1 KSP Residual norm 5.306036418346e-05 2 KSP Residual norm 1.245994780079e-05 3 KSP Residual norm 1.561736577105e-06 4 KSP Residual norm 4.323812263761e-07 5 KSP Residual norm 4.482279442384e-08 6 KSP Residual norm 3.453753063290e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.660946190357e-05 NORM2F: 1.660946e-05 NORM2F/NORM2F0: 7.455832e-06 NORM2dof0: 1.084439e-05 NORM2dof0/NORM2dof00: 4.867948e-06 NORM2dof1: 6.145127e-06 NORM2dof1/NORM2dof10: 5.161286e-03 NORM2dof2: 1.097774e-05 NORM2dof2/NORM2dof20: 5.992734e-03 NORM2dof3: 3.355275e-09 NORM2dof3/NORM2dof30: 1.295284e+00 isolid: 0 NORM2S: 8.602648e-12 NORM2S/NORM2S0: 1.114337e-02 0 KSP Residual norm 1.660946190357e-05 1 KSP Residual norm 1.472259829384e-05 2 KSP Residual norm 3.677715881419e-06 3 KSP Residual norm 4.549526942398e-07 4 KSP Residual norm 1.385750017357e-07 5 KSP Residual norm 1.247239451509e-08 6 KSP Residual norm 1.016552372074e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 5 SNES Function norm 4.914089751779e-06 NORM2F: 4.914090e-06 NORM2F/NORM2F0: 2.205889e-06 NORM2dof0: 3.155245e-06 NORM2dof0/NORM2dof00: 1.416361e-06 NORM2dof1: 1.785726e-06 NORM2dof1/NORM2dof10: 1.499829e-03 NORM2dof2: 3.317211e-06 NORM2dof2/NORM2dof20: 1.810861e-03 NORM2dof3: 9.936021e-10 NORM2dof3/NORM2dof30: 3.835742e-01 isolid: 0 NORM2S: 2.860044e-12 NORM2S/NORM2S0: 3.704736e-03 0 KSP Residual norm 4.914089751779e-06 1 KSP Residual norm 4.354582149670e-06 2 KSP Residual norm 1.118207468724e-06 3 KSP Residual norm 1.358387674944e-07 4 KSP Residual norm 4.435465182538e-08 5 KSP Residual norm 3.574530954571e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 6 SNES Function norm 1.524523303637e-06 NORM2F: 1.524523e-06 NORM2F/NORM2F0: 6.843443e-07 NORM2dof0: 9.637973e-07 NORM2dof0/NORM2dof00: 4.326398e-07 NORM2dof1: 5.615417e-07 NORM2dof1/NORM2dof10: 4.716383e-04 NORM2dof2: 1.039194e-06 NORM2dof2/NORM2dof20: 5.672946e-04 NORM2dof3: 3.557071e-09 NORM2dof3/NORM2dof30: 1.373186e+00 isolid: 0 NORM2S: 9.508659e-13 NORM2S/NORM2S0: 1.231697e-03 0 KSP Residual norm 1.524523303637e-06 1 KSP Residual norm 1.347927283991e-06 2 KSP Residual norm 3.478775443084e-07 3 KSP Residual norm 4.151326399995e-08 4 KSP Residual norm 1.427820037041e-08 5 KSP Residual norm 1.096468854699e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 7 SNES Function norm 4.863620680675e-07 NORM2F: 4.863621e-07 NORM2F/NORM2F0: 2.183234e-07 NORM2dof0: 3.034552e-07 NORM2dof0/NORM2dof00: 1.362183e-07 NORM2dof1: 1.835677e-07 NORM2dof1/NORM2dof10: 1.541783e-04 NORM2dof2: 3.328133e-07 NORM2dof2/NORM2dof20: 1.816823e-04 NORM2dof3: 1.091499e-09 NORM2dof3/NORM2dof30: 4.213667e-01 isolid: 0 NORM2S: 3.161405e-13 NORM2S/NORM2S0: 4.095102e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 7 5 TS dt 0.0001 time 0.0005 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 1.112772476542e+00 NORM2F: 1.112772e+00 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 1.112769e+00 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.671487e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 2.138731e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 1.952195e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.289709e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 1.112772476542e+00 1 KSP Residual norm 6.472728739530e-03 2 KSP Residual norm 5.601863101878e-04 3 KSP Residual norm 1.094219394202e-04 4 KSP Residual norm 1.197827287652e-05 5 KSP Residual norm 4.378624107836e-06 6 KSP Residual norm 9.290213397784e-07 7 KSP Residual norm 2.835332962942e-07 8 KSP Residual norm 4.388258838829e-08 9 KSP Residual norm 9.543217089365e-09 Linear solve converged due to CONVERGED_ATOL iterations 9 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 8.051824030650e-04 NORM2F: 8.051824e-04 NORM2F/NORM2F0: 7.235822e-04 NORM2dof0: 4.994773e-04 NORM2dof0/NORM2dof00: 4.488597e-04 NORM2dof1: 3.419594e-04 NORM2dof1/NORM2dof10: 2.045840e-01 NORM2dof2: 5.309472e-04 NORM2dof2/NORM2dof20: 2.482533e-01 NORM2dof3: 8.746695e-09 NORM2dof3/NORM2dof30: 4.480442e+00 isolid: 0 NORM2S: 2.578678e-10 NORM2S/NORM2S0: 3.537422e-01 0 KSP Residual norm 8.051824030650e-04 1 KSP Residual norm 7.090032819305e-04 2 KSP Residual norm 1.402280433079e-04 3 KSP Residual norm 2.027457124984e-05 4 KSP Residual norm 5.456807297022e-06 5 KSP Residual norm 5.624581671686e-07 6 KSP Residual norm 4.803604857781e-08 7 KSP Residual norm 1.792602936119e-08 8 KSP Residual norm 3.571251954485e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 2.079650561694e-04 NORM2F: 2.079651e-04 NORM2F/NORM2F0: 1.868891e-04 NORM2dof0: 1.300995e-04 NORM2dof0/NORM2dof00: 1.169151e-04 NORM2dof1: 8.490213e-05 NORM2dof1/NORM2dof10: 5.079439e-02 NORM2dof2: 1.382578e-04 NORM2dof2/NORM2dof20: 6.464475e-02 NORM2dof3: 3.501022e-09 NORM2dof3/NORM2dof30: 1.793378e+00 isolid: 0 NORM2S: 8.567461e-11 NORM2S/NORM2S0: 1.175282e-01 0 KSP Residual norm 2.079650561694e-04 1 KSP Residual norm 1.846996180432e-04 2 KSP Residual norm 4.105605943457e-05 3 KSP Residual norm 5.743945556658e-06 4 KSP Residual norm 1.730123345092e-06 5 KSP Residual norm 1.504872522672e-07 6 KSP Residual norm 1.310593371116e-08 7 KSP Residual norm 4.416474747728e-09 Linear solve converged due to CONVERGED_ATOL iterations 7 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 5.778224711718e-05 NORM2F: 5.778225e-05 NORM2F/NORM2F0: 5.192638e-05 NORM2dof0: 3.629464e-05 NORM2dof0/NORM2dof00: 3.261651e-05 NORM2dof1: 2.282530e-05 NORM2dof1/NORM2dof10: 1.365569e-02 NORM2dof2: 3.873619e-05 NORM2dof2/NORM2dof20: 1.811176e-02 NORM2dof3: 4.397594e-09 NORM2dof3/NORM2dof30: 2.252641e+00 isolid: 0 NORM2S: 2.846670e-11 NORM2S/NORM2S0: 3.905053e-02 0 KSP Residual norm 5.778224711718e-05 1 KSP Residual norm 5.155382303382e-05 2 KSP Residual norm 1.230697151862e-05 3 KSP Residual norm 1.663890537019e-06 4 KSP Residual norm 5.483282502290e-07 5 KSP Residual norm 4.065415243116e-08 6 KSP Residual norm 3.914285942363e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.713258989773e-05 NORM2F: 1.713259e-05 NORM2F/NORM2F0: 1.539631e-05 NORM2dof0: 1.072836e-05 NORM2dof0/NORM2dof00: 9.641136e-06 NORM2dof1: 6.688508e-06 NORM2dof1/NORM2dof10: 4.001533e-03 NORM2dof2: 1.156252e-05 NORM2dof2/NORM2dof20: 5.406250e-03 NORM2dof3: 3.854522e-09 NORM2dof3/NORM2dof30: 1.974456e+00 isolid: 0 NORM2S: 9.458957e-12 NORM2S/NORM2S0: 1.297577e-02 0 KSP Residual norm 1.713258989773e-05 1 KSP Residual norm 1.530342181040e-05 2 KSP Residual norm 3.771930825589e-06 3 KSP Residual norm 4.954811130992e-07 4 KSP Residual norm 1.751498854623e-07 5 KSP Residual norm 1.137052190475e-08 6 KSP Residual norm 1.254186450126e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 5 SNES Function norm 5.315313005638e-06 NORM2F: 5.315313e-06 NORM2F/NORM2F0: 4.776640e-06 NORM2dof0: 3.306069e-06 NORM2dof0/NORM2dof00: 2.971028e-06 NORM2dof1: 2.090715e-06 NORM2dof1/NORM2dof10: 1.250812e-03 NORM2dof2: 3.598801e-06 NORM2dof2/NORM2dof20: 1.682680e-03 NORM2dof3: 1.242143e-09 NORM2dof3/NORM2dof30: 6.362801e-01 isolid: 0 NORM2S: 3.143207e-12 NORM2S/NORM2S0: 4.311841e-03 0 KSP Residual norm 5.315313005638e-06 1 KSP Residual norm 4.744030372790e-06 2 KSP Residual norm 1.176886394857e-06 3 KSP Residual norm 1.514605816840e-07 4 KSP Residual norm 5.615624395027e-08 5 KSP Residual norm 3.346379171650e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 6 SNES Function norm 1.695456618283e-06 NORM2F: 1.695457e-06 NORM2F/NORM2F0: 1.523633e-06 NORM2dof0: 1.046231e-06 NORM2dof0/NORM2dof00: 9.402053e-07 NORM2dof1: 6.777162e-07 NORM2dof1/NORM2dof10: 4.054572e-04 NORM2dof2: 1.149201e-06 NORM2dof2/NORM2dof20: 5.373283e-04 NORM2dof3: 3.330341e-09 NORM2dof3/NORM2dof30: 1.705947e+00 isolid: 0 NORM2S: 1.044556e-12 NORM2S/NORM2S0: 1.432918e-03 0 KSP Residual norm 1.695456618283e-06 1 KSP Residual norm 1.510656824024e-06 2 KSP Residual norm 3.722813769344e-07 3 KSP Residual norm 4.726531573676e-08 4 KSP Residual norm 1.814889574859e-08 5 KSP Residual norm 1.043202985458e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 7 SNES Function norm 5.488124243595e-07 NORM2F: 5.488124e-07 NORM2F/NORM2F0: 4.931937e-07 NORM2dof0: 3.362464e-07 NORM2dof0/NORM2dof00: 3.021708e-07 NORM2dof1: 2.231989e-07 NORM2dof1/NORM2dof10: 1.335332e-04 NORM2dof2: 3.719067e-07 NORM2dof2/NORM2dof20: 1.738913e-04 NORM2dof3: 1.037682e-09 NORM2dof3/NORM2dof30: 5.315466e-01 isolid: 0 NORM2S: 3.471553e-13 NORM2S/NORM2S0: 4.762266e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 7 6 TS dt 0.0001 time 0.0006 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 5.557686257693e-01 NORM2F: 5.557686e-01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 5.557657e-01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 1.001497e-03 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.492390e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 1.030785e-09 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.529011e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 5.557686257693e-01 1 KSP Residual norm 4.308101913233e-03 2 KSP Residual norm 4.227719191423e-04 3 KSP Residual norm 8.135234781502e-05 4 KSP Residual norm 1.250720250306e-05 5 KSP Residual norm 2.780025026224e-06 6 KSP Residual norm 5.680845267956e-07 7 KSP Residual norm 1.846336664972e-07 8 KSP Residual norm 4.149654544471e-08 9 KSP Residual norm 7.832714199902e-09 Linear solve converged due to CONVERGED_ATOL iterations 9 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 6.119195708233e-04 NORM2F: 6.119196e-04 NORM2F/NORM2F0: 1.101033e-03 NORM2dof0: 4.033700e-04 NORM2dof0/NORM2dof00: 7.257914e-04 NORM2dof1: 2.552043e-04 NORM2dof1/NORM2dof10: 2.548229e-01 NORM2dof2: 3.828955e-04 NORM2dof2/NORM2dof20: 2.565653e-01 NORM2dof3: 7.733372e-09 NORM2dof3/NORM2dof30: 7.502407e+00 isolid: 0 NORM2S: 2.412384e-10 NORM2S/NORM2S0: 3.204118e-01 0 KSP Residual norm 6.119195708233e-04 1 KSP Residual norm 5.428792080573e-04 2 KSP Residual norm 1.197882344778e-04 3 KSP Residual norm 1.633949861408e-05 4 KSP Residual norm 5.557061306266e-06 5 KSP Residual norm 3.922465545133e-07 6 KSP Residual norm 4.267772662462e-08 7 KSP Residual norm 1.303142028347e-08 8 KSP Residual norm 2.692758385310e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 1.696724438232e-04 NORM2F: 1.696724e-04 NORM2F/NORM2F0: 3.052933e-04 NORM2dof0: 1.086907e-04 NORM2dof0/NORM2dof00: 1.955692e-04 NORM2dof1: 6.868959e-05 NORM2dof1/NORM2dof10: 6.858694e-02 NORM2dof2: 1.107105e-04 NORM2dof2/NORM2dof20: 7.418335e-02 NORM2dof3: 2.657203e-09 NORM2dof3/NORM2dof30: 2.577843e+00 isolid: 0 NORM2S: 8.017256e-11 NORM2S/NORM2S0: 1.064848e-01 0 KSP Residual norm 1.696724438232e-04 1 KSP Residual norm 1.517390431674e-04 2 KSP Residual norm 3.556628682970e-05 3 KSP Residual norm 4.819195192174e-06 4 KSP Residual norm 1.765384300045e-06 5 KSP Residual norm 1.050503576150e-07 6 KSP Residual norm 1.330083564334e-08 7 KSP Residual norm 3.498472973310e-09 Linear solve converged due to CONVERGED_ATOL iterations 7 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 5.049959409725e-05 NORM2F: 5.049959e-05 NORM2F/NORM2F0: 9.086442e-05 NORM2dof0: 3.172853e-05 NORM2dof0/NORM2dof00: 5.708976e-05 NORM2dof1: 2.041142e-05 NORM2dof1/NORM2dof10: 2.038091e-02 NORM2dof2: 3.356909e-05 NORM2dof2/NORM2dof20: 2.249350e-02 NORM2dof3: 3.490439e-09 NORM2dof3/NORM2dof30: 3.386193e+00 isolid: 0 NORM2S: 2.664408e-11 NORM2S/NORM2S0: 3.538855e-02 0 KSP Residual norm 5.049959409725e-05 1 KSP Residual norm 4.530238901014e-05 2 KSP Residual norm 1.085321676077e-05 3 KSP Residual norm 1.456886257380e-06 4 KSP Residual norm 5.618155714071e-07 5 KSP Residual norm 2.967069149021e-08 6 KSP Residual norm 4.372284443552e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.574809898934e-05 NORM2F: 1.574810e-05 NORM2F/NORM2F0: 2.833571e-05 NORM2dof0: 9.766393e-06 NORM2dof0/NORM2dof00: 1.757286e-05 NORM2dof1: 6.454294e-06 NORM2dof1/NORM2dof10: 6.444649e-03 NORM2dof2: 1.053386e-05 NORM2dof2/NORM2dof20: 7.058383e-03 NORM2dof3: 4.348876e-09 NORM2dof3/NORM2dof30: 4.218993e+00 isolid: 0 NORM2S: 8.855007e-12 NORM2S/NORM2S0: 1.176118e-02 0 KSP Residual norm 1.574809898934e-05 1 KSP Residual norm 1.413040325835e-05 2 KSP Residual norm 3.381260108228e-06 3 KSP Residual norm 4.509547589190e-07 4 KSP Residual norm 1.803036721979e-07 5 KSP Residual norm 8.837335283035e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 5 SNES Function norm 5.042908584888e-06 NORM2F: 5.042909e-06 NORM2F/NORM2F0: 9.073755e-06 NORM2dof0: 3.098911e-06 NORM2dof0/NORM2dof00: 5.575930e-06 NORM2dof1: 2.103952e-06 NORM2dof1/NORM2dof10: 2.100808e-03 NORM2dof2: 3.376535e-06 NORM2dof2/NORM2dof20: 2.262501e-03 NORM2dof3: 8.765087e-09 NORM2dof3/NORM2dof30: 8.503309e+00 isolid: 0 NORM2S: 2.943066e-12 NORM2S/NORM2S0: 3.908967e-03 0 KSP Residual norm 5.042908584888e-06 1 KSP Residual norm 4.519905967727e-06 2 KSP Residual norm 1.068318382709e-06 3 KSP Residual norm 1.420069385766e-07 4 KSP Residual norm 5.830280955734e-08 5 KSP Residual norm 2.750675538983e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 6 SNES Function norm 1.635509967178e-06 NORM2F: 1.635510e-06 NORM2F/NORM2F0: 2.942789e-06 NORM2dof0: 9.990627e-07 NORM2dof0/NORM2dof00: 1.797633e-06 NORM2dof1: 6.934171e-07 NORM2dof1/NORM2dof10: 6.923809e-04 NORM2dof2: 1.093587e-06 NORM2dof2/NORM2dof20: 7.327752e-04 NORM2dof3: 2.722771e-09 NORM2dof3/NORM2dof30: 2.641453e+00 isolid: 0 NORM2S: 9.782353e-13 NORM2S/NORM2S0: 1.299288e-03 0 KSP Residual norm 1.635509967178e-06 1 KSP Residual norm 1.463952539788e-06 2 KSP Residual norm 3.407079191494e-07 3 KSP Residual norm 4.528042856809e-08 4 KSP Residual norm 1.890678753386e-08 5 KSP Residual norm 8.690371702212e-10 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 7 SNES Function norm 5.336804857256e-07 NORM2F: 5.336805e-07 NORM2F/NORM2F0: 9.602566e-07 NORM2dof0: 3.248093e-07 NORM2dof0/NORM2dof00: 5.844357e-07 NORM2dof1: 2.291741e-07 NORM2dof1/NORM2dof10: 2.288316e-04 NORM2dof2: 3.560790e-07 NORM2dof2/NORM2dof20: 2.385964e-04 NORM2dof3: 8.587620e-10 NORM2dof3/NORM2dof30: 8.331142e-01 isolid: 0 NORM2S: 3.251805e-13 NORM2S/NORM2S0: 4.319033e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 7 7 TS dt 0.0001 time 0.0007 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 2.775423054247e-01 NORM2F: 2.775423e-01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 2.775373e-01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 9.394023e-04 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.366894e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 9.448906e-10 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.363841e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 2.775423054247e-01 1 KSP Residual norm 4.269855711117e-03 2 KSP Residual norm 4.137754623703e-04 3 KSP Residual norm 6.257024540873e-05 4 KSP Residual norm 1.830313448326e-05 5 KSP Residual norm 1.182578644587e-06 6 KSP Residual norm 2.163436584089e-07 7 KSP Residual norm 4.685071780533e-08 8 KSP Residual norm 6.152206756855e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 6.058721968924e-04 NORM2F: 6.058722e-04 NORM2F/NORM2F0: 2.182990e-03 NORM2dof0: 3.913727e-04 NORM2dof0/NORM2dof00: 1.410162e-03 NORM2dof1: 2.543010e-04 NORM2dof1/NORM2dof10: 2.707051e-01 NORM2dof2: 3.863153e-04 NORM2dof2/NORM2dof20: 2.826227e-01 NORM2dof3: 6.005638e-09 NORM2dof3/NORM2dof30: 6.355908e+00 isolid: 0 NORM2S: 2.488856e-10 NORM2S/NORM2S0: 3.379834e-01 0 KSP Residual norm 6.058721968924e-04 1 KSP Residual norm 5.411553979768e-04 2 KSP Residual norm 1.180236654315e-04 3 KSP Residual norm 1.697724155124e-05 4 KSP Residual norm 6.336195845718e-06 5 KSP Residual norm 3.515628829243e-07 6 KSP Residual norm 5.242311132852e-08 7 KSP Residual norm 1.380587218576e-08 8 KSP Residual norm 2.724453873676e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 1.725039868181e-04 NORM2F: 1.725040e-04 NORM2F/NORM2F0: 6.215412e-04 NORM2dof0: 1.089620e-04 NORM2dof0/NORM2dof00: 3.926029e-04 NORM2dof1: 7.210643e-05 NORM2dof1/NORM2dof10: 7.675778e-02 NORM2dof2: 1.126303e-04 NORM2dof2/NORM2dof20: 8.239869e-02 NORM2dof3: 2.695597e-09 NORM2dof3/NORM2dof30: 2.852814e+00 isolid: 0 NORM2S: 8.270382e-11 NORM2S/NORM2S0: 1.123107e-01 0 KSP Residual norm 1.725039868181e-04 1 KSP Residual norm 1.553656482132e-04 2 KSP Residual norm 3.565703589611e-05 3 KSP Residual norm 5.076540574263e-06 4 KSP Residual norm 2.004317949710e-06 5 KSP Residual norm 9.606215545587e-08 6 KSP Residual norm 1.699424479149e-08 7 KSP Residual norm 4.430215416022e-09 Linear solve converged due to CONVERGED_ATOL iterations 7 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 5.253149651021e-05 NORM2F: 5.253150e-05 NORM2F/NORM2F0: 1.892738e-04 NORM2dof0: 3.278788e-05 NORM2dof0/NORM2dof00: 1.181386e-04 NORM2dof1: 2.212572e-05 NORM2dof1/NORM2dof10: 2.355298e-02 NORM2dof2: 3.456827e-05 NORM2dof2/NORM2dof20: 2.528965e-02 NORM2dof3: 4.415698e-09 NORM2dof3/NORM2dof30: 4.673238e+00 isolid: 0 NORM2S: 2.748235e-11 NORM2S/NORM2S0: 3.732067e-02 0 KSP Residual norm 5.253149651021e-05 1 KSP Residual norm 4.744942833481e-05 2 KSP Residual norm 1.104106101204e-05 3 KSP Residual norm 1.556191460705e-06 4 KSP Residual norm 6.368539122699e-07 5 KSP Residual norm 2.808233245834e-08 6 KSP Residual norm 5.736661456826e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.663887140036e-05 NORM2F: 1.663887e-05 NORM2F/NORM2F0: 5.995076e-05 NORM2dof0: 1.030264e-05 NORM2dof0/NORM2dof00: 3.712162e-05 NORM2dof1: 7.100550e-06 NORM2dof1/NORM2dof10: 7.558583e-03 NORM2dof2: 1.096767e-05 NORM2dof2/NORM2dof20: 8.023793e-03 NORM2dof3: 5.709079e-09 NORM2dof3/NORM2dof30: 6.042053e+00 isolid: 0 NORM2S: 9.132628e-12 NORM2S/NORM2S0: 1.240199e-02 0 KSP Residual norm 1.663887140036e-05 1 KSP Residual norm 1.503087551143e-05 2 KSP Residual norm 3.475166392784e-06 3 KSP Residual norm 4.871767640289e-07 4 KSP Residual norm 2.043381513299e-07 5 KSP Residual norm 8.605193317307e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 5 SNES Function norm 5.376364923636e-06 NORM2F: 5.376365e-06 NORM2F/NORM2F0: 1.937133e-05 NORM2dof0: 3.308988e-06 NORM2dof0/NORM2dof00: 1.192268e-05 NORM2dof1: 2.324596e-06 NORM2dof1/NORM2dof10: 2.474548e-03 NORM2dof2: 3.542891e-06 NORM2dof2/NORM2dof20: 2.591929e-03 NORM2dof3: 8.464166e-09 NORM2dof3/NORM2dof30: 8.957826e+00 isolid: 0 NORM2S: 3.035018e-12 NORM2S/NORM2S0: 4.121516e-03 0 KSP Residual norm 5.376364923636e-06 1 KSP Residual norm 4.852079403286e-06 2 KSP Residual norm 1.106012870919e-06 3 KSP Residual norm 1.548652898390e-07 4 KSP Residual norm 6.622322636931e-08 5 KSP Residual norm 2.715252438436e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 6 SNES Function norm 1.753075075882e-06 NORM2F: 1.753075e-06 NORM2F/NORM2F0: 6.316425e-06 NORM2dof0: 1.074629e-06 NORM2dof0/NORM2dof00: 3.872016e-06 NORM2dof1: 7.662426e-07 NORM2dof1/NORM2dof10: 8.156704e-04 NORM2dof2: 1.153824e-06 NORM2dof2/NORM2dof20: 8.441211e-04 NORM2dof3: 2.661484e-09 NORM2dof3/NORM2dof30: 2.816712e+00 isolid: 0 NORM2S: 1.008697e-12 NORM2S/NORM2S0: 1.369798e-03 0 KSP Residual norm 1.753075075882e-06 1 KSP Residual norm 1.580262431510e-06 2 KSP Residual norm 3.546338640452e-07 3 KSP Residual norm 4.967314561981e-08 4 KSP Residual norm 2.147538404335e-08 5 KSP Residual norm 8.683473688031e-10 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 7 SNES Function norm 5.738448616702e-07 NORM2F: 5.738449e-07 NORM2F/NORM2F0: 2.067594e-06 NORM2dof0: 3.508632e-07 NORM2dof0/NORM2dof00: 1.264202e-06 NORM2dof1: 2.529404e-07 NORM2dof1/NORM2dof10: 2.692568e-04 NORM2dof2: 3.771119e-07 NORM2dof2/NORM2dof20: 2.758896e-04 NORM2dof3: 8.491729e-10 NORM2dof3/NORM2dof30: 8.986997e-01 isolid: 0 NORM2S: 3.352726e-13 NORM2S/NORM2S0: 4.552959e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 7 8 TS dt 0.0001 time 0.0008 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 1.385893632817e-01 NORM2F: 1.385894e-01 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 1.385817e-01 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 8.167800e-04 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.209582e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 8.506108e-10 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.406001e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 1.385893632817e-01 1 KSP Residual norm 3.853548368170e-03 2 KSP Residual norm 3.707357575994e-04 3 KSP Residual norm 5.769861871248e-05 4 KSP Residual norm 2.100381923635e-05 5 KSP Residual norm 8.893431500320e-07 6 KSP Residual norm 2.009416286560e-07 7 KSP Residual norm 4.740466731912e-08 8 KSP Residual norm 6.721899156094e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 5.458960685713e-04 NORM2F: 5.458961e-04 NORM2F/NORM2F0: 3.938946e-03 NORM2dof0: 3.534774e-04 NORM2dof0/NORM2dof00: 2.550679e-03 NORM2dof1: 2.321890e-04 NORM2dof1/NORM2dof10: 2.842736e-01 NORM2dof2: 3.451732e-04 NORM2dof2/NORM2dof20: 2.853658e-01 NORM2dof3: 6.576758e-09 NORM2dof3/NORM2dof30: 7.731806e+00 isolid: 0 NORM2S: 2.442299e-10 NORM2S/NORM2S0: 3.297730e-01 0 KSP Residual norm 5.458960685713e-04 1 KSP Residual norm 4.912302501246e-04 2 KSP Residual norm 1.074476565735e-04 3 KSP Residual norm 1.586359196803e-05 4 KSP Residual norm 6.575113039432e-06 5 KSP Residual norm 2.804888911031e-07 6 KSP Residual norm 6.744668665791e-08 7 KSP Residual norm 1.905955898189e-08 8 KSP Residual norm 2.902711698349e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 1.632516979105e-04 NORM2F: 1.632517e-04 NORM2F/NORM2F0: 1.177953e-03 NORM2dof0: 1.029477e-04 NORM2dof0/NORM2dof00: 7.428668e-04 NORM2dof1: 7.062360e-05 NORM2dof1/NORM2dof10: 8.646588e-02 NORM2dof2: 1.051912e-04 NORM2dof2/NORM2dof20: 8.696494e-02 NORM2dof3: 2.823042e-09 NORM2dof3/NORM2dof30: 3.318841e+00 isolid: 0 NORM2S: 8.115202e-11 NORM2S/NORM2S0: 1.095760e-01 0 KSP Residual norm 1.632516979105e-04 1 KSP Residual norm 1.479469598427e-04 2 KSP Residual norm 3.316404328354e-05 3 KSP Residual norm 4.895260241875e-06 4 KSP Residual norm 2.078626977422e-06 5 KSP Residual norm 8.287175616146e-08 6 KSP Residual norm 2.233493871857e-08 7 KSP Residual norm 6.438601693487e-09 Linear solve converged due to CONVERGED_ATOL iterations 7 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 5.143135506878e-05 NORM2F: 5.143136e-05 NORM2F/NORM2F0: 3.711061e-04 NORM2dof0: 3.196418e-05 NORM2dof0/NORM2dof00: 2.306523e-04 NORM2dof1: 2.259882e-05 NORM2dof1/NORM2dof10: 2.766818e-02 NORM2dof2: 3.335819e-05 NORM2dof2/NORM2dof20: 2.757828e-02 NORM2dof3: 6.414181e-09 NORM2dof3/NORM2dof30: 7.540676e+00 isolid: 0 NORM2S: 2.696541e-11 NORM2S/NORM2S0: 3.641021e-02 0 KSP Residual norm 5.143135506878e-05 1 KSP Residual norm 4.669521743404e-05 2 KSP Residual norm 1.043211373259e-05 3 KSP Residual norm 1.536325540407e-06 4 KSP Residual norm 6.617903550189e-07 5 KSP Residual norm 2.561013724570e-08 6 KSP Residual norm 7.374415839350e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.659750028902e-05 NORM2F: 1.659750e-05 NORM2F/NORM2F0: 1.197603e-04 NORM2dof0: 1.024408e-05 NORM2dof0/NORM2dof00: 7.392087e-05 NORM2dof1: 7.385081e-06 NORM2dof1/NORM2dof10: 9.041701e-03 NORM2dof2: 1.077016e-05 NORM2dof2/NORM2dof20: 8.904039e-03 NORM2dof3: 7.327710e-09 NORM2dof3/NORM2dof30: 8.614645e+00 isolid: 0 NORM2S: 8.960617e-12 NORM2S/NORM2S0: 1.209913e-02 0 KSP Residual norm 1.659750028902e-05 1 KSP Residual norm 1.506654439073e-05 2 KSP Residual norm 3.319389246244e-06 3 KSP Residual norm 4.888640676423e-07 4 KSP Residual norm 2.127800501644e-07 5 KSP Residual norm 8.109316682656e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 5 SNES Function norm 5.413916997573e-06 NORM2F: 5.413917e-06 NORM2F/NORM2F0: 3.906445e-05 NORM2dof0: 3.328422e-06 NORM2dof0/NORM2dof00: 2.401777e-05 NORM2dof1: 2.431531e-06 NORM2dof1/NORM2dof10: 2.976972e-03 NORM2dof2: 3.509942e-06 NORM2dof2/NORM2dof20: 2.901782e-03 NORM2dof3: 7.859930e-09 NORM2dof3/NORM2dof30: 9.240336e+00 isolid: 0 NORM2S: 2.977848e-12 NORM2S/NORM2S0: 4.020858e-03 0 KSP Residual norm 5.413916997573e-06 1 KSP Residual norm 4.910448170144e-06 2 KSP Residual norm 1.065668630039e-06 3 KSP Residual norm 1.574350385535e-07 4 KSP Residual norm 6.925622667484e-08 5 KSP Residual norm 2.607504720195e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 6 SNES Function norm 1.773323109936e-06 NORM2F: 1.773323e-06 NORM2F/NORM2F0: 1.279552e-05 NORM2dof0: 1.087890e-06 NORM2dof0/NORM2dof00: 7.850174e-06 NORM2dof1: 8.018131e-07 NORM2dof1/NORM2dof10: 9.816757e-04 NORM2dof2: 1.148155e-06 NORM2dof2/NORM2dof20: 9.492162e-04 NORM2dof3: 2.517789e-09 NORM2dof3/NORM2dof30: 2.959978e+00 isolid: 0 NORM2S: 9.897092e-13 NORM2S/NORM2S0: 1.336361e-03 0 KSP Residual norm 1.773323109936e-06 1 KSP Residual norm 1.606955446659e-06 2 KSP Residual norm 3.438603892077e-07 3 KSP Residual norm 5.087307407291e-08 4 KSP Residual norm 2.247817580603e-08 5 KSP Residual norm 8.435326502553e-10 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 7 SNES Function norm 5.817914623605e-07 NORM2F: 5.817915e-07 NORM2F/NORM2F0: 4.197952e-06 NORM2dof0: 3.565108e-07 NORM2dof0/NORM2dof00: 2.572568e-06 NORM2dof1: 2.642915e-07 NORM2dof1/NORM2dof10: 3.235774e-04 NORM2dof2: 3.762056e-07 NORM2dof2/NORM2dof20: 3.110212e-04 NORM2dof3: 8.131382e-10 NORM2dof3/NORM2dof30: 9.559462e-01 isolid: 0 NORM2S: 3.289688e-13 NORM2S/NORM2S0: 4.441922e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 7 9 TS dt 0.0001 time 0.0009 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 0 SNES Function norm 6.920784879396e-02 NORM2F: 6.920785e-02 NORM2F/NORM2F0: 1.000000e+00 NORM2dof0: 6.919380e-02 NORM2dof0/NORM2dof00: 1.000000e+00 NORM2dof1: 7.883678e-04 NORM2dof1/NORM2dof10: 1.000000e+00 NORM2dof2: 1.150385e-03 NORM2dof2/NORM2dof20: 1.000000e+00 NORM2dof3: 8.138305e-10 NORM2dof3/NORM2dof30: 1.000000e+00 isolid: 0 NORM2S: 7.356848e-10 NORM2S/NORM2S0: 1.000000e+00 Tangent 0 KSP Residual norm 6.920784879396e-02 1 KSP Residual norm 3.840979919308e-03 2 KSP Residual norm 3.543503013487e-04 3 KSP Residual norm 5.444624827056e-05 4 KSP Residual norm 2.262808790207e-05 5 KSP Residual norm 1.003758193739e-06 6 KSP Residual norm 2.193207147381e-07 7 KSP Residual norm 6.067632530906e-08 8 KSP Residual norm 9.551578683847e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 1 SNES Function norm 5.466576051971e-04 NORM2F: 5.466576e-04 NORM2F/NORM2F0: 7.898780e-03 NORM2dof0: 3.521259e-04 NORM2dof0/NORM2dof00: 5.088981e-03 NORM2dof1: 2.375164e-04 NORM2dof1/NORM2dof10: 3.012762e-01 NORM2dof2: 3.441334e-04 NORM2dof2/NORM2dof20: 2.991463e-01 NORM2dof3: 9.319002e-09 NORM2dof3/NORM2dof30: 1.145079e+01 isolid: 0 NORM2S: 2.449213e-10 NORM2S/NORM2S0: 3.329160e-01 0 KSP Residual norm 5.466576051971e-04 1 KSP Residual norm 4.945864699566e-04 2 KSP Residual norm 1.056549484421e-04 3 KSP Residual norm 1.621174236636e-05 4 KSP Residual norm 6.948662841776e-06 5 KSP Residual norm 2.745449773792e-07 6 KSP Residual norm 8.503882365282e-08 7 KSP Residual norm 2.478941077827e-08 8 KSP Residual norm 3.159115505876e-09 Linear solve converged due to CONVERGED_ATOL iterations 8 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 2 SNES Function norm 1.662785103877e-04 NORM2F: 1.662785e-04 NORM2F/NORM2F0: 2.402596e-03 NORM2dof0: 1.046141e-04 NORM2dof0/NORM2dof00: 1.511899e-03 NORM2dof1: 7.357758e-05 NORM2dof1/NORM2dof10: 9.332901e-02 NORM2dof2: 1.062581e-04 NORM2dof2/NORM2dof20: 9.236740e-02 NORM2dof3: 3.025326e-09 NORM2dof3/NORM2dof30: 3.717391e+00 isolid: 0 NORM2S: 8.138123e-11 NORM2S/NORM2S0: 1.106197e-01 0 KSP Residual norm 1.662785103877e-04 1 KSP Residual norm 1.514394275726e-04 2 KSP Residual norm 3.293021013964e-05 3 KSP Residual norm 5.065683666883e-06 4 KSP Residual norm 2.197796599954e-06 5 KSP Residual norm 8.377549835731e-08 6 KSP Residual norm 2.763811642273e-08 7 KSP Residual norm 8.053559466082e-09 Linear solve converged due to CONVERGED_ATOL iterations 7 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 3 SNES Function norm 5.297309933210e-05 NORM2F: 5.297310e-05 NORM2F/NORM2F0: 7.654204e-04 NORM2dof0: 3.294885e-05 NORM2dof0/NORM2dof00: 4.761821e-04 NORM2dof1: 2.376369e-05 NORM2dof1/NORM2dof10: 3.014290e-02 NORM2dof2: 3.399720e-05 NORM2dof2/NORM2dof20: 2.955289e-02 NORM2dof3: 8.031677e-09 NORM2dof3/NORM2dof30: 9.868979e+00 isolid: 0 NORM2S: 2.704128e-11 NORM2S/NORM2S0: 3.675661e-02 0 KSP Residual norm 5.297309933210e-05 1 KSP Residual norm 4.831742479884e-05 2 KSP Residual norm 1.041821567953e-05 3 KSP Residual norm 1.602912776375e-06 4 KSP Residual norm 7.002728503792e-07 5 KSP Residual norm 2.629298149031e-08 6 KSP Residual norm 8.976249599680e-09 Linear solve converged due to CONVERGED_ATOL iterations 6 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 4 SNES Function norm 1.721496805320e-05 NORM2F: 1.721497e-05 NORM2F/NORM2F0: 2.487430e-04 NORM2dof0: 1.065078e-05 NORM2dof0/NORM2dof00: 1.539268e-04 NORM2dof1: 7.797521e-06 NORM2dof1/NORM2dof10: 9.890715e-03 NORM2dof2: 1.105055e-05 NORM2dof2/NORM2dof20: 9.605958e-03 NORM2dof3: 8.905869e-09 NORM2dof3/NORM2dof30: 1.094315e+01 isolid: 0 NORM2S: 8.985793e-12 NORM2S/NORM2S0: 1.221419e-02 0 KSP Residual norm 1.721496805320e-05 1 KSP Residual norm 1.569610862174e-05 2 KSP Residual norm 3.332462853617e-06 3 KSP Residual norm 5.131753815245e-07 4 KSP Residual norm 2.254319663149e-07 5 KSP Residual norm 8.406726529561e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 5 SNES Function norm 5.635189172796e-06 NORM2F: 5.635189e-06 NORM2F/NORM2F0: 8.142413e-05 NORM2dof0: 3.478446e-06 NORM2dof0/NORM2dof00: 5.027106e-05 NORM2dof1: 2.568346e-06 NORM2dof1/NORM2dof10: 3.257801e-03 NORM2dof2: 3.613767e-06 NORM2dof2/NORM2dof20: 3.141354e-03 NORM2dof3: 8.062315e-09 NORM2dof3/NORM2dof30: 9.906626e+00 isolid: 0 NORM2S: 2.986208e-12 NORM2S/NORM2S0: 4.059086e-03 0 KSP Residual norm 5.635189172796e-06 1 KSP Residual norm 5.133841145077e-06 2 KSP Residual norm 1.075280531297e-06 3 KSP Residual norm 1.662274327203e-07 4 KSP Residual norm 7.353559890411e-08 5 KSP Residual norm 2.731409706923e-09 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 6 SNES Function norm 1.849165463014e-06 NORM2F: 1.849165e-06 NORM2F/NORM2F0: 2.671901e-05 NORM2dof0: 1.140254e-06 NORM2dof0/NORM2dof00: 1.647913e-05 NORM2dof1: 8.462086e-07 NORM2dof1/NORM2dof10: 1.073368e-03 NORM2dof2: 1.184550e-06 NORM2dof2/NORM2dof20: 1.029699e-03 NORM2dof3: 2.610444e-09 NORM2dof3/NORM2dof30: 3.207602e+00 isolid: 0 NORM2S: 9.924838e-13 NORM2S/NORM2S0: 1.349061e-03 0 KSP Residual norm 1.849165463014e-06 1 KSP Residual norm 1.683229821122e-06 2 KSP Residual norm 3.481723775150e-07 3 KSP Residual norm 5.386575445536e-08 4 KSP Residual norm 2.387797527539e-08 5 KSP Residual norm 8.874191797530e-10 Linear solve converged due to CONVERGED_ATOL iterations 5 Linear solve converged due to CONVERGED_RTOL iterations 7 FirstNewton = 0 7 SNES Function norm 6.071769270733e-07 NORM2F: 6.071769e-07 NORM2F/NORM2F0: 8.773238e-06 NORM2dof0: 3.742541e-07 NORM2dof0/NORM2dof00: 5.408782e-06 NORM2dof1: 2.785757e-07 NORM2dof1/NORM2dof10: 3.533575e-04 NORM2dof2: 3.885776e-07 NORM2dof2/NORM2dof20: 3.377804e-04 NORM2dof3: 8.472476e-10 NORM2dof3/NORM2dof30: 1.041061e+00 isolid: 0 NORM2S: 3.298895e-13 NORM2S/NORM2S0: 4.484114e-04 Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 7 10 TS dt 0.0001 time 0.001 TS Object: 2 MPI processes type: alpha Alpha_m=0.833333, Alpha_f=0.666667, Gamma=0.666667 maximum steps=10 maximum time=5000. total number of nonlinear solver iterations=63 total number of linear solver iterations=412 total number of nonlinear solve failures=0 total number of rejected steps=0 using relative error tolerance of 0.0001, using absolute error tolerance of 0.0001 TSAdapt Object: 2 MPI processes type: none SNES Object: 2 MPI processes type: newtonls maximum iterations=150, maximum function evaluations=10000 tolerances: relative=0.001, absolute=1e-50, solution=1e-08 total number of linear solver iterations=44 total number of function evaluations=8 norm schedule ALWAYS Jacobian is rebuilt every 20 SNES iterations SNESLineSearch Object: 2 MPI processes type: bt interpolation: cubic alpha=1.000000e-04 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: 2 MPI processes type: fgmres restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement happy breakdown tolerance 1e-30 maximum iterations=10000, initial guess is zero tolerances: relative=0., absolute=1e-08, divergence=10000. right preconditioning using UNPRECONDITIONED norm type for convergence test PC Object: 2 MPI processes type: fieldsplit FieldSplit with Schur preconditioner, factorization UPPER Preconditioner for the Schur complement formed from user provided matrix Split info: Split number 0 Defined by IS Split number 1 Defined by IS KSP solver for A00 block KSP Object: (fieldsplit_m_) 2 MPI processes type: fgmres restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement happy breakdown tolerance 1e-30 maximum iterations=5, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. right preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_m_) 2 MPI processes type: bjacobi number of blocks = 2 Local solve is same for all blocks, in the following KSP and PC objects: KSP Object: (fieldsplit_m_sub_) 1 MPI processes type: preonly maximum iterations=10000, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_m_sub_) 1 MPI processes type: ilu out-of-place factorization 0 levels of fill tolerance for zero pivot 2.22045e-14 matrix ordering: natural factor fill ratio given 1., needed 1. Factored matrix follows: Mat Object: 1 MPI processes type: seqaij rows=12000, cols=12000 package used to perform factorization: petsc total: nonzeros=5527200, allocated nonzeros=5527200 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: (fieldsplit_m_) 1 MPI processes type: seqaij rows=12000, cols=12000 total: nonzeros=5527200, allocated nonzeros=5527200 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: (fieldsplit_m_) 2 MPI processes type: mpiaij rows=26800, cols=26800 total: nonzeros=13445200, allocated nonzeros=13445200 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines KSP solver for S = A11 - A10 inv(A00) A01 KSP Object: (fieldsplit_p_) 2 MPI processes type: preonly maximum iterations=10000, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_p_) 2 MPI processes type: ksp KSP and PC on KSP preconditioner follow --------------------------------- KSP Object: (fieldsplit_p_ksp_) 2 MPI processes type: cg maximum iterations=5, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_p_ksp_) 2 MPI processes type: bjacobi number of blocks = 2 Local solve is same for all blocks, in the following KSP and PC objects: KSP Object: (fieldsplit_p_ksp_sub_) 1 MPI processes type: preonly maximum iterations=10000, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_p_ksp_sub_) 1 MPI processes type: ilu out-of-place factorization 0 levels of fill tolerance for zero pivot 2.22045e-14 matrix ordering: natural factor fill ratio given 1., needed 1. Factored matrix follows: Mat Object: 1 MPI processes type: seqaij rows=4000, cols=4000 package used to perform factorization: petsc total: nonzeros=440000, allocated nonzeros=440000 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: 1 MPI processes type: seqaij rows=4000, cols=4000 total: nonzeros=440000, allocated nonzeros=440000 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: 2 MPI processes type: mpiaij rows=8800, cols=8800 total: nonzeros=1040000, allocated nonzeros=1040000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines --------------------------------- linear system matrix followed by preconditioner matrix: Mat Object: (fieldsplit_p_) 2 MPI processes type: schurcomplement rows=8800, cols=8800 Schur complement A11 - A10 inv(A00) A01 A11 Mat Object: (fieldsplit_p_) 2 MPI processes type: mpiaij rows=8800, cols=8800 total: nonzeros=1040000, allocated nonzeros=1040000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines A10 Mat Object: 2 MPI processes type: mpiaij rows=8800, cols=26800 total: nonzeros=3756000, allocated nonzeros=3756000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines KSP of A00 KSP Object: (fieldsplit_m_) 2 MPI processes type: fgmres restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement happy breakdown tolerance 1e-30 maximum iterations=5, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. right preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_m_) 2 MPI processes type: bjacobi number of blocks = 2 Local solve is same for all blocks, in the following KSP and PC objects: KSP Object: (fieldsplit_m_sub_) 1 MPI processes type: preonly maximum iterations=10000, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000. left preconditioning using NONE norm type for convergence test PC Object: (fieldsplit_m_sub_) 1 MPI processes type: ilu out-of-place factorization 0 levels of fill tolerance for zero pivot 2.22045e-14 matrix ordering: natural factor fill ratio given 1., needed 1. Factored matrix follows: Mat Object: 1 MPI processes type: seqaij rows=12000, cols=12000 package used to perform factorization: petsc total: nonzeros=5527200, allocated nonzeros=5527200 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: (fieldsplit_m_) 1 MPI processes type: seqaij rows=12000, cols=12000 total: nonzeros=5527200, allocated nonzeros=5527200 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Mat Object: (fieldsplit_m_) 2 MPI processes type: mpiaij rows=26800, cols=26800 total: nonzeros=13445200, allocated nonzeros=13445200 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines A01 Mat Object: 2 MPI processes type: mpiaij rows=26800, cols=8800 total: nonzeros=3756000, allocated nonzeros=3756000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines Mat Object: 2 MPI processes type: mpiaij rows=8800, cols=8800 total: nonzeros=1040000, allocated nonzeros=1040000 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines linear system matrix = precond matrix: Mat Object: 2 MPI processes type: mpiaij rows=35600, cols=35600 total: nonzeros=21997200, allocated nonzeros=21997200 total number of mallocs used during MatSetValues calls =0 not using I-node (on process 0) routines solve: ndof= 35600 time= 5.354099e+02 time/ndof= 1.503960e-02 ************************************************************************************************************************ *** WIDEN YOUR WINDOW TO 120 CHARACTERS. Use 'enscript -r -fCourier9' to print this document *** ************************************************************************************************************************ ---------------------------------------------- PETSc Performance Summary: ---------------------------------------------- ./fsisurface on a optimO3fftw391 named ubuntu with 2 processors, by hcasquer Mon Apr 30 13:52:22 2018 Using Petsc Release Version 3.9.1, unknown Max Max/Min Avg Total Time (sec): 5.820e+02 1.00000 5.820e+02 Objects: 2.766e+03 2.54228 1.927e+03 Flop: 1.438e+11 1.08887 1.379e+11 2.758e+11 Flop/sec: 2.470e+08 1.08887 2.369e+08 4.738e+08 MPI Messages: 6.960e+03 1.03333 6.848e+03 1.370e+04 MPI Message Lengths: 6.752e+08 1.00021 9.858e+04 1.350e+09 MPI Reductions: 1.124e+04 1.00000 Flop counting convention: 1 flop = 1 real number operation of type (multiply/divide/add/subtract) e.g., VecAXPY() for real vectors of length N --> 2N flop and VecAXPY() for complex vectors of length N --> 8N flop Summary of Stages: ----- Time ------ ----- Flop ----- --- Messages --- -- Message Lengths -- -- Reductions -- Avg %Total Avg %Total counts %Total Avg %Total counts %Total 0: Main Stage: 5.8203e+02 100.0% 2.7578e+11 100.0% 1.370e+04 100.0% 9.858e+04 100.0% 1.123e+04 99.9% ------------------------------------------------------------------------------------------------------------------------ See the 'Profiling' chapter of the users' manual for details on interpreting output. Phase summary info: Count: number of times phase was executed Time and Flop: Max - maximum over all processors Ratio - ratio of maximum to minimum over all processors Mess: number of messages sent Avg. len: average message length (bytes) Reduct: number of global reductions Global: entire computation Stage: stages of a computation. Set stages with PetscLogStagePush() and PetscLogStagePop(). %T - percent time in this phase %F - percent flop in this phase %M - percent messages in this phase %L - percent message lengths in this phase %R - percent reductions in this phase Total Mflop/s: 10e-6 * (sum of flop over all processors)/(max time over all processors) ------------------------------------------------------------------------------------------------------------------------ Event Count Time (sec) Flop --- Global --- --- Stage --- Total Max Ratio Max Ratio Max Ratio Mess Avg len Reduct %T %F %M %L %R %T %F %M %L %R Mflop/s ------------------------------------------------------------------------------------------------------------------------ --- Event Stage 0: Main Stage BuildTwoSidedF 1511 1.0 8.6102e+0136.2 0.00e+00 0.0 1.8e+03 4.5e+05 0.0e+00 8 0 13 61 0 8 0 13 61 0 0 IGAFormScalar 11 1.0 4.9332e+00 1.0 4.75e+06 1.0 0.0e+00 0.0e+00 0.0e+00 1 0 0 0 0 1 0 0 0 0 2 IGAFormSystem 1 1.0 3.6169e-01 1.0 1.63e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 903 IGAFormIFunction 73 1.0 9.3228e+01 1.0 2.20e+09 1.0 0.0e+00 0.0e+00 0.0e+00 16 2 0 0 0 16 2 0 0 0 47 IGAFormIJacobian 10 1.0 2.2848e+02 1.0 4.07e+10 1.0 0.0e+00 0.0e+00 0.0e+00 39 30 0 0 0 39 30 0 0 0 356 VecView 48 1.0 7.2622e-03 1.0 0.00e+00 0.0 4.8e+01 4.8e+04 4.8e+01 0 0 0 0 0 0 0 0 0 0 0 VecDot 63 1.0 1.6343e-0118.4 2.47e+06 1.2 0.0e+00 0.0e+00 6.3e+01 0 0 0 0 1 0 0 0 0 1 27 VecMDot 2976 1.2 7.8163e+0020.3 2.47e+08 1.1 0.0e+00 0.0e+00 2.5e+03 1 0 0 0 22 1 0 0 0 22 61 VecTDot 4135 1.0 8.9700e-01 2.0 3.97e+07 1.2 0.0e+00 0.0e+00 4.1e+03 0 0 0 0 37 0 0 0 0 37 81 VecNorm 4038 1.2 2.5458e+00 6.3 1.00e+08 1.1 0.0e+00 0.0e+00 3.4e+03 0 0 0 0 30 0 0 0 0 30 75 VecScale 4008 1.2 1.9410e-02 1.2 5.34e+07 1.1 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 5188 VecCopy 1559 1.1 1.2238e-02 1.3 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecSet 7717 1.3 4.6788e-02 1.2 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecAXPY 4848 1.0 1.8028e-02 1.1 5.87e+07 1.2 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 6064 VecAYPX 1801 1.0 5.2929e-03 1.1 2.16e+07 1.2 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 7467 VecAXPBYCZ 312 0.0 2.0902e-03 0.0 6.82e+06 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 3261 VecWAXPY 366 1.3 5.7867e-03 1.1 5.53e+06 1.1 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 1833 VecMAXPY 3523 1.2 7.5719e-02 1.1 3.24e+08 1.1 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 8206 VecAssemblyBegin 1514 1.1 2.3195e+01 4.9 0.00e+00 0.0 1.8e+03 3.0e+05 0.0e+00 2 0 13 41 0 2 0 13 41 0 0 VecAssemblyEnd 1514 1.1 1.0521e-01 1.1 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecLoad 1 1.0 4.2033e-04 1.1 0.00e+00 0.0 1.0e+00 1.9e+05 2.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecScatterBegin 8129 1.0 1.6559e-01 1.0 0.00e+00 0.0 1.2e+04 4.5e+04 0.0e+00 0 0 84 38 0 0 0 84 38 0 0 VecScatterEnd 8129 1.0 2.0677e-01 1.1 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 VecReduceArith 126 1.0 3.4466e-03 1.2 4.94e+06 1.2 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 2603 VecReduceComm 63 1.0 5.3523e-03 1.9 0.00e+00 0.0 0.0e+00 0.0e+00 6.3e+01 0 0 0 0 1 0 0 0 0 1 0 VecNormalize 577 0.0 5.6560e-03 0.0 1.17e+07 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 2066 MatMult 5518 1.1 2.6675e+01 1.2 4.64e+10 1.2 1.0e+04 1.7e+04 0.0e+00 4 31 73 13 0 4 31 73 13 0 3170 MatSolve 4706 1.1 1.8594e+01 1.2 3.11e+10 1.2 0.0e+00 0.0e+00 0.0e+00 3 21 0 0 0 3 21 0 0 0 3056 MatLUFactorNum 85 7.1 9.4006e+00 1.1 2.43e+10 1.1 0.0e+00 0.0e+00 0.0e+00 2 17 0 0 0 2 17 0 0 0 4964 MatILUFactorSym 7625.3 8.2000e-02 2.5 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatScale 1 1.0 4.7565e-04 1.3 5.70e+05 1.2 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 2187 MatAssemblyBegin 400 1.2 6.4986e+01 1.0 0.00e+00 0.0 1.6e+01 1.6e+07 0.0e+00 11 0 0 20 0 11 0 0 20 0 0 MatAssemblyEnd 400 1.2 1.1507e+00 3.9 0.00e+00 0.0 9.2e+01 2.4e+03 1.8e+02 0 0 1 0 2 0 0 1 0 2 0 MatGetRow 249600 1.2 2.9696e-02 1.2 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatGetRowIJ 7625.3 1.8358e-0519.2 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatCreateSubMat 44 1.0 1.9472e+00 1.0 0.00e+00 0.0 3.2e+01 1.9e+04 6.0e+01 0 0 0 0 1 0 0 0 0 1 0 MatGetOrdering 7625.3 1.1942e-0310.6 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatZeroEntries 84 7.6 2.3746e-01 5.7 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatView 9 1.8 1.4534e-03 1.9 0.00e+00 0.0 0.0e+00 0.0e+00 8.0e+00 0 0 0 0 0 0 0 0 0 0 0 KSPGMRESOrthog 2976 1.2 7.8828e+0017.8 4.94e+08 1.1 0.0e+00 0.0e+00 2.5e+03 1 0 0 0 22 1 0 0 0 22 120 KSPSetUp 170 1.8 2.2168e-03 5.5 0.00e+00 0.0 0.0e+00 0.0e+00 2.0e+00 0 0 0 0 0 0 0 0 0 0 0 KSPSolve 137 2.1 6.0113e+01 1.1 9.91e+10 1.1 9.9e+03 1.7e+04 9.6e+03 10 68 72 12 86 10 68 72 12 86 3108 PCSetUp 108 3.1 1.1821e+01 1.0 2.43e+10 1.1 4.0e+01 2.2e+04 1.5e+02 2 17 0 0 1 2 17 0 0 1 3947 PCSetUpOnBlocks 825 1.0 9.4338e+00 1.3 2.23e+10 1.3 0.0e+00 0.0e+00 0.0e+00 1 14 0 0 0 1 14 0 0 0 4167 PCApply 1002 2.4 4.9566e+01 1.0 8.89e+10 1.3 9.1e+03 1.5e+04 8.6e+03 8 58 66 10 77 8 58 66 10 77 3226 KSPSolve_FS_0 412 1.0 4.5140e+01 1.0 8.25e+10 1.3 4.1e+03 2.6e+04 4.5e+03 8 53 30 8 40 8 53 30 8 40 3261 KSPSolve_FS_Schu 412 1.0 3.2677e+00 1.0 4.67e+09 1.2 4.1e+03 6.4e+03 4.1e+03 1 3 30 2 37 1 3 30 2 37 2601 TSStep 10 1.0 5.1851e+02 1.0 1.44e+11 1.1 1.3e+04 1.0e+05 1.0e+04 89100 97 99 92 89100 97 99 92 531 TSFunctionEval 73 1.0 1.6781e+02 1.0 1.17e+10 5.3 3.1e+03 2.9e+05 7.3e+01 29 5 23 67 1 29 5 23 67 1 83 TSJacobianEval 10 1.0 2.9273e+02 1.0 4.07e+10 1.0 9.5e+01 2.8e+06 0.0e+00 50 30 1 20 0 50 30 1 20 0 278 SNESSolve 10 1.0 5.1851e+02 1.0 1.44e+11 1.1 1.3e+04 1.0e+05 1.0e+04 89100 97 99 92 89100 97 99 92 531 SNESFunctionEval 73 1.0 1.6781e+02 1.0 1.18e+10 5.3 3.1e+03 2.9e+05 7.3e+01 29 5 23 67 1 29 5 23 67 1 83 SNESJacobianEval 10 1.0 2.9273e+02 1.0 4.07e+10 1.0 9.5e+01 2.8e+06 0.0e+00 50 30 1 20 0 50 30 1 20 0 278 SNESLineSearch 63 1.0 1.4530e+02 1.0 1.14e+10 3.3 2.8e+03 2.8e+05 3.2e+02 25 5 21 58 3 25 5 21 58 3 102 ------------------------------------------------------------------------------------------------------------------------ Memory usage is given in bytes: Object Type Creations Destructions Memory Descendants' Mem. Reports information only for process 0. --- Event Stage 0: Main Stage IGA 5 5 6240 0. IGAM 2 2 4656 0. Viewer 59 58 48720 0. Vector 1428 1414 81136264 0. Index Set 378 378 5213512 0. IS L to G Mapping 314 311 7897376 0. Vec Scatter 48 47 1093744 0. Application Order 6 6 224224 0. Matrix 312 311 1055303020 0. Distributed Mesh 10 10 47016 0. Star Forest Graph 20 20 16000 0. Discrete System 10 10 9200 0. Krylov Solver 83 83 1392264 0. DMKSP interface 1 1 656 0. Preconditioner 83 83 83016 0. TSAdapt 1 1 1224 0. TS 1 1 1984 0. DMTS 1 1 744 0. SNES 1 1 1372 0. SNESLineSearch 1 1 1000 0. DMSNES 2 2 1344 0. ======================================================================================================================== Average time to get PetscTime(): 2.38419e-08 Average time for MPI_Barrier(): 5.05924e-05 Average time for zero size MPI_Send(): 1.57356e-05 #PETSc Option Table entries: -fieldsplit_m_ksp_convergence_test skip -fieldsplit_m_ksp_max_it 5 -fieldsplit_m_ksp_norm_type none -fieldsplit_m_ksp_type fgmres -fieldsplit_m_pc_type bjacobi -fieldsplit_m_sub_ksp_type preonly -fieldsplit_m_sub_pc_factor_levels 0 -fieldsplit_m_sub_pc_type ilu -fieldsplit_p_ksp_ksp_convergence_test skip -fieldsplit_p_ksp_ksp_max_it 5 -fieldsplit_p_ksp_ksp_norm_type none -fieldsplit_p_ksp_ksp_type cg -fieldsplit_p_ksp_pc_type bjacobi -fieldsplit_p_ksp_type preonly -fieldsplit_p_pc_type ksp -geo_iga_load em3d_geo.dat -geo_iga_order 2 -geo_iga_periodic 1,1,0 -geo_iga_quadrature 3,3,3 -iga_view -igam_view -ksp_atol 1e-8 -ksp_converged_reason -ksp_monitor -ksp_norm_type unpreconditioned -ksp_rtol 0.0 -ksp_type fgmres -log_view -p_iga_load em3d_p.dat -p_iga_order 1 -p_iga_periodic 1,1,0 -p_iga_quadrature 3,3,3 -pc_fieldsplit_schur_fact_type upper -pc_fieldsplit_schur_precondition user -pc_fieldsplit_type schur -pc_type fieldsplit -press_ksp_rtol 1e-10 -snes_converged_reason -snes_lag_jacobian 20 -snes_max_it 150 -snes_monitor -snes_rtol 1e-3 -ts_max_snes_failures 20000 -ts_monitor -ts_view -u_iga_load em3d_u.dat -u_iga_order 1 -u_iga_periodic 1,1,0 -u_iga_quadrature 3,3,3 -v_iga_load em3d_v.dat -v_iga_order 1 -v_iga_periodic 1,1,0 -v_iga_quadrature 3,3,3 -w_iga_load em3d_w.dat -w_iga_order 1 -w_iga_periodic 1,1,0 -w_iga_quadrature 3,3,3 #End of PETSc Option Table entries Compiled without FORTRAN kernels Compiled with full precision matrices (default) sizeof(short) 2 sizeof(int) 4 sizeof(long) 8 sizeof(void*) 8 sizeof(PetscScalar) 8 sizeof(PetscInt) 4 Configure options: --with-cc=gcc --with-fc=gfortran --download-fblaslapack --download-mpich --with-debugging=0 COPTFLAGS=-O3 FOPTFLAGS=-O3 CXXOPTFLAGS=-O3 PETSC_ARCH=optimO3fftw391 --download-mumps --download-hypre --download-scalapack --download-parmetis --download-metis --download-fftw --download-cmake ----------------------------------------- Libraries compiled on 2018-04-30 16:27:28 on ubuntu Machine characteristics: Linux-4.13.0-38-generic-x86_64-with-Ubuntu-16.04-xenial Using PETSc directory: /home/hcasquer/petsc-3.9.1 Using PETSc arch: optimO3fftw391 ----------------------------------------- Using C compiler: /home/hcasquer/petsc-3.9.1/optimO3fftw391/bin/mpicc -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -O3 Using Fortran compiler: /home/hcasquer/petsc-3.9.1/optimO3fftw391/bin/mpif90 -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -O3 ----------------------------------------- Using include paths: -I/home/hcasquer/petsc-3.9.1/include -I/home/hcasquer/petsc-3.9.1/optimO3fftw391/include ----------------------------------------- Using C linker: /home/hcasquer/petsc-3.9.1/optimO3fftw391/bin/mpicc Using Fortran linker: /home/hcasquer/petsc-3.9.1/optimO3fftw391/bin/mpif90 Using libraries: -Wl,-rpath,/home/hcasquer/petsc-3.9.1/optimO3fftw391/lib -L/home/hcasquer/petsc-3.9.1/optimO3fftw391/lib -lpetsc -Wl,-rpath,/home/hcasquer/petsc-3.9.1/optimO3fftw391/lib -L/home/hcasquer/petsc-3.9.1/optimO3fftw391/lib -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lpthread -lscalapack -lHYPRE -lfftw3_mpi -lfftw3 -lflapack -lfblas -lparmetis -lmetis -lm -lpthread -lstdc++ -ldl -lmpifort -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lstdc++ -ldl ----------------------------------------- From knepley at gmail.com Mon Jul 2 07:59:41 2018 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 2 Jul 2018 07:59:41 -0500 Subject: [petsc-users] Linesearch type cp change from 3.7.6 to 3.9.1 In-Reply-To: References: Message-ID: On Mon, Jul 2, 2018 at 4:54 AM Carles Bona-Casas wrote: > Dear all, > > I have been running a code with the option -snes_linesearch_type cp using > petsc 3.7.6. > > I have updated my code to use petsc 3.9.1. If I run a simulation with the > updated code and the option -snes_linesearch_type cp included, I obtain the > same behaviour in the solution for a while, but then it suddenly stops > converging for no apparent reason. > > If I run the same example with both petsc versions without using > -snes_linesearch_type cp then I obtain exactly the same behaviour. > > My code currently runs quite faster with that option activated. Is there > some default behaviour regarding -snes_linesearch_type cp that has been > changed from petsc 3.7 to petsc 3.9? > > I attach my 3 outputs. With petsc 3.7.6 and cp option activated. With > petsc 3.9.1 and cp option activated (not converging). And without cp option > activated (only one file, same result with both petsc versions). > > I am also open to suggestions of different solvers that could work better > than using -snes_linesearch_type cp. > The first real difference between the files occurs here: 254,265c254,907 < Linear solve converged due to CONVERGED_RTOL iterations 7 < FirstNewton = 0 < Linear solve converged due to CONVERGED_RTOL iterations 7 < FirstNewton = 0 < 4 SNES Function norm 1.219642897375e-06 < NORM2F: 1.219643e-06 NORM2F/NORM2F0: 1.366681e-07 < NORM2dof0: 7.904453e-07 NORM2dof0/NORM2dof00: 8.857402e-08 < NORM2dof1: 5.299586e-07 NORM2dof1/NORM2dof10: 2.277562e-04 < NORM2dof2: 7.627955e-07 NORM2dof2/NORM2dof20: 3.462714e-04 < NORM2dof3: 3.457406e-09 NORM2dof3/NORM2dof30: 4.131767e-01 < isolid: 0 NORM2S: 1.174284e-13 NORM2S/NORM2S0: 1.630586e-04 < Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4 --- > 4 SNES Function norm 1.411908637477e-05 > NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 > NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 > NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 > NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 > NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 > isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 > 0 KSP Residual norm 1.411908637477e-05 > 1 KSP Residual norm 1.147024084989e-05 > 2 KSP Residual norm 1.642505389042e-06 > 3 KSP Residual norm 9.393394019526e-08 > 4 KSP Residual norm 3.802608124054e-08 > 5 KSP Residual norm 3.488335294398e-09 > Linear solve converged due to CONVERGED_ATOL iterations 5 > 5 SNES Function norm 1.411908637477e-05 > NORM2F: 1.411909e-05 NORM2F/NORM2F0: 1.582126e-06 > NORM2dof0: 7.713374e-06 NORM2dof0/NORM2dof00: 8.643286e-07 > NORM2dof1: 5.780273e-06 NORM2dof1/NORM2dof10: 2.484143e-03 > NORM2dof2: 1.031702e-05 NORM2dof2/NORM2dof20: 4.683416e-03 > NORM2dof3: 4.547591e-09 NORM2dof3/NORM2dof30: 5.434590e-01 > isolid: 0 NORM2S: 1.069509e-12 NORM2S/NORM2S0: 1.485097e-03 As you can see, something is being solved in 3.7.6 that is absent in 3.9.2: < Linear solve converged due to CONVERGED_RTOL iterations 7 < FirstNewton = 0 < Linear solve converged due to CONVERGED_RTOL iterations 7 < FirstNewton = 0 Where does the 'FirstNewton' output come from in your code? Maybe this is a clue. I would get in the debugger, and follow the control flow after SNES iterate 3. Finally, are you sure that CP line search is being used in 3.9.2? I cannot see the -snes_view output. Maybe you want -snes_view_pre? Thanks, Matt > Many thanks, > > Carles > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexlindsay239 at gmail.com Mon Jul 2 10:17:15 2018 From: alexlindsay239 at gmail.com (Alexander Lindsay) Date: Mon, 2 Jul 2018 09:17:15 -0600 Subject: [petsc-users] "snes_type test" is gone? In-Reply-To: References: <9F7A97FC-EBC7-4F20-ADA6-4D03B145DFB0@anl.gov> Message-ID: Thank you Lisandro, that seems to work perfectly for what we want! On Sat, Jun 30, 2018 at 4:28 AM, Lisandro Dalcin wrote: > ./example.exe -snes_test_jacobian -snes_type ksponly -ksp_type preonly > -pc_type none -snes_convergence_test skip > On Sat, 30 Jun 2018 at 01:06, Alexander Lindsay > wrote: > > > > Is there a way to mimic the behavior of `-snes_type test` with new > PETSc? E.g. don't attempt to perform any solves? They're stupid but we have > a bunch of tests in MOOSE that are set-up only to test the Jacobian, and > any attempts to actually solve the system are disastrous. I can hack around > this by doing things like setting the convergence reason to > `SNES_CONVERGED_ITS` and similarly for ksp, making sure I use `-pc_type > gamg` since there are missing Jacobian diagonal entries, etc. but this > doesn't seem ideal. > > > > Alex > > > > On Mon, Jun 4, 2018 at 4:26 PM, Kong, Fande wrote: > >> > >> Thanks, Hong, > >> > >> I see. It is better if "-snes_type test" did not exist at the first > place. > >> > >> > >> Fande, > >> > >> On Mon, Jun 4, 2018 at 4:01 PM, Zhang, Hong wrote: > >>> > >>> > >>> > >>> > On Jun 4, 2018, at 4:59 PM, Zhang, Hong wrote: > >>> > > >>> > -snes_type has been removed. We can just use -snes_test_jacobian > instead. Note that the test is done every time the Jacobian is computed. > >>> > >>> It was meant to be "-snes_type test". > >>> > >>> > Hong (Mr.) > >>> > > >>> >> On Jun 4, 2018, at 3:27 PM, Kong, Fande wrote: > >>> >> > >>> >> Hi PETSc Team, > >>> >> > >>> >> I was wondering if "snes_type test" has been gone? Quite a few > MOOSE users use this option to test their Jacobian matrices. > >>> >> > >>> >> If it is gone, any reason? > >>> >> > >>> >> Fande, > >>> > > >>> > >> > > > > > -- > Lisandro Dalcin > ============ > Research Scientist > Computer, Electrical and Mathematical Sciences & Engineering (CEMSE) > Extreme Computing Research Center (ECRC) > King Abdullah University of Science and Technology (KAUST) > http://ecrc.kaust.edu.sa/ > > 4700 King Abdullah University of Science and Technology > al-Khawarizmi Bldg (Bldg 1), Office # 0109 > Thuwal 23955-6900, Kingdom of Saudi Arabia > http://www.kaust.edu.sa > > Office Phone: +966 12 808-0459 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvalera-w at sdsu.edu Mon Jul 2 14:58:24 2018 From: mvalera-w at sdsu.edu (Manuel Valera) Date: Mon, 2 Jul 2018 12:58:24 -0700 Subject: [petsc-users] DMGlobalToLocal acting weird Message-ID: Hi guys, I've noticed a bug in my code that seems to happen right after a call to DMGlobalToLocalBegin/End and i can't seem to find a reason, it goes like this: I create the DMDA (daScalars) with the following: bx = DM_BOUNDARY_GHOSTED > by = DM_BOUNDARY_PERIODIC > bz = DM_BOUNDARY_GHOSTED > dof = 1 > stw = 3 > call DMDACreate3d(PETSC_COMM_WORLD,bx,by,bz,DMDA_STENCIL_BOX, > gridx,gridy,gridz,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE, & > dof,stw,PETSC_NULL_INTEGER, > PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,daScalars,ierr) > call DMSetFromOptions(daScalars,ierr) > call DMSetUp(daScalars,ierr) Then i read from a file the temperature and salinity fields of my problems, those two are giving the trouble, i do it with this template: call DMCreateGlobalVector(daScalars,gTemperature,ierr) > call DMDAVecGetArrayF90(daScalars,gTemperature,arrtemp,ierr) > arrtemp = 99.0d0 !no idea why this fixes the problem -mv 62518 > call getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) > do k=zstart,zend-1 > do j=ystart,yend-1 > do i=xstart,xend-1 > arrtemp(i,j,k) = T0(i+1,j+1,k+1) > enddo > enddo > enddo > call DMDAVecRestoreArrayF90(daScalars,gTemperature,arrtemp,ierr) > call DMCreateLocalVector(daScalars,LocTemperature,ierr) > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_ > VALUES,LocTemperature,ierr) > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES, > LocTemperature,ierr) Now here is the first weirdness, if i assign a number to my array it does behave as it should for the global quantity, but it must be a greater number than the maximum of the field for this to happen, so i assign 99.0 arbitrarily, otherwise it doesn't read the array correctly, but it does as of now, Next, the last two lines communicate the array to the local counterparts, but when i read LocTemperature with: call DMDAVecGetArrayReadF90(daScalars,DimTemperature,tdim,ierr) > print*,'Copied MinT0: ', minval(tdim) > call DMDAVecRestoreArrayReadF90(daScalars,DimTemperature,tdim,ierr) That array minimum doesn't coincide with the global minimum, it should be 1.000 but it is just 0.000, the same happens with the Salinity following an identical approach, Any ideas on where to start looking? i have last month's PETSc build, I'm running in 1 processor for now, Thanks, Manuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Mon Jul 2 17:04:51 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Mon, 2 Jul 2018 22:04:51 +0000 Subject: [petsc-users] DMGlobalToLocal acting weird In-Reply-To: References: Message-ID: First make sure that getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) returns what it should. remove the 99 business and print out the arrtemp() and TO() values. Are they correct? What is DimTemperature? Shouldn't it be LocTempature? Print out the values in tdim(). Barry > On Jul 2, 2018, at 2:58 PM, Manuel Valera wrote: > > Hi guys, > > I've noticed a bug in my code that seems to happen right after a call to DMGlobalToLocalBegin/End and i can't seem to find a reason, it goes like this: > > I create the DMDA (daScalars) with the following: > > bx = DM_BOUNDARY_GHOSTED > by = DM_BOUNDARY_PERIODIC > bz = DM_BOUNDARY_GHOSTED > dof = 1 > stw = 3 > call DMDACreate3d(PETSC_COMM_WORLD,bx,by,bz,DMDA_STENCIL_BOX,gridx,gridy,gridz,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE, & dof,stw,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,daScalars,ierr) > call DMSetFromOptions(daScalars,ierr) > call DMSetUp(daScalars,ierr) > > Then i read from a file the temperature and salinity fields of my problems, those two are giving the trouble, i do it with this template: > > call DMCreateGlobalVector(daScalars,gTemperature,ierr) > call DMDAVecGetArrayF90(daScalars,gTemperature,arrtemp,ierr) > arrtemp = 99.0d0 !no idea why this fixes the problem -mv 62518 > call getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) > do k=zstart,zend-1 > do j=ystart,yend-1 > do i=xstart,xend-1 > arrtemp(i,j,k) = T0(i+1,j+1,k+1) > enddo > enddo > enddo > call DMDAVecRestoreArrayF90(daScalars,gTemperature,arrtemp,ierr) > call DMCreateLocalVector(daScalars,LocTemperature,ierr) > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) > > > Now here is the first weirdness, if i assign a number to my array it does behave as it should for the global quantity, but it must be a greater number than the maximum of the field for this to happen, so i assign 99.0 arbitrarily, otherwise it doesn't read the array correctly, but it does as of now, > > Next, the last two lines communicate the array to the local counterparts, but when i read LocTemperature with: > > call DMDAVecGetArrayReadF90(daScalars,DimTemperature,tdim,ierr) > print*,'Copied MinT0: ', minval(tdim) > call DMDAVecRestoreArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > That array minimum doesn't coincide with the global minimum, it should be 1.000 but it is just 0.000, the same happens with the Salinity following an identical approach, > > Any ideas on where to start looking? i have last month's PETSc build, > > I'm running in 1 processor for now, > > Thanks, > > Manuel > > > > > > > > > > From mvalera-w at sdsu.edu Mon Jul 2 17:42:05 2018 From: mvalera-w at sdsu.edu (Manuel Valera) Date: Mon, 2 Jul 2018 15:42:05 -0700 Subject: [petsc-users] DMGlobalToLocal acting weird In-Reply-To: References: Message-ID: On Mon, Jul 2, 2018 at 3:04 PM, Smith, Barry F. wrote: > > First make sure that getCenterInfo(daScalars, xstart, ystart, zstart, > xend, yend, zend) returns what it should. > It does, i am also working in one processor only for now. > remove the 99 business and print out the arrtemp() and TO() values. Are > they correct? > They are not, i'm using maximum and minimum as probes to print into, but the minimum of T0 is 1 and is 0 for arrtemp, What is DimTemperature? Shouldn't it be LocTempature? > Yes, sorry about that, > > Print out the values in tdim(). > Yes, the same as with arrtemp/T0 Sorry i didn't mention i was debugging by printing the extremas of the arrays, >From your answer you seem to think the problem is in my code's side and it may very well be, but from the DMGlobalToLocalBegin there is a warning saying INSERT_VALUES doesn't work with DMDAs, is this still an issue or have been fixed? i understand it looks like these are two different problems in my code, Thanks, > > Barry > > > > > > On Jul 2, 2018, at 2:58 PM, Manuel Valera wrote: > > > > Hi guys, > > > > I've noticed a bug in my code that seems to happen right after a call to > DMGlobalToLocalBegin/End and i can't seem to find a reason, it goes like > this: > > > > I create the DMDA (daScalars) with the following: > > > > bx = DM_BOUNDARY_GHOSTED > > by = DM_BOUNDARY_PERIODIC > > bz = DM_BOUNDARY_GHOSTED > > dof = 1 > > stw = 3 > > call DMDACreate3d(PETSC_COMM_WORLD,bx,by,bz,DMDA_STENCIL_BOX, > gridx,gridy,gridz,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE, & > dof,stw,PETSC_NULL_INTEGER, > PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,daScalars,ierr) > > call DMSetFromOptions(daScalars,ierr) > > call DMSetUp(daScalars,ierr) > > > > Then i read from a file the temperature and salinity fields of my > problems, those two are giving the trouble, i do it with this template: > > > > call DMCreateGlobalVector(daScalars,gTemperature,ierr) > > call DMDAVecGetArrayF90(daScalars,gTemperature,arrtemp,ierr) > > arrtemp = 99.0d0 !no idea why this fixes the problem -mv 62518 > > call getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) > > do k=zstart,zend-1 > > do j=ystart,yend-1 > > do i=xstart,xend-1 > > arrtemp(i,j,k) = T0(i+1,j+1,k+1) > > enddo > > enddo > > enddo > > call DMDAVecRestoreArrayF90(daScalars,gTemperature,arrtemp,ierr) > > call DMCreateLocalVector(daScalars,LocTemperature,ierr) > > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_ > VALUES,LocTemperature,ierr) > > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES, > LocTemperature,ierr) > > > > > > Now here is the first weirdness, if i assign a number to my array it > does behave as it should for the global quantity, but it must be a greater > number than the maximum of the field for this to happen, so i assign 99.0 > arbitrarily, otherwise it doesn't read the array correctly, but it does as > of now, > > > > Next, the last two lines communicate the array to the local > counterparts, but when i read LocTemperature with: > > > > call DMDAVecGetArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > print*,'Copied MinT0: ', minval(tdim) > > call DMDAVecRestoreArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > > > That array minimum doesn't coincide with the global minimum, it should > be 1.000 but it is just 0.000, the same happens with the Salinity following > an identical approach, > > > > Any ideas on where to start looking? i have last month's PETSc build, > > > > I'm running in 1 processor for now, > > > > Thanks, > > > > Manuel > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvalera-w at sdsu.edu Mon Jul 2 18:13:31 2018 From: mvalera-w at sdsu.edu (Manuel Valera) Date: Mon, 2 Jul 2018 16:13:31 -0700 Subject: [petsc-users] DMGlobalToLocal acting weird In-Reply-To: References: Message-ID: Ok so i fixed the '99 business' by making sure the whole DMDA array was filled, there was row at the end that wasn't and hence that problem, The local vector problem persists, though, i solved it for now using a global vector instead of a local one, is this because of the warning on globaltolocalbegin/end? Thanks, On Mon, Jul 2, 2018 at 3:42 PM, Manuel Valera wrote: > > > On Mon, Jul 2, 2018 at 3:04 PM, Smith, Barry F. > wrote: > >> >> First make sure that getCenterInfo(daScalars, xstart, ystart, zstart, >> xend, yend, zend) returns what it should. >> > > It does, i am also working in one processor only for now. > > > >> remove the 99 business and print out the arrtemp() and TO() values. >> Are they correct? >> > > They are not, i'm using maximum and minimum as probes to print into, but > the minimum of T0 is 1 and is 0 for arrtemp, > > > What is DimTemperature? Shouldn't it be LocTempature? >> > > Yes, sorry about that, > > >> >> Print out the values in tdim(). >> > > Yes, the same as with arrtemp/T0 > > Sorry i didn't mention i was debugging by printing the extremas of the > arrays, > > From your answer you seem to think the problem is in my code's side and it > may very well be, but from the DMGlobalToLocalBegin there is a warning > saying INSERT_VALUES doesn't work with DMDAs, is this still an issue or > have been fixed? i understand it looks like these are two different > problems in my code, > > Thanks, > > > > > > > > > > > >> >> Barry >> >> >> >> >> > On Jul 2, 2018, at 2:58 PM, Manuel Valera wrote: >> > >> > Hi guys, >> > >> > I've noticed a bug in my code that seems to happen right after a call >> to DMGlobalToLocalBegin/End and i can't seem to find a reason, it goes like >> this: >> > >> > I create the DMDA (daScalars) with the following: >> > >> > bx = DM_BOUNDARY_GHOSTED >> > by = DM_BOUNDARY_PERIODIC >> > bz = DM_BOUNDARY_GHOSTED >> > dof = 1 >> > stw = 3 >> > call DMDACreate3d(PETSC_COMM_WORLD,bx,by,bz,DMDA_STENCIL_BOX,grid >> x,gridy,gridz,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE, & >> dof,stw,PETSC_NULL_INTEGER,PET >> SC_NULL_INTEGER,PETSC_NULL_INTEGER,daScalars,ierr) >> > call DMSetFromOptions(daScalars,ierr) >> > call DMSetUp(daScalars,ierr) >> > >> > Then i read from a file the temperature and salinity fields of my >> problems, those two are giving the trouble, i do it with this template: >> > >> > call DMCreateGlobalVector(daScalars,gTemperature,ierr) >> > call DMDAVecGetArrayF90(daScalars,gTemperature,arrtemp,ierr) >> > arrtemp = 99.0d0 !no idea why this fixes the problem -mv 62518 >> > call getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) >> > do k=zstart,zend-1 >> > do j=ystart,yend-1 >> > do i=xstart,xend-1 >> > arrtemp(i,j,k) = T0(i+1,j+1,k+1) >> > enddo >> > enddo >> > enddo >> > call DMDAVecRestoreArrayF90(daScalars,gTemperature,arrtemp,ierr) >> > call DMCreateLocalVector(daScalars,LocTemperature,ierr) >> > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_VALUES, >> LocTemperature,ierr) >> > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES,LocT >> emperature,ierr) >> > >> > >> > Now here is the first weirdness, if i assign a number to my array it >> does behave as it should for the global quantity, but it must be a greater >> number than the maximum of the field for this to happen, so i assign 99.0 >> arbitrarily, otherwise it doesn't read the array correctly, but it does as >> of now, >> > >> > Next, the last two lines communicate the array to the local >> counterparts, but when i read LocTemperature with: >> > >> > call DMDAVecGetArrayReadF90(daScalars,DimTemperature,tdim,ierr) >> > print*,'Copied MinT0: ', minval(tdim) >> > call DMDAVecRestoreArrayReadF90(daScalars,DimTemperature,tdim,ierr) >> > >> > That array minimum doesn't coincide with the global minimum, it should >> be 1.000 but it is just 0.000, the same happens with the Salinity following >> an identical approach, >> > >> > Any ideas on where to start looking? i have last month's PETSc build, >> > >> > I'm running in 1 processor for now, >> > >> > Thanks, >> > >> > Manuel >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Mon Jul 2 18:20:48 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Mon, 2 Jul 2018 23:20:48 +0000 Subject: [petsc-users] DMGlobalToLocal acting weird In-Reply-To: References: Message-ID: <0C9A09B8-AF55-472B-90F8-FC48F7214A41@mcs.anl.gov> > On Jul 2, 2018, at 5:42 PM, Manuel Valera wrote: > > > > On Mon, Jul 2, 2018 at 3:04 PM, Smith, Barry F. wrote: > > First make sure that getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) returns what it should. > > It does, i am also working in one processor only for now. > > > remove the 99 business and print out the arrtemp() and TO() values. Are they correct? > > They are not, i'm using maximum and minimum as probes to print into, but the minimum of T0 is 1 and is 0 for arrtemp, > > > What is DimTemperature? Shouldn't it be LocTempature? > > Yes, sorry about that, > > > Print out the values in tdim(). > > Yes, the same as with arrtemp/T0 > > Sorry i didn't mention i was debugging by printing the extremas of the arrays, > > From your answer you seem to think the problem is in my code's side and it may very well be, but from the DMGlobalToLocalBegin there is a warning saying INSERT_VALUES doesn't work with DMDAs, is this still an issue or have been fixed? The warning is for DMLocalToGlobalBegin/End() not GlobalToLocal() > i understand it looks like these are two different problems in my code, > > Thanks, > > > > > > > > > > > > Barry > > > > > > On Jul 2, 2018, at 2:58 PM, Manuel Valera wrote: > > > > Hi guys, > > > > I've noticed a bug in my code that seems to happen right after a call to DMGlobalToLocalBegin/End and i can't seem to find a reason, it goes like this: > > > > I create the DMDA (daScalars) with the following: > > > > bx = DM_BOUNDARY_GHOSTED > > by = DM_BOUNDARY_PERIODIC > > bz = DM_BOUNDARY_GHOSTED > > dof = 1 > > stw = 3 > > call DMDACreate3d(PETSC_COMM_WORLD,bx,by,bz,DMDA_STENCIL_BOX,gridx,gridy,gridz,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE, & dof,stw,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,daScalars,ierr) > > call DMSetFromOptions(daScalars,ierr) > > call DMSetUp(daScalars,ierr) > > > > Then i read from a file the temperature and salinity fields of my problems, those two are giving the trouble, i do it with this template: > > > > call DMCreateGlobalVector(daScalars,gTemperature,ierr) > > call DMDAVecGetArrayF90(daScalars,gTemperature,arrtemp,ierr) > > arrtemp = 99.0d0 !no idea why this fixes the problem -mv 62518 > > call getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) > > do k=zstart,zend-1 > > do j=ystart,yend-1 > > do i=xstart,xend-1 > > arrtemp(i,j,k) = T0(i+1,j+1,k+1) > > enddo > > enddo > > enddo > > call DMDAVecRestoreArrayF90(daScalars,gTemperature,arrtemp,ierr) > > call DMCreateLocalVector(daScalars,LocTemperature,ierr) > > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) > > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) > > > > > > Now here is the first weirdness, if i assign a number to my array it does behave as it should for the global quantity, but it must be a greater number than the maximum of the field for this to happen, so i assign 99.0 arbitrarily, otherwise it doesn't read the array correctly, but it does as of now, > > > > Next, the last two lines communicate the array to the local counterparts, but when i read LocTemperature with: > > > > call DMDAVecGetArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > print*,'Copied MinT0: ', minval(tdim) > > call DMDAVecRestoreArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > > > That array minimum doesn't coincide with the global minimum, it should be 1.000 but it is just 0.000, the same happens with the Salinity following an identical approach, > > > > Any ideas on where to start looking? i have last month's PETSc build, > > > > I'm running in 1 processor for now, > > > > Thanks, > > > > Manuel > > > > > > > > > > > > > > > > > > > > > > From bsmith at mcs.anl.gov Mon Jul 2 18:23:43 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Mon, 2 Jul 2018 23:23:43 +0000 Subject: [petsc-users] DMGlobalToLocal acting weird In-Reply-To: References: Message-ID: <12B49AD7-F0FE-4666-A541-127AC3EABED9@mcs.anl.gov> > On Jul 2, 2018, at 6:13 PM, Manuel Valera wrote: > > Ok so i fixed the '99 business' by making sure the whole DMDA array was filled, there was row at the end that wasn't and hence that problem, > > The local vector problem persists, though, Exactly what error? When you print the entire local vector it doesn't match the global vector? Or something else. DMGlobalToLocalBegin/End() are used in dozens of tests in PETSc; very unlikely there is a bug that is causing you a problem especially on one process where it just copies the values from the global vector to the local vector. > i solved it for now using a global vector instead of a local one, is this because of the warning on globaltolocalbegin/end? > > Thanks, > > > > On Mon, Jul 2, 2018 at 3:42 PM, Manuel Valera wrote: > > > On Mon, Jul 2, 2018 at 3:04 PM, Smith, Barry F. wrote: > > First make sure that getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) returns what it should. > > It does, i am also working in one processor only for now. > > > remove the 99 business and print out the arrtemp() and TO() values. Are they correct? > > They are not, i'm using maximum and minimum as probes to print into, but the minimum of T0 is 1 and is 0 for arrtemp, > > > What is DimTemperature? Shouldn't it be LocTempature? > > Yes, sorry about that, > > > Print out the values in tdim(). > > Yes, the same as with arrtemp/T0 > > Sorry i didn't mention i was debugging by printing the extremas of the arrays, > > From your answer you seem to think the problem is in my code's side and it may very well be, but from the DMGlobalToLocalBegin there is a warning saying INSERT_VALUES doesn't work with DMDAs, is this still an issue or have been fixed? i understand it looks like these are two different problems in my code, > > Thanks, > > > > > > > > > > > > Barry > > > > > > On Jul 2, 2018, at 2:58 PM, Manuel Valera wrote: > > > > Hi guys, > > > > I've noticed a bug in my code that seems to happen right after a call to DMGlobalToLocalBegin/End and i can't seem to find a reason, it goes like this: > > > > I create the DMDA (daScalars) with the following: > > > > bx = DM_BOUNDARY_GHOSTED > > by = DM_BOUNDARY_PERIODIC > > bz = DM_BOUNDARY_GHOSTED > > dof = 1 > > stw = 3 > > call DMDACreate3d(PETSC_COMM_WORLD,bx,by,bz,DMDA_STENCIL_BOX,gridx,gridy,gridz,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE, & dof,stw,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,daScalars,ierr) > > call DMSetFromOptions(daScalars,ierr) > > call DMSetUp(daScalars,ierr) > > > > Then i read from a file the temperature and salinity fields of my problems, those two are giving the trouble, i do it with this template: > > > > call DMCreateGlobalVector(daScalars,gTemperature,ierr) > > call DMDAVecGetArrayF90(daScalars,gTemperature,arrtemp,ierr) > > arrtemp = 99.0d0 !no idea why this fixes the problem -mv 62518 > > call getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) > > do k=zstart,zend-1 > > do j=ystart,yend-1 > > do i=xstart,xend-1 > > arrtemp(i,j,k) = T0(i+1,j+1,k+1) > > enddo > > enddo > > enddo > > call DMDAVecRestoreArrayF90(daScalars,gTemperature,arrtemp,ierr) > > call DMCreateLocalVector(daScalars,LocTemperature,ierr) > > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) > > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) > > > > > > Now here is the first weirdness, if i assign a number to my array it does behave as it should for the global quantity, but it must be a greater number than the maximum of the field for this to happen, so i assign 99.0 arbitrarily, otherwise it doesn't read the array correctly, but it does as of now, > > > > Next, the last two lines communicate the array to the local counterparts, but when i read LocTemperature with: > > > > call DMDAVecGetArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > print*,'Copied MinT0: ', minval(tdim) > > call DMDAVecRestoreArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > > > That array minimum doesn't coincide with the global minimum, it should be 1.000 but it is just 0.000, the same happens with the Salinity following an identical approach, > > > > Any ideas on where to start looking? i have last month's PETSc build, > > > > I'm running in 1 processor for now, > > > > Thanks, > > > > Manuel > > > > > > > > > > > > > > > > > > > > > > > From bsmith at mcs.anl.gov Mon Jul 2 18:52:57 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Mon, 2 Jul 2018 23:52:57 +0000 Subject: [petsc-users] DMGlobalToLocal acting weird In-Reply-To: References: <12B49AD7-F0FE-4666-A541-127AC3EABED9@mcs.anl.gov> Message-ID: <2811DB9E-9FFA-4A08-82A3-F9A205107825@mcs.anl.gov> > On Jul 2, 2018, at 6:48 PM, Manuel Valera wrote: > > > > On Mon, Jul 2, 2018 at 4:23 PM, Smith, Barry F. wrote: > > > > On Jul 2, 2018, at 6:13 PM, Manuel Valera wrote: > > > > Ok so i fixed the '99 business' by making sure the whole DMDA array was filled, there was row at the end that wasn't and hence that problem, > > > > The local vector problem persists, though, > > Exactly what error? When you print the entire local vector it doesn't match the global vector? Or something else. > > So, still debugging with extremas, if i do: > > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) What about LocTempature? Is that correct or not? using min() helps you determine there is a problem but doesn't help much in determine exactly where the problem is. Print all of the entries in LocTempature and in DimTempature to see which ones are bad, or are they all bad? > call DMCreateLocalVector(daScalars,DimTemperature,ierr) > call VecCopy(LocTemperature,DimTemperature,ierr) > > I get a wrong minimum, zero instead of the actual value, > > If instead i do: > > call DMCreateGlobalVector(daScalars,DimTemperature,ierr) > call VecCopy(gTemperature,DimTemperature,ierr) > > I get the right extreme values, > > > > DMGlobalToLocalBegin/End() are used in dozens of tests in PETSc; very unlikely there is a bug that is causing you a problem especially on one process where it just copies the values from the global vector to the local vector. > > Yes, this is baffling for me also, but the parallelization of my code is based on this paradigm of local vectors so i need to be sure is working properly, and it wasn't until these changes, > > Thanks, > > > > > > > > > i solved it for now using a global vector instead of a local one, is this because of the warning on globaltolocalbegin/end? > > > > Thanks, > > > > > > > > On Mon, Jul 2, 2018 at 3:42 PM, Manuel Valera wrote: > > > > > > On Mon, Jul 2, 2018 at 3:04 PM, Smith, Barry F. wrote: > > > > First make sure that getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) returns what it should. > > > > It does, i am also working in one processor only for now. > > > > > > remove the 99 business and print out the arrtemp() and TO() values. Are they correct? > > > > They are not, i'm using maximum and minimum as probes to print into, but the minimum of T0 is 1 and is 0 for arrtemp, > > > > > > What is DimTemperature? Shouldn't it be LocTempature? > > > > Yes, sorry about that, > > > > > > Print out the values in tdim(). > > > > Yes, the same as with arrtemp/T0 > > > > Sorry i didn't mention i was debugging by printing the extremas of the arrays, > > > > From your answer you seem to think the problem is in my code's side and it may very well be, but from the DMGlobalToLocalBegin there is a warning saying INSERT_VALUES doesn't work with DMDAs, is this still an issue or have been fixed? i understand it looks like these are two different problems in my code, > > > > Thanks, > > > > > > > > > > > > > > > > > > > > > > > > Barry > > > > > > > > > > > On Jul 2, 2018, at 2:58 PM, Manuel Valera wrote: > > > > > > Hi guys, > > > > > > I've noticed a bug in my code that seems to happen right after a call to DMGlobalToLocalBegin/End and i can't seem to find a reason, it goes like this: > > > > > > I create the DMDA (daScalars) with the following: > > > > > > bx = DM_BOUNDARY_GHOSTED > > > by = DM_BOUNDARY_PERIODIC > > > bz = DM_BOUNDARY_GHOSTED > > > dof = 1 > > > stw = 3 > > > call DMDACreate3d(PETSC_COMM_WORLD,bx,by,bz,DMDA_STENCIL_BOX,gridx,gridy,gridz,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE, & dof,stw,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,daScalars,ierr) > > > call DMSetFromOptions(daScalars,ierr) > > > call DMSetUp(daScalars,ierr) > > > > > > Then i read from a file the temperature and salinity fields of my problems, those two are giving the trouble, i do it with this template: > > > > > > call DMCreateGlobalVector(daScalars,gTemperature,ierr) > > > call DMDAVecGetArrayF90(daScalars,gTemperature,arrtemp,ierr) > > > arrtemp = 99.0d0 !no idea why this fixes the problem -mv 62518 > > > call getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, zend) > > > do k=zstart,zend-1 > > > do j=ystart,yend-1 > > > do i=xstart,xend-1 > > > arrtemp(i,j,k) = T0(i+1,j+1,k+1) > > > enddo > > > enddo > > > enddo > > > call DMDAVecRestoreArrayF90(daScalars,gTemperature,arrtemp,ierr) > > > call DMCreateLocalVector(daScalars,LocTemperature,ierr) > > > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) > > > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES,LocTemperature,ierr) > > > > > > > > > Now here is the first weirdness, if i assign a number to my array it does behave as it should for the global quantity, but it must be a greater number than the maximum of the field for this to happen, so i assign 99.0 arbitrarily, otherwise it doesn't read the array correctly, but it does as of now, > > > > > > Next, the last two lines communicate the array to the local counterparts, but when i read LocTemperature with: > > > > > > call DMDAVecGetArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > > print*,'Copied MinT0: ', minval(tdim) > > > call DMDAVecRestoreArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > > > > > That array minimum doesn't coincide with the global minimum, it should be 1.000 but it is just 0.000, the same happens with the Salinity following an identical approach, > > > > > > Any ideas on where to start looking? i have last month's PETSc build, > > > > > > I'm running in 1 processor for now, > > > > > > Thanks, > > > > > > Manuel > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From mvalera-w at sdsu.edu Mon Jul 2 19:07:48 2018 From: mvalera-w at sdsu.edu (Manuel Valera) Date: Mon, 2 Jul 2018 17:07:48 -0700 Subject: [petsc-users] DMGlobalToLocal acting weird In-Reply-To: <2811DB9E-9FFA-4A08-82A3-F9A205107825@mcs.anl.gov> References: <12B49AD7-F0FE-4666-A541-127AC3EABED9@mcs.anl.gov> <2811DB9E-9FFA-4A08-82A3-F9A205107825@mcs.anl.gov> Message-ID: Yes, LocTemperature is the one with the problem, right after calling GlobalToLocalBegin/End() that array is different from the gTemperature it comes from, I cannot tell exactly where right now, i would need to create a much smaller experiment to print all of the entries, i'll try doing that tomorrow, Thanks, On Mon, Jul 2, 2018 at 4:52 PM, Smith, Barry F. wrote: > > > > On Jul 2, 2018, at 6:48 PM, Manuel Valera wrote: > > > > > > > > On Mon, Jul 2, 2018 at 4:23 PM, Smith, Barry F. > wrote: > > > > > > > On Jul 2, 2018, at 6:13 PM, Manuel Valera wrote: > > > > > > Ok so i fixed the '99 business' by making sure the whole DMDA array > was filled, there was row at the end that wasn't and hence that problem, > > > > > > The local vector problem persists, though, > > > > Exactly what error? When you print the entire local vector it doesn't > match the global vector? Or something else. > > > > So, still debugging with extremas, if i do: > > > > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_ > VALUES,LocTemperature,ierr) > > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES, > LocTemperature,ierr) > > What about LocTempature? Is that correct or not? > > using min() helps you determine there is a problem but doesn't help > much in determine exactly where the problem is. Print all of the entries in > LocTempature and in DimTempature to see which ones are bad, or are they all > bad? > > > > call DMCreateLocalVector(daScalars,DimTemperature,ierr) > > call VecCopy(LocTemperature,DimTemperature,ierr) > > > > I get a wrong minimum, zero instead of the actual value, > > > > If instead i do: > > > > call DMCreateGlobalVector(daScalars,DimTemperature,ierr) > > call VecCopy(gTemperature,DimTemperature,ierr) > > > > I get the right extreme values, > > > > > > > > DMGlobalToLocalBegin/End() are used in dozens of tests in PETSc; very > unlikely there is a bug that is causing you a problem especially on one > process where it just copies the values from the global vector to the local > vector. > > > > Yes, this is baffling for me also, but the parallelization of my code is > based on this paradigm of local vectors so i need to be sure is working > properly, and it wasn't until these changes, > > > > Thanks, > > > > > > > > > > > > > > > > > i solved it for now using a global vector instead of a local one, is > this because of the warning on globaltolocalbegin/end? > > > > > > Thanks, > > > > > > > > > > > > On Mon, Jul 2, 2018 at 3:42 PM, Manuel Valera > wrote: > > > > > > > > > On Mon, Jul 2, 2018 at 3:04 PM, Smith, Barry F. > wrote: > > > > > > First make sure that getCenterInfo(daScalars, xstart, ystart, > zstart, xend, yend, zend) returns what it should. > > > > > > It does, i am also working in one processor only for now. > > > > > > > > > remove the 99 business and print out the arrtemp() and TO() values. > Are they correct? > > > > > > They are not, i'm using maximum and minimum as probes to print into, > but the minimum of T0 is 1 and is 0 for arrtemp, > > > > > > > > > What is DimTemperature? Shouldn't it be LocTempature? > > > > > > Yes, sorry about that, > > > > > > > > > Print out the values in tdim(). > > > > > > Yes, the same as with arrtemp/T0 > > > > > > Sorry i didn't mention i was debugging by printing the extremas of the > arrays, > > > > > > From your answer you seem to think the problem is in my code's side > and it may very well be, but from the DMGlobalToLocalBegin there is a > warning saying INSERT_VALUES doesn't work with DMDAs, is this still an > issue or have been fixed? i understand it looks like these are two > different problems in my code, > > > > > > Thanks, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Barry > > > > > > > > > > > > > > > > On Jul 2, 2018, at 2:58 PM, Manuel Valera > wrote: > > > > > > > > Hi guys, > > > > > > > > I've noticed a bug in my code that seems to happen right after a > call to DMGlobalToLocalBegin/End and i can't seem to find a reason, it goes > like this: > > > > > > > > I create the DMDA (daScalars) with the following: > > > > > > > > bx = DM_BOUNDARY_GHOSTED > > > > by = DM_BOUNDARY_PERIODIC > > > > bz = DM_BOUNDARY_GHOSTED > > > > dof = 1 > > > > stw = 3 > > > > call DMDACreate3d(PETSC_COMM_WORLD,bx,by,bz,DMDA_STENCIL_BOX, > gridx,gridy,gridz,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE, & > dof,stw,PETSC_NULL_INTEGER, > PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,daScalars,ierr) > > > > call DMSetFromOptions(daScalars,ierr) > > > > call DMSetUp(daScalars,ierr) > > > > > > > > Then i read from a file the temperature and salinity fields of my > problems, those two are giving the trouble, i do it with this template: > > > > > > > > call DMCreateGlobalVector(daScalars,gTemperature,ierr) > > > > call DMDAVecGetArrayF90(daScalars,gTemperature,arrtemp,ierr) > > > > arrtemp = 99.0d0 !no idea why this fixes the problem -mv > 62518 > > > > call getCenterInfo(daScalars, xstart, ystart, zstart, xend, yend, > zend) > > > > do k=zstart,zend-1 > > > > do j=ystart,yend-1 > > > > do i=xstart,xend-1 > > > > arrtemp(i,j,k) = T0(i+1,j+1,k+1) > > > > enddo > > > > enddo > > > > enddo > > > > call DMDAVecRestoreArrayF90(daScalars,gTemperature,arrtemp,ierr) > > > > call DMCreateLocalVector(daScalars,LocTemperature,ierr) > > > > call DMGlobalToLocalBegin(daScalars,gTemperature,INSERT_ > VALUES,LocTemperature,ierr) > > > > call DMGlobalToLocalEnd(daScalars,gTemperature,INSERT_VALUES, > LocTemperature,ierr) > > > > > > > > > > > > Now here is the first weirdness, if i assign a number to my array it > does behave as it should for the global quantity, but it must be a greater > number than the maximum of the field for this to happen, so i assign 99.0 > arbitrarily, otherwise it doesn't read the array correctly, but it does as > of now, > > > > > > > > Next, the last two lines communicate the array to the local > counterparts, but when i read LocTemperature with: > > > > > > > > call DMDAVecGetArrayReadF90(daScalars,DimTemperature,tdim,ierr) > > > > print*,'Copied MinT0: ', minval(tdim) > > > > call DMDAVecRestoreArrayReadF90(daScalars,DimTemperature,tdim, > ierr) > > > > > > > > That array minimum doesn't coincide with the global minimum, it > should be 1.000 but it is just 0.000, the same happens with the Salinity > following an identical approach, > > > > > > > > Any ideas on where to start looking? i have last month's PETSc build, > > > > > > > > I'm running in 1 processor for now, > > > > > > > > Thanks, > > > > > > > > Manuel > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lei.wang at durham.ac.uk Tue Jul 3 06:58:42 2018 From: lei.wang at durham.ac.uk (WANG, LEI) Date: Tue, 3 Jul 2018 11:58:42 +0000 Subject: [petsc-users] degub of computating Jacobian for SNES Message-ID: Dear all I am using SNES for solving a large nonlinear system for Material Point Method. But it always diverged after server steps, I think there are some bug in the computation of Jacobian matrix. Do anyone have practical approach for identified these bugs in a large matrix? Currently, I saved the matrix to a txt file and load it to Matlab for checking. Is there function for checking Petsc Mat in Petsc itself? Cheers Lei -------------- next part -------------- An HTML attachment was scrubbed... URL: From hzhang at mcs.anl.gov Tue Jul 3 09:30:40 2018 From: hzhang at mcs.anl.gov (Hong) Date: Tue, 3 Jul 2018 09:30:40 -0500 Subject: [petsc-users] degub of computating Jacobian for SNES In-Reply-To: References: Message-ID: LEI: Run your code with option '-snes_converged_reason -ksp_converged_reason -ksp_monitor -snes_monitor' to check which solver leads to divergence. Then use option '-snes_view' to check what solver is used. Hong > Dear all > > > > I am using SNES for solving a large nonlinear system for Material Point > Method. But it always diverged after server steps, I think there are some > bug in the computation of Jacobian matrix. Do anyone have practical > approach for identified these bugs in a large matrix? Currently, I saved > the matrix to a txt file and load it to Matlab for checking. Is there > function for checking Petsc Mat in Petsc itself? > > > > Cheers > > Lei > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lei.wang at durham.ac.uk Tue Jul 3 10:20:41 2018 From: lei.wang at durham.ac.uk (WANG, LEI) Date: Tue, 3 Jul 2018 15:20:41 +0000 Subject: [petsc-users] degub of computating Jacobian for SNES In-Reply-To: References: Message-ID: Thank you very much, Hong! With the option, I have got the following output. Any further suggestion on fixing this divergence? One strange thing is that the Jacobian stiffness matrix include ?nan?. I output the element stiffness matrix and the element degree of freedom before assembly. There is nothing abnormal. But after assembly by ierr1 = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr1); ierr1 = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr1); I got some ?nan? in the stiffness matrix A. Any idea on this? Nonlinear solve did not converge due to DIVERGED_FNORM_NAN iterations 0 SNES Object: 1 MPI processes type: newtonls maximum iterations=40, maximum function evaluations=40 tolerances: relative=0.0001, absolute=0.0001, solution=1e-08 total number of linear solver iterations=0 total number of function evaluations=1 norm schedule ALWAYS 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=100, initial guess is zero tolerances: relative=1e-10, absolute=1e-10, divergence=10000. left preconditioning using DEFAULT norm type for convergence test PC Object: 1 MPI processes type: lu PC has not been set up so information may be incomplete LU: out-of-place factorization tolerance for zero pivot 2.22045e-14 matrix ordering: nd linear system matrix = precond matrix: Mat Object: 1 MPI processes type: seqaij rows=78, cols=78 total: nonzeros=3204, allocated nonzeros=46800 total number of mallocs used during MatSetValues calls =0 using I-node routines: found 25 nodes, limit used is 5 No. of Iterations: 0 Convergence reason: -4: SNES_DIVERGED_FNORM_NAN From: Hong [mailto:hzhang at mcs.anl.gov] Sent: 03 July 2018 15:31 To: WANG, LEI Cc: petsc-users at mcs.anl.gov Subject: Re: [petsc-users] degub of computating Jacobian for SNES LEI: Run your code with option '-snes_converged_reason -ksp_converged_reason -ksp_monitor -snes_monitor' to check which solver leads to divergence. Then use option '-snes_view' to check what solver is used. Hong Dear all I am using SNES for solving a large nonlinear system for Material Point Method. But it always diverged after server steps, I think there are some bug in the computation of Jacobian matrix. Do anyone have practical approach for identified these bugs in a large matrix? Currently, I saved the matrix to a txt file and load it to Matlab for checking. Is there function for checking Petsc Mat in Petsc itself? Cheers Lei -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastian.loehrer at tu-dresden.de Tue Jul 3 10:21:11 2018 From: bastian.loehrer at tu-dresden.de (=?UTF-8?Q?Bastian_L=c3=b6hrer?=) Date: Tue, 3 Jul 2018 17:21:11 +0200 Subject: [petsc-users] Fortran: PetscScalar or double precision? Also: switch to F90 functions? Message-ID: Dear PETSc community, I'm working with a code that uses PETSc (version 3.3). We are about to upgrade our code to make it compatible with PETSc 3.9 but that's another story... We have come across an issue which makes us wonder if we are handling the PETSc variables in the right way so it would be great if anyone of you could comment on the following code snippets: We include _petsc_inlcude.h_ > ... > Vec :: glob_p > common /mpivector/ glob_p, loc_p > ... _ _ in our main program file _main.F90_ > ... > > #include "./fluid/petsc_include.h" > > ... > > PetscScalar loc_p_v(1) > PetscOffset loc_p_i > ... > call DMCreateGlobalVector(da1dof, glob_p , ierr) > call DMCreateLocalVector(da1dof, loc_p , ierr) > call VecGetArray(loc_p, loc_p_v, loc_p_i, ierr) > ... > call SomeSubroutine ( loc_p_v (loc_p_i +1) ) > as well as any other files containing subroutines. The issue we have is the observation that it now makes a difference how the argument of the subroutine is declared, i.e. p does not contain the same values in both of the following implementations: > subroutine SomeSubroutine( p ) > double precision, dimension(gis:gie,gjs:gje,gks:gke) :: p > subroutine SomeSubroutine( p ) > PetscScalar p (gis:gie,gjs:gje,gks:gke) This is puzzling to us, because we do have the PetscScalar configured as double precision real numbers. I also noticed that we are using VecGetArray instead of VecGetArrayF90. Should we switch to the F90 version? Kind regards Bastian L?hrer -------------- next part -------------- An HTML attachment was scrubbed... URL: From zakaryah at gmail.com Tue Jul 3 10:28:22 2018 From: zakaryah at gmail.com (zakaryah) Date: Tue, 3 Jul 2018 11:28:22 -0400 Subject: [petsc-users] Implementing a homotopy solver Message-ID: I'm hoping to implement a homotopy solver for sparse systems in PETSc. I have a question about the details of implementing the linear algebra steps so that I can take advantage of all the SNES tools. My question doesn't have much to do with homotopy maps, per se. The idea, which as far as I know comes from Layne Watson's 1986 paper, is to decompose the Jacobian of the homotopy map, A, into a sum of two matrices with special properties: A = M + L where M is sparse, symmetric, and invertible, and L is rank one. Therefore, linear systems with M should be relatively easy to solve, using preconditioning and Krylov subspace methods. The Newton update, which solves Az = b, can be found using the Sherman-Morrison formula. I have two questions. First, is it possible to implement this using tools that already exist in PETSc? If not, is the best approach to write a shell preconditioner? Second, would a homotopy solver like this be useful to the community? Thanks for your help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Tue Jul 3 10:40:13 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Tue, 3 Jul 2018 15:40:13 +0000 Subject: [petsc-users] Fortran: PetscScalar or double precision? Also: switch to F90 functions? In-Reply-To: References: Message-ID: <472512F2-0E20-4F27-AB91-4F275CFAD313@anl.gov> Default ./configure of PETSc has PetscScalar being double precision; configure options can change it to single precision and or complex numbers. If you are using the default configuration it should not matter if you declare your scalar variables as double precision or PetscScalar you should get the same results. Likely something else is wrong. We recommend upgrading to VecGetArrayF90() the resulting code is a little easier to read. But either way is fine for working code. Barry > On Jul 3, 2018, at 10:21 AM, Bastian L?hrer wrote: > > Dear PETSc community, > I'm working with a code that uses PETSc (version 3.3). We are about to upgrade our code to make it compatible with PETSc 3.9 but that's another story... > > We have come across an issue which makes us wonder if we are handling the PETSc variables in the right way so it would be great if anyone of you could comment on the following code snippets: > We include petsc_inlcude.h > > >> ... >> Vec :: glob_p >> common /mpivector/ glob_p, loc_p >> ... >> > > > in our main program file main.F90 >> ... >> >> #include "./fluid/petsc_include.h" >> >> ... >> >> PetscScalar loc_p_v(1) >> PetscOffset loc_p_i >> ... >> call DMCreateGlobalVector(da1dof, glob_p , ierr) >> call DMCreateLocalVector(da1dof, loc_p , ierr) >> call VecGetArray(loc_p, loc_p_v, loc_p_i, ierr) >> ... >> call SomeSubroutine ( loc_p_v (loc_p_i +1) ) >> >> > > as well as any other files containing subroutines. The issue we have is the observation that it now makes a difference how the argument of the subroutine is declared, i.e. p does not contain the same values in both of the following implementations: >> subroutine SomeSubroutine( p ) >> double precision, dimension(gis:gie,gjs:gje,gks:gke) :: p >> > >> subroutine SomeSubroutine( p ) >> PetscScalar p (gis:gie,gjs:gje,gks:gke) >> > > This is puzzling to us, because we do have the PetscScalar configured as double precision real numbers. > > I also noticed that we are using VecGetArray instead of VecGetArrayF90. Should we switch to the F90 version? > > Kind regards > Bastian L?hrer From hzhang at mcs.anl.gov Tue Jul 3 11:30:29 2018 From: hzhang at mcs.anl.gov (Hong) Date: Tue, 3 Jul 2018 11:30:29 -0500 Subject: [petsc-users] degub of computating Jacobian for SNES In-Reply-To: References: Message-ID: LEI : > > One strange thing is that the Jacobian stiffness matrix include ?nan?. I > output the element stiffness matrix and the element degree of freedom > before assembly. There is nothing abnormal. > How do you check the element? Some elements might divide zero. > But after assembly by > > ierr1 = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr1); > > ierr1 = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr1); > > I got some ?nan? in the stiffness matrix A. Any idea on this? > For sequential run, MatAssemly() does do much. Check every element of your matrix. With 1 MPI process and LU precondition, the code should work with correctly assembled matrix. Hong > > > Nonlinear solve did not converge due to DIVERGED_FNORM_NAN iterations 0 > > SNES Object: 1 MPI processes > > type: newtonls > > maximum iterations=40, maximum function evaluations=40 > > tolerances: relative=0.0001, absolute=0.0001, solution=1e-08 > > total number of linear solver iterations=0 > > total number of function evaluations=1 > > norm schedule ALWAYS > > 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=100, initial guess is zero > > tolerances: relative=1e-10, absolute=1e-10, divergence=10000. > > left preconditioning > > using DEFAULT norm type for convergence test > > PC Object: 1 MPI processes > > type: lu > > PC has not been set up so information may be incomplete > > LU: out-of-place factorization > > tolerance for zero pivot 2.22045e-14 > > matrix ordering: nd > > linear system matrix = precond matrix: > > Mat Object: 1 MPI processes > > type: seqaij > > rows=78, cols=78 > > total: nonzeros=3204, allocated nonzeros=46800 > > total number of mallocs used during MatSetValues calls =0 > > using I-node routines: found 25 nodes, limit used is 5 > > No. of Iterations: 0 > > Convergence reason: -4: SNES_DIVERGED_FNORM_NAN > > > > > > > > > > *From:* Hong [mailto:hzhang at mcs.anl.gov] > *Sent:* 03 July 2018 15:31 > *To:* WANG, LEI > *Cc:* petsc-users at mcs.anl.gov > *Subject:* Re: [petsc-users] degub of computating Jacobian for SNES > > > > LEI: > > Run your code with option '-snes_converged_reason -ksp_converged_reason > -ksp_monitor -snes_monitor' to check which solver leads to divergence. Then > use option '-snes_view' to check what solver is used. > > Hong > > Dear all > > > > I am using SNES for solving a large nonlinear system for Material Point > Method. But it always diverged after server steps, I think there are some > bug in the computation of Jacobian matrix. Do anyone have practical > approach for identified these bugs in a large matrix? Currently, I saved > the matrix to a txt file and load it to Matlab for checking. Is there > function for checking Petsc Mat in Petsc itself? > > > > Cheers > > Lei > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lei.wang at durham.ac.uk Tue Jul 3 11:45:29 2018 From: lei.wang at durham.ac.uk (WANG, LEI) Date: Tue, 3 Jul 2018 16:45:29 +0000 Subject: [petsc-users] degub of computating Jacobian for SNES In-Reply-To: References: Message-ID: Thank you very much, Hong. I just output the local matrix which I inserted into the global matrix A just before calling MatSetValues. Every entry of this local matrix is correct, without any ?nan?. There is no other operation on A before MatAssemblyBegin(). But the MatView(A) just after MatAssembly shows some ?nan? included in A. This seems odd. Cheers Lei From: Hong [mailto:hzhang at mcs.anl.gov] Sent: 03 July 2018 17:30 To: WANG, LEI Cc: petsc-users at mcs.anl.gov Subject: Re: [petsc-users] degub of computating Jacobian for SNES LEI : One strange thing is that the Jacobian stiffness matrix include ?nan?. I output the element stiffness matrix and the element degree of freedom before assembly. There is nothing abnormal. How do you check the element? Some elements might divide zero. But after assembly by ierr1 = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr1); ierr1 = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr1); I got some ?nan? in the stiffness matrix A. Any idea on this? For sequential run, MatAssemly() does do much. Check every element of your matrix. With 1 MPI process and LU precondition, the code should work with correctly assembled matrix. Hong Nonlinear solve did not converge due to DIVERGED_FNORM_NAN iterations 0 SNES Object: 1 MPI processes type: newtonls maximum iterations=40, maximum function evaluations=40 tolerances: relative=0.0001, absolute=0.0001, solution=1e-08 total number of linear solver iterations=0 total number of function evaluations=1 norm schedule ALWAYS 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=100, initial guess is zero tolerances: relative=1e-10, absolute=1e-10, divergence=10000. left preconditioning using DEFAULT norm type for convergence test PC Object: 1 MPI processes type: lu PC has not been set up so information may be incomplete LU: out-of-place factorization tolerance for zero pivot 2.22045e-14 matrix ordering: nd linear system matrix = precond matrix: Mat Object: 1 MPI processes type: seqaij rows=78, cols=78 total: nonzeros=3204, allocated nonzeros=46800 total number of mallocs used during MatSetValues calls =0 using I-node routines: found 25 nodes, limit used is 5 No. of Iterations: 0 Convergence reason: -4: SNES_DIVERGED_FNORM_NAN From: Hong [mailto:hzhang at mcs.anl.gov] Sent: 03 July 2018 15:31 To: WANG, LEI Cc: petsc-users at mcs.anl.gov Subject: Re: [petsc-users] degub of computating Jacobian for SNES LEI: Run your code with option '-snes_converged_reason -ksp_converged_reason -ksp_monitor -snes_monitor' to check which solver leads to divergence. Then use option '-snes_view' to check what solver is used. Hong Dear all I am using SNES for solving a large nonlinear system for Material Point Method. But it always diverged after server steps, I think there are some bug in the computation of Jacobian matrix. Do anyone have practical approach for identified these bugs in a large matrix? Currently, I saved the matrix to a txt file and load it to Matlab for checking. Is there function for checking Petsc Mat in Petsc itself? Cheers Lei -------------- next part -------------- An HTML attachment was scrubbed... URL: From hzhang at mcs.anl.gov Tue Jul 3 12:22:44 2018 From: hzhang at mcs.anl.gov (Hong) Date: Tue, 3 Jul 2018 12:22:44 -0500 Subject: [petsc-users] degub of computating Jacobian for SNES In-Reply-To: References: Message-ID: LEI : > Thank you very much, Hong. > > > > I just output the local matrix which I inserted into the global matrix A > just before calling MatSetValues. Every entry of this local matrix is > correct, without any ?nan?. There is no other operation on A before > MatAssemblyBegin(). But the MatView(A) just after MatAssembly shows some > ?nan? included in A. This seems odd. > It can be memory error. Try use 'valgrind'. Hong > > > *From:* Hong [mailto:hzhang at mcs.anl.gov] > *Sent:* 03 July 2018 17:30 > > *To:* WANG, LEI > *Cc:* petsc-users at mcs.anl.gov > *Subject:* Re: [petsc-users] degub of computating Jacobian for SNES > > > > LEI : > > One strange thing is that the Jacobian stiffness matrix include ?nan?. I > output the element stiffness matrix and the element degree of freedom > before assembly. There is nothing abnormal. > > How do you check the element? Some elements might divide zero. > > > > But after assembly by > > ierr1 = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr1); > > ierr1 = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr1); > > I got some ?nan? in the stiffness matrix A. Any idea on this? > > > > For sequential run, MatAssemly() does do much. Check every element of your > matrix. > > With 1 MPI process and LU precondition, the code should work with > correctly assembled matrix. > > Hong > > > > Nonlinear solve did not converge due to DIVERGED_FNORM_NAN iterations 0 > > SNES Object: 1 MPI processes > > type: newtonls > > maximum iterations=40, maximum function evaluations=40 > > tolerances: relative=0.0001, absolute=0.0001, solution=1e-08 > > total number of linear solver iterations=0 > > total number of function evaluations=1 > > norm schedule ALWAYS > > 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=100, initial guess is zero > > tolerances: relative=1e-10, absolute=1e-10, divergence=10000. > > left preconditioning > > using DEFAULT norm type for convergence test > > PC Object: 1 MPI processes > > type: lu > > PC has not been set up so information may be incomplete > > LU: out-of-place factorization > > tolerance for zero pivot 2.22045e-14 > > matrix ordering: nd > > linear system matrix = precond matrix: > > Mat Object: 1 MPI processes > > type: seqaij > > rows=78, cols=78 > > total: nonzeros=3204, allocated nonzeros=46800 > > total number of mallocs used during MatSetValues calls =0 > > using I-node routines: found 25 nodes, limit used is 5 > > No. of Iterations: 0 > > Convergence reason: -4: SNES_DIVERGED_FNORM_NAN > > > > > > > > > > *From:* Hong [mailto:hzhang at mcs.anl.gov] > *Sent:* 03 July 2018 15:31 > *To:* WANG, LEI > *Cc:* petsc-users at mcs.anl.gov > *Subject:* Re: [petsc-users] degub of computating Jacobian for SNES > > > > LEI: > > Run your code with option '-snes_converged_reason -ksp_converged_reason > -ksp_monitor -snes_monitor' to check which solver leads to divergence. Then > use option '-snes_view' to check what solver is used. > > Hong > > Dear all > > > > I am using SNES for solving a large nonlinear system for Material Point > Method. But it always diverged after server steps, I think there are some > bug in the computation of Jacobian matrix. Do anyone have practical > approach for identified these bugs in a large matrix? Currently, I saved > the matrix to a txt file and load it to Matlab for checking. Is there > function for checking Petsc Mat in Petsc itself? > > > > Cheers > > Lei > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhbaghaei at mail.sjtu.edu.cn Wed Jul 4 12:02:25 2018 From: mhbaghaei at mail.sjtu.edu.cn (Amir) Date: Thu, 5 Jul 2018 01:02:25 +0800 Subject: [petsc-users] Refinement on TS Message-ID: <1530723325.local-d484d539-6a1a-v1.2.2-96fb3a99@getmailspring.com> Hello To make a refinement on the solution in TS, what is a good procedure to implement? I firstly, find the refined solution and built the refined DM and trying to reset the TS using new DM and new solution vector. However, I found it is not a correct way and working. Could you please help me on this? Thanks very much for your time answering me. TSReset(ts); VecDestroy(&X); TSSetDM(ts,dm_refine); TSSetSolution(ts,user->X); -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Wed Jul 4 12:11:18 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Wed, 4 Jul 2018 17:11:18 +0000 Subject: [petsc-users] Refinement on TS In-Reply-To: <1530723325.local-d484d539-6a1a-v1.2.2-96fb3a99@getmailspring.com> References: <1530723325.local-d484d539-6a1a-v1.2.2-96fb3a99@getmailspring.com> Message-ID: <7F9E5F11-EB00-4ED8-AA90-747CA68C22C2@anl.gov> Please send your code that does this so we can debug. We have never done this before so there may be issues in TSReset() Barry > On Jul 4, 2018, at 12:02 PM, Amir wrote: > > Hello > To make a refinement on the solution in TS, what is a good procedure to implement? > I firstly, find the refined solution and built the refined DM and trying to reset the TS using new DM and new solution vector. However, I found it is not a correct way and working. Could you please help me on this? Thanks very much for your time answering me. > > ? TSReset(ts); > ? VecDestroy(&X); > ? TSSetDM(ts,dm_refine); > ? TSSetSolution(ts,user->X); > From mbuerkle at web.de Thu Jul 5 02:49:34 2018 From: mbuerkle at web.de (Marius Buerkle) Date: Thu, 5 Jul 2018 09:49:34 +0200 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? Message-ID: An HTML attachment was scrubbed... URL: From mbuerkle at web.de Thu Jul 5 03:05:34 2018 From: mbuerkle at web.de (Marius Buerkle) Date: Thu, 5 Jul 2018 10:05:34 +0200 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From mhbaghaei at mail.sjtu.edu.cn Thu Jul 5 05:38:58 2018 From: mhbaghaei at mail.sjtu.edu.cn (Amir) Date: Thu, 5 Jul 2018 18:38:58 +0800 Subject: [petsc-users] Refinement on TS In-Reply-To: <7F9E5F11-EB00-4ED8-AA90-747CA68C22C2@anl.gov> References: <7F9E5F11-EB00-4ED8-AA90-747CA68C22C2@anl.gov> Message-ID: <1530786762.local-359e0996-0c09-v1.2.2-96fb3a99@getmailspring.com> Hello Trying to loop over the TSolve() to apply the refinement, I used the below procedure. However, this only goes 1 level of refinement and then it exits. Do you think this is a right algorithm? Thanks for your great time. Amir PetscInt GRID=1; for (GRID=1;GRID From lawrence.mitchell at imperial.ac.uk Thu Jul 5 08:00:18 2018 From: lawrence.mitchell at imperial.ac.uk (Lawrence Mitchell) Date: Thu, 5 Jul 2018 14:00:18 +0100 Subject: [petsc-users] Postdoc Position, Firedrake Finite Element System, Imperial College London Message-ID: <08accb9d-9c74-d787-0572-cd5a4ebaa0d1@imperial.ac.uk> Dear colleagues, We are looking for a Research Associate (postdoc) to join the Firedrake core development team at Imperial. The Firedrake project brings a radical new approach to simulation software development. Instead of painstakingly hand-coding highly sophisticated algorithms one PhD at a time, Firedrake models the simulation creation process as a sequence of mathematical abstractions and develops specialised compilers to automatically translate from one to the next, thereby automatically generating high performance parallel code from a high-level specification of the original mathematical problem. This position represents the opportunity for a computational scientist to create new abstractions and implementations resulting in new simulation capability with immediate impact over a diverse user base. The successful candidate will play an important role in the heart of the Firedrake project while enjoying considerable freedom to develop their own programme of computational science research based around the further development of Firedrake. For further details, see http://www.imperial.ac.uk/jobs/description/NAT00209/research-associate-code-generation-finite-element-simulation Closing date is the 29th July 2018. For informal enquiries, please contact David Ham . Cheers, Lawrence Mitchell From knepley at gmail.com Thu Jul 5 11:22:50 2018 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 5 Jul 2018 11:22:50 -0500 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: On Thu, Jul 5, 2018 at 2:49 AM Marius Buerkle wrote: > Hi ! > > Is MatMPIAIJGetSeqAIJ implemented for fortran? > No, since someone has to write a custom binding for the colmap array. The right thing to do is probably change the interface to pass out an IS. Then then binding would be automatic. Thanks, Matt > > best, > Marius > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Thu Jul 5 11:24:26 2018 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 5 Jul 2018 11:24:26 -0500 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: On Thu, Jul 5, 2018 at 3:05 AM Marius Buerkle wrote: > or MatMPIAIJGetLocalMatCondensed for that matter. > This one seems less defensible. It should be that all one has to do is delete the 'C' from the comment and the binding will be generated. This might be a great time to learn to do a Pull Request since it could be just one character long :) Thanks, Matt > > > Hi ! > > Is MatMPIAIJGetSeqAIJ implemented for fortran? > > best, > Marius > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Thu Jul 5 12:20:29 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Thu, 5 Jul 2018 17:20:29 +0000 Subject: [petsc-users] Refinement on TS In-Reply-To: <1530786762.local-359e0996-0c09-v1.2.2-96fb3a99@getmailspring.com> References: <7F9E5F11-EB00-4ED8-AA90-747CA68C22C2@anl.gov> <1530786762.local-359e0996-0c09-v1.2.2-96fb3a99@getmailspring.com> Message-ID: When it exits the loop will depend on your criteria for adapativitiy so I have no way of knowing if it is enough, surely you can tighten your criteria so that it requires several refinements in the loop. Barry > On Jul 5, 2018, at 5:38 AM, Amir wrote: > > Hello > Trying to loop over the TSolve() to apply the refinement, I used the below procedure. However, this only goes 1 level of refinement and then it exits. Do you think this is a right algorithm? > Thanks for your great time. > Amir > > PetscInt GRID=1; > for (GRID=1;GRID // > // FIND THE ADAPTED SOLUTION > // USING PREVIOUS SOLUTION VECTORS > // > // > // BUILDING THE ADAPTED SOLUTION AND DM > // > DMDACreate1d(); > DMSetFromOptions(); > DMSetUp(); > DMCreateGlobalVector(); > // > // INTERPOLATE FROM COARSE TO REFINE > // > // DESTROYING THE FINE TEMPERORAY VECS AND > // RESETTING THE COARSE VECS WITH REFINED NEW VECS > // > // > // BUILDING TS > // > TSCreate(); > TSSetApplicationContext(); > TSSetDM(); > TSSetProblemType(ts,TS_NONLINEAR); > TSSetType(ts,TSPSEUDO); > TSSetIFunction(); > TSSetTimeStep(); > // > TSSolve(); > // > TSDestroy(); > DMDestroy(); > // > GRID=GRID+1; > // > }//end GRID-loop > > From mhbaghaei at mail.sjtu.edu.cn Thu Jul 5 12:26:17 2018 From: mhbaghaei at mail.sjtu.edu.cn (Amir) Date: Fri, 6 Jul 2018 01:26:17 +0800 Subject: [petsc-users] Refinement on TS In-Reply-To: References: Message-ID: <1530811309.local-64bac6e0-c49e-v1.2.2-96fb3a99@getmailspring.com> This is what I get from Valgrind. I think there is a problem in setting TS in the loop. But I am not sure what it really is. Sorry for may be confusing you. Amir Thread 1: status = VgTs_Runnable (lwpid 23154) ==23154== at 0x4C320A6: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==23154== by 0x4FA68E0: PetscMallocAlign (mal.c:42) ==23154== by 0x4FA6EEA: PetscMallocA (mal.c:390) ==23154== by 0x50FFBAF: VecCreate (veccreate.c:35) ==23154== by 0x54E77BB: DMCreateGlobalVector_DA (dadist.c:36) ==23154== by 0x5463DDD: DMCreateGlobalVector (dm.c:928) ==23154== by 0x54E7613: VecDuplicate_MPI_DA (dadist.c:16) ==23154== by 0x50FC014: VecDuplicate (vector.c:375) ==23154== by 0x593ED55: SNESSolve (snes.c:4296) ==23154== by 0x59D9519: TSStep_Pseudo (posindep.c:151) ==23154== by 0x59B8A88: TSStep (ts.c:3548) ==23154== by 0x59C383D: TSSolve (ts.c:3731) ==23154== by 0x115BEC: main (1d.c:1253) On Jul 6 2018, at 1:20 am, Smith, Barry F. wrote: > > > When it exits the loop will depend on your criteria for adapativitiy so I have no way of knowing if it is enough, surely you can tighten your criteria so that it requires several refinements in the loop. > Barry > > > On Jul 5, 2018, at 5:38 AM, Amir wrote: > > Hello > > Trying to loop over the TSolve() to apply the refinement, I used the below procedure. However, this only goes 1 level of refinement and then it exits. Do you think this is a right algorithm? > > Thanks for your great time. > > Amir > > > > PetscInt GRID=1; > > for (GRID=1;GRID > // > > // FIND THE ADAPTED SOLUTION > > // USING PREVIOUS SOLUTION VECTORS > > // > > // > > // BUILDING THE ADAPTED SOLUTION AND DM > > // > > DMDACreate1d(); > > DMSetFromOptions(); > > DMSetUp(); > > DMCreateGlobalVector(); > > // > > // INTERPOLATE FROM COARSE TO REFINE > > // > > // DESTROYING THE FINE TEMPERORAY VECS AND > > // RESETTING THE COARSE VECS WITH REFINED NEW VECS > > // > > // > > // BUILDING TS > > // > > TSCreate(); > > TSSetApplicationContext(); > > TSSetDM(); > > TSSetProblemType(ts,TS_NONLINEAR); > > TSSetType(ts,TSPSEUDO); > > TSSetIFunction(); > > TSSetTimeStep(); > > // > > TSSolve(); > > // > > TSDestroy(); > > DMDestroy(); > > // > > GRID=GRID+1; > > // > > }//end GRID-loop > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Thu Jul 5 12:47:36 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Thu, 5 Jul 2018 17:47:36 +0000 Subject: [petsc-users] Refinement on TS In-Reply-To: <1530811309.local-64bac6e0-c49e-v1.2.2-96fb3a99@getmailspring.com> References: <1530811309.local-64bac6e0-c49e-v1.2.2-96fb3a99@getmailspring.com> Message-ID: <3DFFF6B2-B53D-4993-BF47-9B01A8CA46A9@mcs.anl.gov> Is this a memory leak? Please send the entire valgrind message. If a memory leak it just means you did not destroy all the vectors that you accessed in the code. Barry > On Jul 5, 2018, at 12:26 PM, Amir wrote: > > This is what I get from Valgrind. I think there is a problem in setting TS in the loop. But I am not sure what it really is. Sorry for may be confusing you. > > Amir > > Thread 1: status = VgTs_Runnable (lwpid 23154) > ==23154== at 0x4C320A6: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > ==23154== by 0x4FA68E0: PetscMallocAlign (mal.c:42) > ==23154== by 0x4FA6EEA: PetscMallocA (mal.c:390) > ==23154== by 0x50FFBAF: VecCreate (veccreate.c:35) > ==23154== by 0x54E77BB: DMCreateGlobalVector_DA (dadist.c:36) > ==23154== by 0x5463DDD: DMCreateGlobalVector (dm.c:928) > ==23154== by 0x54E7613: VecDuplicate_MPI_DA (dadist.c:16) > ==23154== by 0x50FC014: VecDuplicate (vector.c:375) > ==23154== by 0x593ED55: SNESSolve (snes.c:4296) > ==23154== by 0x59D9519: TSStep_Pseudo (posindep.c:151) > ==23154== by 0x59B8A88: TSStep (ts.c:3548) > ==23154== by 0x59C383D: TSSolve (ts.c:3731) > ==23154== by 0x115BEC: main (1d.c:1253) > > On Jul 6 2018, at 1:20 am, Smith, Barry F. wrote: > > > When it exits the loop will depend on your criteria for adapativitiy so I have no way of knowing if it is enough, surely you can tighten your criteria so that it requires several refinements in the loop. > > Barry > > > On Jul 5, 2018, at 5:38 AM, Amir wrote: > > Hello > Trying to loop over the TSolve() to apply the refinement, I used the below procedure. However, this only goes 1 level of refinement and then it exits. Do you think this is a right algorithm? > Thanks for your great time. > Amir > > PetscInt GRID=1; > for (GRID=1;GRID // > // FIND THE ADAPTED SOLUTION > // USING PREVIOUS SOLUTION VECTORS > // > // > // BUILDING THE ADAPTED SOLUTION AND DM > // > DMDACreate1d(); > DMSetFromOptions(); > DMSetUp(); > DMCreateGlobalVector(); > // > // INTERPOLATE FROM COARSE TO REFINE > // > // DESTROYING THE FINE TEMPERORAY VECS AND > // RESETTING THE COARSE VECS WITH REFINED NEW VECS > // > // > // BUILDING TS > // > TSCreate(); > TSSetApplicationContext(); > TSSetDM(); > TSSetProblemType(ts,TS_NONLINEAR); > TSSetType(ts,TSPSEUDO); > TSSetIFunction(); > TSSetTimeStep(); > // > TSSolve(); > // > TSDestroy(); > DMDestroy(); > // > GRID=GRID+1; > // > }//end GRID-loop > From mhbaghaei at mail.sjtu.edu.cn Thu Jul 5 12:57:02 2018 From: mhbaghaei at mail.sjtu.edu.cn (Amir) Date: Fri, 6 Jul 2018 01:57:02 +0800 Subject: [petsc-users] Refinement on TS In-Reply-To: <3DFFF6B2-B53D-4993-BF47-9B01A8CA46A9@mcs.anl.gov> References: <3DFFF6B2-B53D-4993-BF47-9B01A8CA46A9@mcs.anl.gov> Message-ID: <1530812945.local-2dcc1bb3-202a-v1.2.2-96fb3a99@getmailspring.com> I check the memory leak with Valgrind. This is where the code stopped. Amir --23154-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting --23154-- si_code=128; Faulting address: 0x0; sp: 0x1002cade00 valgrind: the 'impossible' happened: Killed by fatal signal host stacktrace: ==23154== at 0x58052522: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==23154== by 0x5800B8CC: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==23154== by 0x5800BAD7: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==23154== by 0x5800BDA4: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==23154== by 0x5809F5DC: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) ==23154== by 0x580AED50: ??? (in /usr/lib/valgrind/memcheck-amd64-linux) sched status: running_tid=1 Thread 1: status = VgTs_Runnable (lwpid 23154) ==23154== at 0x4C320A6: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==23154== by 0x4FA68E0: PetscMallocAlign (mal.c:42) ==23154== by 0x4FA6EEA: PetscMallocA (mal.c:390) ==23154== by 0x50FFBAF: VecCreate (veccreate.c:35) ==23154== by 0x54E77BB: DMCreateGlobalVector_DA (dadist.c:36) ==23154== by 0x5463DDD: DMCreateGlobalVector (dm.c:928) ==23154== by 0x54E7613: VecDuplicate_MPI_DA (dadist.c:16) ==23154== by 0x50FC014: VecDuplicate (vector.c:375) ==23154== by 0x593ED55: SNESSolve (snes.c:4296) ==23154== by 0x59D9519: TSStep_Pseudo (posindep.c:151) ==23154== by 0x59B8A88: TSStep (ts.c:3548) ==23154== by 0x59C383D: TSSolve (ts.c:3731) ==23154== by 0x115BEC: main (1d.c:1253) Note: see also the FAQ in the source distribution. It contains workarounds to several common problems. In particular, if Valgrind aborted or crashed after identifying problems in your program, there's a good chance that fixing those problems will prevent Valgrind aborting or crashing, especially if it happened in m_mallocfree.c. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what OS and version you are using. Thanks. On Jul 6 2018, at 1:47 am, Smith, Barry F. wrote: > > > Is this a memory leak? Please send the entire valgrind message. > If a memory leak it just means you did not destroy all the vectors that you accessed in the code. > Barry > > > On Jul 5, 2018, at 12:26 PM, Amir wrote: > > This is what I get from Valgrind. I think there is a problem in setting TS in the loop. But I am not sure what it really is. Sorry for may be confusing you. > > Amir > > Thread 1: status = VgTs_Runnable (lwpid 23154) > > ==23154== at 0x4C320A6: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > > ==23154== by 0x4FA68E0: PetscMallocAlign (mal.c:42) > > ==23154== by 0x4FA6EEA: PetscMallocA (mal.c:390) > > ==23154== by 0x50FFBAF: VecCreate (veccreate.c:35) > > ==23154== by 0x54E77BB: DMCreateGlobalVector_DA (dadist.c:36) > > ==23154== by 0x5463DDD: DMCreateGlobalVector (dm.c:928) > > ==23154== by 0x54E7613: VecDuplicate_MPI_DA (dadist.c:16) > > ==23154== by 0x50FC014: VecDuplicate (vector.c:375) > > ==23154== by 0x593ED55: SNESSolve (snes.c:4296) > > ==23154== by 0x59D9519: TSStep_Pseudo (posindep.c:151) > > ==23154== by 0x59B8A88: TSStep (ts.c:3548) > > ==23154== by 0x59C383D: TSSolve (ts.c:3731) > > ==23154== by 0x115BEC: main (1d.c:1253) > > > > On Jul 6 2018, at 1:20 am, Smith, Barry F. wrote: > > > > When it exits the loop will depend on your criteria for adapativitiy so I have no way of knowing if it is enough, surely you can tighten your criteria so that it requires several refinements in the loop. > > Barry > > > > On Jul 5, 2018, at 5:38 AM, Amir wrote: > > Hello > > Trying to loop over the TSolve() to apply the refinement, I used the below procedure. However, this only goes 1 level of refinement and then it exits. Do you think this is a right algorithm? > > Thanks for your great time. > > Amir > > > > PetscInt GRID=1; > > for (GRID=1;GRID > // > > // FIND THE ADAPTED SOLUTION > > // USING PREVIOUS SOLUTION VECTORS > > // > > // > > // BUILDING THE ADAPTED SOLUTION AND DM > > // > > DMDACreate1d(); > > DMSetFromOptions(); > > DMSetUp(); > > DMCreateGlobalVector(); > > // > > // INTERPOLATE FROM COARSE TO REFINE > > // > > // DESTROYING THE FINE TEMPERORAY VECS AND > > // RESETTING THE COARSE VECS WITH REFINED NEW VECS > > // > > // > > // BUILDING TS > > // > > TSCreate(); > > TSSetApplicationContext(); > > TSSetDM(); > > TSSetProblemType(ts,TS_NONLINEAR); > > TSSetType(ts,TSPSEUDO); > > TSSetIFunction(); > > TSSetTimeStep(); > > // > > TSSolve(); > > // > > TSDestroy(); > > DMDestroy(); > > // > > GRID=GRID+1; > > // > > }//end GRID-loop > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Thu Jul 5 13:00:57 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Thu, 5 Jul 2018 18:00:57 +0000 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: These are "internal" routines that we rarely expect end users to use since they are specific for particular matrix implementations. As such they are also kind of strange to use from Fortran since none of the AIJ data structures can be made visible to Fortran. Could you explain why you want them from Fortran and maybe we'll have alternative suggestions on how you can achieve the same effect. Barry > On Jul 5, 2018, at 3:05 AM, Marius Buerkle wrote: > > or MatMPIAIJGetLocalMatCondensed for that matter. > > > > Hi ! > > Is MatMPIAIJGetSeqAIJ implemented for fortran? > > best, > Marius From gard.spreemann at epfl.ch Fri Jul 6 09:00:05 2018 From: gard.spreemann at epfl.ch (Gard Spreemann) Date: Fri, 06 Jul 2018 16:00:05 +0200 Subject: [petsc-users] Computing Krylov decompositions with PETSc/SLEPc Message-ID: <6054267.UWarc8vVTQ@moose> Hello list, It is my (naive) understanding that a lot of the eigenproblem solvers in SLEPc and linear solvers in PETSc use Krylov subspace methods internally. However, I can't seem to find any functionality in either library that exposes these underlying methods. Specifically, I'm looking for something that takes - a sparse symmetric real NxN matrix A (or a function for computing matrix-vector products with A) - a real vector x of size N - a (typically small) integer M<=N and returns an orthonormal basis v_1,?,v_M for span(x, Ax, A^2x, ?, A^{M-1}x) so that V^T A V is tridiagonal, where V is the matrix with v_1,?,v_M as columns. Am I overlooking something, misunderstanding something, or something else? Any help is greatly appreciated (even if it involves pointing me to a different library). I'm sorry if the question is ill-posed, I am not well-versed in numerical linear algebra. Thanks in advance. Best regards, Gard Spreemann From jroman at dsic.upv.es Fri Jul 6 09:18:27 2018 From: jroman at dsic.upv.es (Jose E. Roman) Date: Fri, 6 Jul 2018 16:18:27 +0200 Subject: [petsc-users] Computing Krylov decompositions with PETSc/SLEPc In-Reply-To: <6054267.UWarc8vVTQ@moose> References: <6054267.UWarc8vVTQ@moose> Message-ID: <131DC901-E690-4AD7-9E9D-5CFAC5EA3682@dsic.upv.es> SLEPc's default eigensolver 'krylovschur' does this kind of computation repeatedly, in an outer loop (the restarts) until eigenvalues are converged. If you call EPSSolve() with -eps_max_it 1 to avoid any restarts then you will get something similar to what you want. The computed basis can be retrieved with EPSGetBV(). However, this is not the intended usage, and hence it is not documented. You will have to look at the source code and see what is being computed. What do you need this for? Jose > El 6 jul 2018, a las 16:00, Gard Spreemann escribi?: > > Hello list, > > It is my (naive) understanding that a lot of the eigenproblem solvers > in SLEPc and linear solvers in PETSc use Krylov subspace methods > internally. However, I can't seem to find any functionality in > either library that exposes these underlying methods. > > Specifically, I'm looking for something that takes > > - a sparse symmetric real NxN matrix A (or a function for computing > matrix-vector products with A) > > - a real vector x of size N > > - a (typically small) integer M<=N > > and returns an orthonormal basis v_1,?,v_M for > > span(x, Ax, A^2x, ?, A^{M-1}x) > > so that V^T A V is tridiagonal, where V is the matrix with v_1,?,v_M > as columns. > > Am I overlooking something, misunderstanding something, or something > else? Any help is greatly appreciated (even if it involves pointing me > to a different library). > > I'm sorry if the question is ill-posed, I am not well-versed in > numerical linear algebra. > > > Thanks in advance. > > Best regards, > Gard Spreemann > > > > From gard.spreemann at epfl.ch Fri Jul 6 09:37:29 2018 From: gard.spreemann at epfl.ch (Gard Spreemann) Date: Fri, 06 Jul 2018 16:37:29 +0200 Subject: [petsc-users] Computing Krylov decompositions with PETSc/SLEPc In-Reply-To: <131DC901-E690-4AD7-9E9D-5CFAC5EA3682@dsic.upv.es> References: <6054267.UWarc8vVTQ@moose> <131DC901-E690-4AD7-9E9D-5CFAC5EA3682@dsic.upv.es> Message-ID: <2717676.p7LyEGruFQ@moose> On Friday 6 July 2018 16:18:27 CEST Jose E. Roman wrote: > SLEPc's default eigensolver 'krylovschur' does this kind of computation repeatedly, in an outer loop (the restarts) until eigenvalues are converged. If you call EPSSolve() with -eps_max_it 1 to avoid any restarts then you will get something similar to what you want. The computed basis can be retrieved with EPSGetBV(). However, this is not the intended usage, and hence it is not documented. You will have to look at the source code and see what is being computed. Thank you. I'll have a look and see if I can make sense of it. I had the impression that it's only possible to set the *maximum* dimension of the Krylov subspaces used though. Is that the case? I'd need to set the dimensionality exactly. > What do you need this for? I need to compute some good approximations of (the action of) certain polynomials of a matrix (on a vector). Looking around, it seems there are some very nice approximations available if one has an orthonormal basis for the Krylov subspaces up to power equal to the degree of the polynomial in question. I was therefore hoping there would be some way to leverage SLEPc's sophisticated Krylov code. Best, Gard From zakaryah at gmail.com Fri Jul 6 10:48:52 2018 From: zakaryah at gmail.com (zakaryah) Date: Fri, 6 Jul 2018 11:48:52 -0400 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: References: Message-ID: I'm still hoping to get some advice on this. I've done some more reading and it seems clear that I'll need to implement a shell matrix for A, so that the user context consists of the sparse matrix M and the rank one matrix L, which can be represented with a vector, u: L = u e^T, where e is the appropriate basis vector. The part I'm most unsure of is how to implement the solver for linear systems involving the matrix A. The solver for Ay=b solves two linear systems with the sparse matrix: Mx_1=u and Mx_2=b, using standard PETSc KSP routines for the sparse matrix M. Then the Sherman-Morrison formula is used to calculate y: y = (I-(x_1 e^T)/(x_1^T e + 1))x_2 My question is how to implement this specialized solver for the shell matrix A. Do I use MATOP_SOLVE? MATOP_MAT_SOLVE? How do I know which MATOPs need to be provided? Is there any documentation or tutorial for this type of problem, or for shell matrices in general? I've only seen examples which provide MATOP_MULT. I suppose I also need a shell preconditioner, which preconditions only M. Thanks in advance for any help you can provide. On Tue, Jul 3, 2018 at 11:28 AM, zakaryah wrote: > I'm hoping to implement a homotopy solver for sparse systems in PETSc. I > have a question about the details of implementing the linear algebra steps > so that I can take advantage of all the SNES tools. > > My question doesn't have much to do with homotopy maps, per se. The idea, > which as far as I know comes from Layne Watson's 1986 paper, is to > decompose the Jacobian of the homotopy map, A, into a sum of two matrices > with special properties: > > A = M + L > > where M is sparse, symmetric, and invertible, and L is rank one. > Therefore, linear systems with M should be relatively easy to solve, using > preconditioning and Krylov subspace methods. The Newton update, which > solves Az = b, can be found using the Sherman-Morrison formula. > > I have two questions. First, is it possible to implement this using tools > that already exist in PETSc? If not, is the best approach to write a shell > preconditioner? Second, would a homotopy solver like this be useful to the > community? > > Thanks for your help! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Fri Jul 6 11:19:46 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Fri, 6 Jul 2018 16:19:46 +0000 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: References: Message-ID: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> I am assuming the matrix M is provided as a regular PETSc AIJ (for example) sparse matrix. I am not sure you need bother with the Sherman-Morrison formula. Just write a shell matrix that performs the MatMult with A = M + L and call KSPSetOperators(ksp,A,M); PETSc will solve the linear system with A and construct the preconditioner using the matrix M; since A is only a rank one perturbation of M; the preconditioner constructed from M will be a good preconditioner for A. Barry > On Jul 6, 2018, at 10:48 AM, zakaryah wrote: > > I'm still hoping to get some advice on this. I've done some more reading and it seems clear that I'll need to implement a shell matrix for A, so that the user context consists of the sparse matrix M and the rank one matrix L, which can be represented with a vector, u: L = u e^T, where e is the appropriate basis vector. The part I'm most unsure of is how to implement the solver for linear systems involving the matrix A. > > The solver for Ay=b solves two linear systems with the sparse matrix: Mx_1=u and Mx_2=b, using standard PETSc KSP routines for the sparse matrix M. Then the Sherman-Morrison formula is used to calculate y: > > y = (I-(x_1 e^T)/(x_1^T e + 1))x_2 > > My question is how to implement this specialized solver for the shell matrix A. Do I use MATOP_SOLVE? MATOP_MAT_SOLVE? How do I know which MATOPs need to be provided? Is there any documentation or tutorial for this type of problem, or for shell matrices in general? I've only seen examples which provide MATOP_MULT. > > I suppose I also need a shell preconditioner, which preconditions only M. > > Thanks in advance for any help you can provide. > > On Tue, Jul 3, 2018 at 11:28 AM, zakaryah wrote: > I'm hoping to implement a homotopy solver for sparse systems in PETSc. I have a question about the details of implementing the linear algebra steps so that I can take advantage of all the SNES tools. > > My question doesn't have much to do with homotopy maps, per se. The idea, which as far as I know comes from Layne Watson's 1986 paper, is to decompose the Jacobian of the homotopy map, A, into a sum of two matrices with special properties: > > A = M + L > > where M is sparse, symmetric, and invertible, and L is rank one. Therefore, linear systems with M should be relatively easy to solve, using preconditioning and Krylov subspace methods. The Newton update, which solves Az = b, can be found using the Sherman-Morrison formula. > > I have two questions. First, is it possible to implement this using tools that already exist in PETSc? If not, is the best approach to write a shell preconditioner? Second, would a homotopy solver like this be useful to the community? > > Thanks for your help! > From zakaryah at gmail.com Fri Jul 6 11:30:36 2018 From: zakaryah at gmail.com (zakaryah) Date: Fri, 6 Jul 2018 12:30:36 -0400 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> Message-ID: ?Thanks for your help, Barry. I agree about the preconditioning. I still don't understand why I don't need a particular solver for my shell matrix. My reasoning is that KSP is easy with M but difficult with A, since A has a dense row and column, whereas M is entirely sparse. Sherman-Morrison seems to be an efficient way of dealing with this but I could be wrong.? On Fri, Jul 6, 2018 at 12:19 PM, Smith, Barry F. wrote: > > I am assuming the matrix M is provided as a regular PETSc AIJ (for > example) sparse matrix. > > I am not sure you need bother with the Sherman-Morrison formula. Just > write a shell matrix that performs the MatMult with A = M + L and call > KSPSetOperators(ksp,A,M); PETSc will solve the linear system with A and > construct the preconditioner using the matrix M; since A is only a rank one > perturbation of M; the preconditioner constructed from M will be a good > preconditioner for A. > > Barry > > > > On Jul 6, 2018, at 10:48 AM, zakaryah wrote: > > > > I'm still hoping to get some advice on this. I've done some more > reading and it seems clear that I'll need to implement a shell matrix for > A, so that the user context consists of the sparse matrix M and the rank > one matrix L, which can be represented with a vector, u: L = u e^T, where e > is the appropriate basis vector. The part I'm most unsure of is how to > implement the solver for linear systems involving the matrix A. > > > > The solver for Ay=b solves two linear systems with the sparse matrix: > Mx_1=u and Mx_2=b, using standard PETSc KSP routines for the sparse matrix > M. Then the Sherman-Morrison formula is used to calculate y: > > > > y = (I-(x_1 e^T)/(x_1^T e + 1))x_2 > > > > My question is how to implement this specialized solver for the shell > matrix A. Do I use MATOP_SOLVE? MATOP_MAT_SOLVE? How do I know which > MATOPs need to be provided? Is there any documentation or tutorial for > this type of problem, or for shell matrices in general? I've only seen > examples which provide MATOP_MULT. > > > > I suppose I also need a shell preconditioner, which preconditions only M. > > > > Thanks in advance for any help you can provide. > > > > On Tue, Jul 3, 2018 at 11:28 AM, zakaryah wrote: > > I'm hoping to implement a homotopy solver for sparse systems in PETSc. > I have a question about the details of implementing the linear algebra > steps so that I can take advantage of all the SNES tools. > > > > My question doesn't have much to do with homotopy maps, per se. The > idea, which as far as I know comes from Layne Watson's 1986 paper, is to > decompose the Jacobian of the homotopy map, A, into a sum of two matrices > with special properties: > > > > A = M + L > > > > where M is sparse, symmetric, and invertible, and L is rank one. > Therefore, linear systems with M should be relatively easy to solve, using > preconditioning and Krylov subspace methods. The Newton update, which > solves Az = b, can be found using the Sherman-Morrison formula. > > > > I have two questions. First, is it possible to implement this using > tools that already exist in PETSc? If not, is the best approach to write a > shell preconditioner? Second, would a homotopy solver like this be useful > to the community? > > > > Thanks for your help! > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Fri Jul 6 11:33:31 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Fri, 6 Jul 2018 16:33:31 +0000 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> Message-ID: <3FC82205-6211-43A3-80FE-2980D1FD8BFB@anl.gov> Since it is simpler to try first without the Sherman-Morrison formula, just try it. If the convergence is slow with A then you can consider adding it. Barry > On Jul 6, 2018, at 11:30 AM, zakaryah wrote: > > ?Thanks for your help, Barry. > > I agree about the preconditioning. I still don't understand why I don't need a particular solver for my shell matrix. My reasoning is that KSP is easy with M but difficult with A, since A has a dense row and column, whereas M is entirely sparse. Sherman-Morrison seems to be an efficient way of dealing with this but I could be wrong.? > > On Fri, Jul 6, 2018 at 12:19 PM, Smith, Barry F. wrote: > > I am assuming the matrix M is provided as a regular PETSc AIJ (for example) sparse matrix. > > I am not sure you need bother with the Sherman-Morrison formula. Just write a shell matrix that performs the MatMult with A = M + L and call KSPSetOperators(ksp,A,M); PETSc will solve the linear system with A and construct the preconditioner using the matrix M; since A is only a rank one perturbation of M; the preconditioner constructed from M will be a good preconditioner for A. > > Barry > > > > On Jul 6, 2018, at 10:48 AM, zakaryah wrote: > > > > I'm still hoping to get some advice on this. I've done some more reading and it seems clear that I'll need to implement a shell matrix for A, so that the user context consists of the sparse matrix M and the rank one matrix L, which can be represented with a vector, u: L = u e^T, where e is the appropriate basis vector. The part I'm most unsure of is how to implement the solver for linear systems involving the matrix A. > > > > The solver for Ay=b solves two linear systems with the sparse matrix: Mx_1=u and Mx_2=b, using standard PETSc KSP routines for the sparse matrix M. Then the Sherman-Morrison formula is used to calculate y: > > > > y = (I-(x_1 e^T)/(x_1^T e + 1))x_2 > > > > My question is how to implement this specialized solver for the shell matrix A. Do I use MATOP_SOLVE? MATOP_MAT_SOLVE? How do I know which MATOPs need to be provided? Is there any documentation or tutorial for this type of problem, or for shell matrices in general? I've only seen examples which provide MATOP_MULT. > > > > I suppose I also need a shell preconditioner, which preconditions only M. > > > > Thanks in advance for any help you can provide. > > > > On Tue, Jul 3, 2018 at 11:28 AM, zakaryah wrote: > > I'm hoping to implement a homotopy solver for sparse systems in PETSc. I have a question about the details of implementing the linear algebra steps so that I can take advantage of all the SNES tools. > > > > My question doesn't have much to do with homotopy maps, per se. The idea, which as far as I know comes from Layne Watson's 1986 paper, is to decompose the Jacobian of the homotopy map, A, into a sum of two matrices with special properties: > > > > A = M + L > > > > where M is sparse, symmetric, and invertible, and L is rank one. Therefore, linear systems with M should be relatively easy to solve, using preconditioning and Krylov subspace methods. The Newton update, which solves Az = b, can be found using the Sherman-Morrison formula. > > > > I have two questions. First, is it possible to implement this using tools that already exist in PETSc? If not, is the best approach to write a shell preconditioner? Second, would a homotopy solver like this be useful to the community? > > > > Thanks for your help! > > > > From lawrence.mitchell at imperial.ac.uk Fri Jul 6 11:44:41 2018 From: lawrence.mitchell at imperial.ac.uk (Lawrence Mitchell) Date: Fri, 6 Jul 2018 17:44:41 +0100 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> Message-ID: <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> > On 6 Jul 2018, at 17:30, zakaryah wrote: > > ?Thanks for your help, Barry. > > I agree about the preconditioning. I still don't understand why I don't need a particular solver for my shell matrix. My reasoning is that KSP is easy with M but difficult with A, since A has a dense row and column, whereas M is entirely sparse. Sherman-Morrison seems to be an efficient way of dealing with this but I could be wrong.? As Barry says, low-rank perturbations are not terrible for the convergence of Krylov methods. E.g. Theorem 2.1 of https://arxiv.org/pdf/1508.07633.pdf and a refinement in https://arxiv.org/pdf/1612.08369.pdf with improved bounds. Cheers, Lawrence From jroman at dsic.upv.es Fri Jul 6 11:46:56 2018 From: jroman at dsic.upv.es (Jose E. Roman) Date: Fri, 6 Jul 2018 18:46:56 +0200 Subject: [petsc-users] Computing Krylov decompositions with PETSc/SLEPc In-Reply-To: <2717676.p7LyEGruFQ@moose> References: <6054267.UWarc8vVTQ@moose> <131DC901-E690-4AD7-9E9D-5CFAC5EA3682@dsic.upv.es> <2717676.p7LyEGruFQ@moose> Message-ID: <4527190C-B1DD-4D7B-8822-0994D3989062@dsic.upv.es> > El 6 jul 2018, a las 16:37, Gard Spreemann escribi?: > > On Friday 6 July 2018 16:18:27 CEST Jose E. Roman wrote: >> SLEPc's default eigensolver 'krylovschur' does this kind of computation repeatedly, in an outer loop (the restarts) until eigenvalues are converged. If you call EPSSolve() with -eps_max_it 1 to avoid any restarts then you will get something similar to what you want. The computed basis can be retrieved with EPSGetBV(). However, this is not the intended usage, and hence it is not documented. You will have to look at the source code and see what is being computed. > > Thank you. I'll have a look and see if I can make sense of it. > > I had the impression that it's only possible to set the *maximum* > dimension of the Krylov subspaces used though. Is that the case? I'd > need to set the dimensionality exactly. The dimension of the Krylov subspace is controlled by means of the ncv parameter http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSSetDimensions.html > >> What do you need this for? > > I need to compute some good approximations of (the action of) certain > polynomials of a matrix (on a vector). Looking around, it seems there > are some very nice approximations available if one has an orthonormal > basis for the Krylov subspaces up to power equal to the degree of the > polynomial in question. If you can explicitly compute the coefficients of the polynomial (in the monomial basis) you could also consider using SLEPc's MFN module, that computes f(A)*v where f can be a polynomial. Jose > > I was therefore hoping there would be some way to leverage SLEPc's > sophisticated Krylov code. > > > Best, > Gard > > > > From zakaryah at gmail.com Fri Jul 6 12:23:37 2018 From: zakaryah at gmail.com (zakaryah) Date: Fri, 6 Jul 2018 13:23:37 -0400 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> Message-ID: Thanks Barry and Lawrence - this makes sense now. MatMult for the shell matrix should take care of everything - I'll do some tests on convergence/performance. Thanks! On Fri, Jul 6, 2018 at 12:44 PM, Lawrence Mitchell < lawrence.mitchell at imperial.ac.uk> wrote: > > > On 6 Jul 2018, at 17:30, zakaryah wrote: > > > > ?Thanks for your help, Barry. > > > > I agree about the preconditioning. I still don't understand why I don't > need a particular solver for my shell matrix. My reasoning is that KSP is > easy with M but difficult with A, since A has a dense row and column, > whereas M is entirely sparse. Sherman-Morrison seems to be an efficient > way of dealing with this but I could be wrong.? > > As Barry says, low-rank perturbations are not terrible for the convergence > of Krylov methods. E.g. > > Theorem 2.1 of https://arxiv.org/pdf/1508.07633.pdf > > and a refinement in https://arxiv.org/pdf/1612.08369.pdf with improved > bounds. > > Cheers, > > Lawrence -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Fri Jul 6 13:28:32 2018 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 6 Jul 2018 13:28:32 -0500 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> Message-ID: On Fri, Jul 6, 2018 at 11:44 AM Lawrence Mitchell < lawrence.mitchell at imperial.ac.uk> wrote: > > > On 6 Jul 2018, at 17:30, zakaryah wrote: > > > > ?Thanks for your help, Barry. > > > > I agree about the preconditioning. I still don't understand why I don't > need a particular solver for my shell matrix. My reasoning is that KSP is > easy with M but difficult with A, since A has a dense row and column, > whereas M is entirely sparse. Sherman-Morrison seems to be an efficient > way of dealing with this but I could be wrong.? > > As Barry says, low-rank perturbations are not terrible for the convergence > of Krylov methods. E.g. > > Theorem 2.1 of https://arxiv.org/pdf/1508.07633.pdf While I agree with you guys that Krylov methods will probably work fine, my understanding of Strakos' results are that theorems of this kind crumble under rounding error perturbations. Maybe Patrick has a rejoinder for this. Thanks, Matt > > and a refinement in https://arxiv.org/pdf/1612.08369.pdf with improved > bounds. > > Cheers, > > Lawrence -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From overholt at capesim.com Fri Jul 6 15:15:19 2018 From: overholt at capesim.com (Matthew Overholt) Date: Fri, 6 Jul 2018 16:15:19 -0400 Subject: [petsc-users] PC_SUBPC_ERROR with -pc_factor_zeropivot Message-ID: I am working on handling very small pivot values for a very small percentage of my matrix (linear Ax = b solution), and I am getting an error that I don't understand when I run the KSPCG solver in parallel. KSPCreate(comm, &ksp) KSPSetTolerances(ksp, rtol, ...) KSPSetType(ksp, KSPCG) KSPSetInitialGuessNonzero(ksp, PETSC_TRUE) KSPSetFromOptions(ksp) ... KSPSetOperators(ksp, V, V) ... KSPSolve(ksp,...) KSPGetConvergedReason(ksp, &kspReason) if ( kspReason == KSP_DIVERGED_PCSETUP_FAILED ) PCGetSetUpFailedReason(pc, &pcReason) ... Default Case (zeropivot is 2.22045E-14): mpiexec -n 1 ... ==> ksp fails due to pcReason = PC_FACTOR_NUMERIC_ZEROPIVOT Reduced pivot case, n = 1: mpiexec -n 1 ... -pc_factor_zeropivot 1E-15 ==> runs successfully Reduced pivot case, n > 1: mpiexec -n 2 ... -pc_factor_zeropivot 1E-15 ==> ksp fails due to pcReason = PC_SUBPC_ERROR What does this mean? If I use the MUMPS solver and either Cholesky or LU preconditioning instead, it runs fine with any number of MPI ranks, but I'd like to be able to run the CG solver in parallel too. Thanks in advance, Matt Overholt CapeSym, Inc. (508) 653-7100 x204 overholt at capesim.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Fri Jul 6 17:25:03 2018 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 6 Jul 2018 17:25:03 -0500 Subject: [petsc-users] PC_SUBPC_ERROR with -pc_factor_zeropivot In-Reply-To: References: Message-ID: On Fri, Jul 6, 2018 at 3:16 PM Matthew Overholt wrote: > I am working on handling very small pivot values for a very small > percentage of my matrix (linear Ax = b solution), and I am getting an error > that I don't understand when I run the KSPCG solver in parallel. > > KSPCreate(comm, &ksp) > KSPSetTolerances(ksp, rtol, ...) > KSPSetType(ksp, KSPCG) > KSPSetInitialGuessNonzero(ksp, PETSC_TRUE) > KSPSetFromOptions(ksp) > ... > KSPSetOperators(ksp, V, V) > ... > KSPSolve(ksp,...) > KSPGetConvergedReason(ksp, &kspReason) > if ( kspReason == KSP_DIVERGED_PCSETUP_FAILED ) > PCGetSetUpFailedReason(pc, &pcReason) > ... > > Default Case (zeropivot is 2.22045E-14): > mpiexec -n 1 ... > ==> ksp fails due to pcReason = PC_FACTOR_NUMERIC_ZEROPIVOT > > Reduced pivot case, n = 1: > mpiexec -n 1 ... -pc_factor_zeropivot 1E-15 > ==> runs successfully > > Reduced pivot case, n > 1: > mpiexec -n 2 ... -pc_factor_zeropivot 1E-15 > ==> ksp fails due to pcReason = PC_SUBPC_ERROR > Okay, what is likely happening is that your preconditioner is actually Block-Jacobi/LU instead of parallel LU. Thus you would need -sub_pc_factor_zeropivot 1e-15 if this is indeed the PC that you want. > What does this mean? > > If I use the MUMPS solver and either Cholesky or LU preconditioning > instead, it runs fine with any number of MPI ranks, > Yes, since MUMPS (or SuperLU_dist) is parallel LU. > but I'd like to be able to run the CG solver in parallel too. > You can use MUMPS as the preconditioner for CG, but that would not make much sense. Thanks, Matt > Thanks in advance, > > Matt Overholt > CapeSym, Inc. > (508) 653-7100 x204 > overholt at capesim.com > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhatiamanav at gmail.com Sat Jul 7 12:36:30 2018 From: bhatiamanav at gmail.com (Manav Bhatia) Date: Sat, 7 Jul 2018 12:36:30 -0500 Subject: [petsc-users] PostDoc positions Message-ID: <7E092E21-1D5B-4C5F-A0AA-2CC88F5CC84C@gmail.com> Dear colleagues, I would greatly appreciate if you could forward this message to any interested audience. My research group currently has multiple openings for Post-Doc positions with immediate availability. The broad scope of work includes: ? topology optimization of geometrically nonlinear thermoelastic structures with conjugate heat transfer including flow modeling and internal radiation. ? large-scale fluid-structure interaction with focus on high-frequency acoustic response. The nature of work will involve mathematical modeling, development of solvers for large-scale systems and demonstration of solver on various applications of interest. A successful candidate would have a strong foundation in finite element analysis along with experience in programming of solvers in C/C++. Experience with open-source tools such as PETSc, deal.II, libMesh, or similar libraries will be viewed favorably. Interested people are encouraged to respond to mb2908 at msstate.edu with a CV. Regards, Manav Manav Bhatia, PhD Assistant Professor Department of Aerospace Engineering Center for Advanced Vehicular Systems Graduate Coordinator, Computational Engineering Mississippi State University voice: 662-325-7202 fax: 662-325-7730 email: bhatia at ae.msstate.edu http://bhatia.ae.msstate.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From gard.spreemann at epfl.ch Mon Jul 9 05:23:26 2018 From: gard.spreemann at epfl.ch (Gard Spreemann) Date: Mon, 09 Jul 2018 12:23:26 +0200 Subject: [petsc-users] Computing Krylov decompositions with PETSc/SLEPc In-Reply-To: <4527190C-B1DD-4D7B-8822-0994D3989062@dsic.upv.es> References: <6054267.UWarc8vVTQ@moose> <2717676.p7LyEGruFQ@moose> <4527190C-B1DD-4D7B-8822-0994D3989062@dsic.upv.es> Message-ID: <10015503.PRnoFvggHu@moose> On Friday 6 July 2018 18:46:56 CEST Jose E. Roman wrote: > > > El 6 jul 2018, a las 16:37, Gard Spreemann escribi?: > > > > On Friday 6 July 2018 16:18:27 CEST Jose E. Roman wrote: > >> SLEPc's default eigensolver 'krylovschur' does this kind of computation repeatedly, in an outer loop (the restarts) until eigenvalues are converged. If you call EPSSolve() with -eps_max_it 1 to avoid any restarts then you will get something similar to what you want. The computed basis can be retrieved with EPSGetBV(). However, this is not the intended usage, and hence it is not documented. You will have to look at the source code and see what is being computed. > > > > Thank you. I'll have a look and see if I can make sense of it. > > > > I had the impression that it's only possible to set the *maximum* > > dimension of the Krylov subspaces used though. Is that the case? I'd > > need to set the dimensionality exactly. > > The dimension of the Krylov subspace is controlled by means of the ncv parameter http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSSetDimensions.html Thanks. That could be a way out then. > >> What do you need this for? > > > > I need to compute some good approximations of (the action of) certain > > polynomials of a matrix (on a vector). Looking around, it seems there > > are some very nice approximations available if one has an orthonormal > > basis for the Krylov subspaces up to power equal to the degree of the > > polynomial in question. > > If you can explicitly compute the coefficients of the polynomial (in the monomial basis) you could also consider using SLEPc's MFN module, that computes f(A)*v where f can be a polynomial. Hmm, do these functions actually compute (the matrices involved in) the full polynomial, or do they do some clever approximation? I believe my matrices will often see a lot of sparsity reduction when one takes a large power of them. Best, Gard -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part. URL: From jroman at dsic.upv.es Mon Jul 9 05:41:05 2018 From: jroman at dsic.upv.es (Jose E. Roman) Date: Mon, 9 Jul 2018 12:41:05 +0200 Subject: [petsc-users] Computing Krylov decompositions with PETSc/SLEPc In-Reply-To: <10015503.PRnoFvggHu@moose> References: <6054267.UWarc8vVTQ@moose> <2717676.p7LyEGruFQ@moose> <4527190C-B1DD-4D7B-8822-0994D3989062@dsic.upv.es> <10015503.PRnoFvggHu@moose> Message-ID: <2DA867E3-B510-4CDF-8761-B985E441A6E5@dsic.upv.es> > El 9 jul 2018, a las 12:23, Gard Spreemann escribi?: > > On Friday 6 July 2018 18:46:56 CEST Jose E. Roman wrote: >> >>> El 6 jul 2018, a las 16:37, Gard Spreemann escribi?: >>> >>> On Friday 6 July 2018 16:18:27 CEST Jose E. Roman wrote: >>>> SLEPc's default eigensolver 'krylovschur' does this kind of computation repeatedly, in an outer loop (the restarts) until eigenvalues are converged. If you call EPSSolve() with -eps_max_it 1 to avoid any restarts then you will get something similar to what you want. The computed basis can be retrieved with EPSGetBV(). However, this is not the intended usage, and hence it is not documented. You will have to look at the source code and see what is being computed. >>> >>> Thank you. I'll have a look and see if I can make sense of it. >>> >>> I had the impression that it's only possible to set the *maximum* >>> dimension of the Krylov subspaces used though. Is that the case? I'd >>> need to set the dimensionality exactly. >> >> The dimension of the Krylov subspace is controlled by means of the ncv parameter http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSSetDimensions.html > > Thanks. That could be a way out then. > >>>> What do you need this for? >>> >>> I need to compute some good approximations of (the action of) certain >>> polynomials of a matrix (on a vector). Looking around, it seems there >>> are some very nice approximations available if one has an orthonormal >>> basis for the Krylov subspaces up to power equal to the degree of the >>> polynomial in question. >> >> If you can explicitly compute the coefficients of the polynomial (in the monomial basis) you could also consider using SLEPc's MFN module, that computes f(A)*v where f can be a polynomial. > > Hmm, do these functions actually compute (the matrices involved in) > the full polynomial, or do they do some clever approximation? I > believe my matrices will often see a lot of sparsity reduction when > one takes a large power of them. It is a Krylov solver based on the Krylov subspace generated by A and vector v, so only matrix-vector products with A are computed. The polynomial is explicitly built only on the reduced matrix T, not A. Jose > > Best, > Gard From overholt at capesim.com Mon Jul 9 09:17:10 2018 From: overholt at capesim.com (Matthew Overholt) Date: Mon, 9 Jul 2018 10:17:10 -0400 Subject: [petsc-users] PC_SUBPC_ERROR with -pc_factor_zeropivot In-Reply-To: References: Message-ID: Thanks, Matt, that option works perfectly, and explains the -ksp_view output. Much appreciated! Matt... On Fri, Jul 6, 2018 at 6:25 PM, Matthew Knepley wrote: > Default Case (zeropivot is 2.22045E-14): >> mpiexec -n 1 ... >> ==> ksp fails due to pcReason = PC_FACTOR_NUMERIC_ZEROPIVOT >> >> Reduced pivot case, n = 1: >> mpiexec -n 1 ... -pc_factor_zeropivot 1E-15 >> ==> runs successfully >> >> Reduced pivot case, n > 1: >> mpiexec -n 2 .. -pc_factor_zeropivot 1E-15 >> ==> ksp fails due to pcReason = PC_SUBPC_ERROR >> > > Okay, what is likely happening is that your preconditioner is actually > Block-Jacobi/LU > instead of parallel LU. Thus you would need > > -sub_pc_factor_zeropivot 1e-15 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dingwen.tao at ieee.org Mon Jul 9 09:36:38 2018 From: dingwen.tao at ieee.org (Dingwen Tao) Date: Mon, 9 Jul 2018 10:36:38 -0400 Subject: [petsc-users] AMG linear solver with PETSc Message-ID: All, We have some questions related to Algebraic Multigrid (AMG) method with PETSc for solving large-scale systems of linear equations. Anyone with experience can help? Questions: (1) We know that PETSc can be used with HYPRE AMG preconditioner for solving large-scale linear systems, while HYPRE also has an independent multigrid linear solver as well. Anyone knows which one is more frequently used in today's HPC applications? Or both of them are very commonly used? (2) Anyone can give us a real HPC application example that uses PETSc with HYPRE AMG preconditioner or HYPRE multigrid linear solver? We are looking for a real HPC application as our research's motivation. Many thanks in advance! Best regards, Dingwen -- Dingwen Tao Assistant Professor The University of Alabama -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Jul 9 10:01:48 2018 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 9 Jul 2018 11:01:48 -0400 Subject: [petsc-users] AMG linear solver with PETSc In-Reply-To: References: Message-ID: On Mon, Jul 9, 2018 at 10:37 AM Dingwen Tao wrote: > All, > > We have some questions related to Algebraic Multigrid (AMG) method with > PETSc for solving large-scale systems of linear equations. Anyone with > experience can help? > > Questions: > (1) We know that PETSc can be used with HYPRE AMG preconditioner for > solving large-scale linear systems, while HYPRE also has an independent > multigrid linear solver as well. Anyone knows which one is more > frequently used in today's HPC applications? Or both of them are very > commonly used? > I am not sure which Hypre thing you are talking about. Is it the SStruct stuff? > (2) Anyone can give us a real HPC application example that uses PETSc with > HYPRE AMG preconditioner or HYPRE multigrid linear solver? We are looking > for a real HPC application as our research's motivation. > Yes, the excellent EXASTEEL project ( http://www.numerik.uni-koeln.de/14079.html) uses Hypre as the coarse grid solver for a large scale multiscale, multigrid iteration. Its very impressive and runs some of the largest problems I have seen for very complex materials. Thanks, Matt > Many thanks in advance! > > Best regards, > > Dingwen > > > -- > Dingwen Tao > Assistant Professor > The University of Alabama > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From overholt at capesim.com Mon Jul 9 10:04:55 2018 From: overholt at capesim.com (Matthew Overholt) Date: Mon, 9 Jul 2018 11:04:55 -0400 Subject: [petsc-users] PC_SUBPC_ERROR with -pc_factor_zeropivot In-Reply-To: References: Message-ID: The -sub_pc_factor_zeropivot option works, but since this is for a commercial code I don't want users to have to type that every time. Is there an equivalent call to PCFactorSetZeroPivot() for the block Jacobi method (like PCSubFactorSetZeroPivot())? I can't find it. Instead, does one need to call PCBjacobiGetSubKSP() and then loop over every block, calling KSPGetPC() PCFactorSetZeroPivot() on each block? That seems a little tedious, but if that is the correct approach I'll do it. Thanks, Matt Overholt On Mon, Jul 9, 2018 at 10:17 AM, Matthew Overholt wrote: > Thanks, Matt, that option works perfectly, and explains the -ksp_view > output. > > Much appreciated! > Matt... > > On Fri, Jul 6, 2018 at 6:25 PM, Matthew Knepley wrote: > >> Default Case (zeropivot is 2.22045E-14): >>> mpiexec -n 1 ... >>> ==> ksp fails due to pcReason = PC_FACTOR_NUMERIC_ZEROPIVOT >>> >>> Reduced pivot case, n = 1: >>> mpiexec -n 1 ... -pc_factor_zeropivot 1E-15 >>> ==> runs successfully >>> >>> Reduced pivot case, n > 1: >>> mpiexec -n 2 .. -pc_factor_zeropivot 1E-15 >>> ==> ksp fails due to pcReason = PC_SUBPC_ERROR >>> >> >> Okay, what is likely happening is that your preconditioner is actually >> Block-Jacobi/LU >> instead of parallel LU. Thus you would need >> >> -sub_pc_factor_zeropivot 1e-15 >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Jul 9 10:08:29 2018 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 9 Jul 2018 11:08:29 -0400 Subject: [petsc-users] PC_SUBPC_ERROR with -pc_factor_zeropivot In-Reply-To: References: Message-ID: On Mon, Jul 9, 2018 at 11:05 AM Matthew Overholt wrote: > The -sub_pc_factor_zeropivot option works, but since this is for a > commercial code I don't want users to have to type that every time. > > Is there an equivalent call to > PCFactorSetZeroPivot() > for the block Jacobi method (like PCSubFactorSetZeroPivot())? I can't > find it. > > Instead, does one need to call > PCBjacobiGetSubKSP() > and then loop over every block, calling > KSPGetPC() > PCFactorSetZeroPivot() > on each block? That seems a little tedious, but if that is the correct > approach I'll do it. > Yes, that is the API approach. As you can see, for composed solvers its not a great option. How about putting http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsSetValue.html in the code? Thanks, Matt > Thanks, > Matt Overholt > > On Mon, Jul 9, 2018 at 10:17 AM, Matthew Overholt > wrote: > >> Thanks, Matt, that option works perfectly, and explains the -ksp_view >> output. >> >> Much appreciated! >> Matt... >> >> On Fri, Jul 6, 2018 at 6:25 PM, Matthew Knepley >> wrote: >> >>> Default Case (zeropivot is 2.22045E-14): >>>> mpiexec -n 1 ... >>>> ==> ksp fails due to pcReason = PC_FACTOR_NUMERIC_ZEROPIVOT >>>> >>>> Reduced pivot case, n = 1: >>>> mpiexec -n 1 ... -pc_factor_zeropivot 1E-15 >>>> ==> runs successfully >>>> >>>> Reduced pivot case, n > 1: >>>> mpiexec -n 2 .. -pc_factor_zeropivot 1E-15 >>>> ==> ksp fails due to pcReason = PC_SUBPC_ERROR >>>> >>> >>> Okay, what is likely happening is that your preconditioner is actually >>> Block-Jacobi/LU >>> instead of parallel LU. Thus you would need >>> >>> -sub_pc_factor_zeropivot 1e-15 >>> >>> > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfadams at lbl.gov Mon Jul 9 10:27:24 2018 From: mfadams at lbl.gov (Mark Adams) Date: Mon, 9 Jul 2018 11:27:24 -0400 Subject: [petsc-users] AMG linear solver with PETSc In-Reply-To: References: Message-ID: On Mon, Jul 9, 2018 at 10:37 AM Dingwen Tao wrote: > All, > > We have some questions related to Algebraic Multigrid (AMG) method with > PETSc for solving large-scale systems of linear equations. Anyone with > experience can help? > > Questions: > (1) We know that PETSc can be used with HYPRE AMG preconditioner for > solving large-scale linear systems, while HYPRE also has an independent > multigrid linear solver as well. Anyone knows which one is more > frequently used in today's HPC applications? Or both of them are very > commonly used? > I'm not sure what you mean either but PETSc has an interface to Hypre/BoomerAMG which is an AMG solver that is used by a lot of applications. PETSc has a native AMG solver GAMG. You should start with either one and try both. > (2) Anyone can give us a real HPC application example that uses PETSc with > HYPRE AMG preconditioner or HYPRE multigrid linear solver? We are looking > for a real HPC application as our research's motivation. > As I said there are lots. Here are two that use PETSc AMG, including hypre and gamg: https://hbps.pppl.gov/computing/xgc-1 and https://www.alcf.anl.gov/projects/chombo-crunch-advanced-simulation-subsurface-flow-and-reactive-transport-processes > > Many thanks in advance! > > Best regards, > > Dingwen > > > -- > Dingwen Tao > Assistant Professor > The University of Alabama > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From overholt at capesim.com Mon Jul 9 11:13:16 2018 From: overholt at capesim.com (Matthew Overholt) Date: Mon, 9 Jul 2018 12:13:16 -0400 Subject: [petsc-users] PC_SUBPC_ERROR with -pc_factor_zeropivot In-Reply-To: References: Message-ID: Great idea, thanks again! Matt... On Mon, Jul 9, 2018 at 11:08 AM, Matthew Knepley wrote: > On Mon, Jul 9, 2018 at 11:05 AM Matthew Overholt > wrote: > >> The -sub_pc_factor_zeropivot option works, but since this is for >> a commercial code I don't want users to have to type that every time. >> >> Is there an equivalent call to >> PCFactorSetZeroPivot() >> for the block Jacobi method (like PCSubFactorSetZeroPivot())? I can't >> find it. >> >> Instead, does one need to call >> PCBjacobiGetSubKSP() >> and then loop over every block, calling >> KSPGetPC() >> PCFactorSetZeroPivot() >> on each block? That seems a little tedious, but if that is the correct >> approach I'll do it >> > > Yes, that is the API approach. As you can see, for composed solvers its > not a great option. How about > putting > > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/ > PetscOptionsSetValue.html > > in the code? > > Thanks, > > Matt > > >> Thanks, >> Matt Overholt >> >> On Mon, Jul 9, 2018 at 10:17 AM, Matthew Overholt >> wrote: >> >>> Thanks, Matt, that option works perfectly, and explains the -ksp_view >>> output. >>> >>> Much appreciated! >>> Matt... >>> >>> On Fri, Jul 6, 2018 at 6:25 PM, Matthew Knepley >>> wrote: >>> >>>> Default Case (zeropivot is 2.22045E-14): >>>>> mpiexec -n 1 ... >>>>> ==> ksp fails due to pcReason = PC_FACTOR_NUMERIC_ZEROPIVOT >>>>> >>>>> Reduced pivot case, n = 1: >>>>> mpiexec -n 1 ... -pc_factor_zeropivot 1E-15 >>>>> ==> runs successfully >>>>> >>>>> Reduced pivot case, n > 1: >>>>> mpiexec -n 2 .. -pc_factor_zeropivot 1E-15 >>>>> ==> ksp fails due to pcReason = PC_SUBPC_ERROR >>>>> >>>> >>>> Okay, what is likely happening is that your preconditioner is actually >>>> Block-Jacobi/LU >>>> instead of parallel LU. Thus you would need >>>> >>>> -sub_pc_factor_zeropivot 1e-15 >>>> >>>> >> > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbuerkle at web.de Mon Jul 9 19:38:49 2018 From: mbuerkle at web.de (Marius Buerkle) Date: Tue, 10 Jul 2018 02:38:49 +0200 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Jul 9 20:51:03 2018 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 9 Jul 2018 21:51:03 -0400 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: On Mon, Jul 9, 2018 at 8:38 PM Marius Buerkle wrote: > I see. What I want to do is to calculate the matrix product C=A*B' > between two sparse matrices A=(A11 0 , A21 0) and B=(B11 0 , B21 0) where > C will be dense in the end but I just want to calculate some selected > entries C_ij of C. At the moment I extract submatricies for the > corresponding rows and columns, > I think that is the right way, but you should only need MatGetSubmatrix for that. Thanks, Matt > so I was wondering if there is a simpler or performancer-wise faster way. > I assume there is not such thing as a restricted MatMatMul which just > calculated the lets say predefined nonzero entries of C. > > > These are "internal" routines that we rarely expect end users to use since > they are specific for particular matrix implementations. As such they are > also kind of strange to use from Fortran since none of the AIJ data > structures can be made visible to Fortran. > > Could you explain why you want them from Fortran and maybe we'll have > alternative suggestions on how you can achieve the same effect. > > Barry > > > > On Jul 5, 2018, at 3:05 AM, Marius Buerkle wrote: > > > > or MatMPIAIJGetLocalMatCondensed for that matter. > > > > > > > > Hi ! > > > > Is MatMPIAIJGetSeqAIJ implemented for fortran? > > > > best, > > Marius > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbuerkle at web.de Mon Jul 9 21:02:55 2018 From: mbuerkle at web.de (Marius Buerkle) Date: Tue, 10 Jul 2018 04:02:55 +0200 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Jul 9 21:04:12 2018 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 9 Jul 2018 22:04:12 -0400 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: On Mon, Jul 9, 2018 at 10:02 PM Marius Buerkle wrote: > MatGetSubmatrix is in the current PETSc released called > MatCreateSubmatrix. Is this correct ? > Yep. I am old and cannot follow API changes anymore. Matt > On Mon, Jul 9, 2018 at 8:38 PM Marius Buerkle wrote: > >> I see. What I want to do is to calculate the matrix product C=A*B' >> between two sparse matrices A=(A11 0 , A21 0) and B=(B11 0 , B21 0) where >> C will be dense in the end but I just want to calculate some selected >> entries C_ij of C. At the moment I extract submatricies for the >> corresponding rows and columns, >> > > I think that is the right way, but you should only need MatGetSubmatrix > for that. > > Thanks, > > Matt > > >> so I was wondering if there is a simpler or performancer-wise faster way. >> I assume there is not such thing as a restricted MatMatMul which just >> calculated the lets say predefined nonzero entries of C. >> >> >> These are "internal" routines that we rarely expect end users to use >> since they are specific for particular matrix implementations. As such they >> are also kind of strange to use from Fortran since none of the AIJ data >> structures can be made visible to Fortran. >> >> Could you explain why you want them from Fortran and maybe we'll have >> alternative suggestions on how you can achieve the same effect. >> >> Barry >> >> >> > On Jul 5, 2018, at 3:05 AM, Marius Buerkle wrote: >> > >> > or MatMPIAIJGetLocalMatCondensed for that matter. >> > >> > >> > >> > Hi ! >> > >> > Is MatMPIAIJGetSeqAIJ implemented for fortran? >> > >> > best, >> > Marius >> >> > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lakhansharama4 at gmail.com Tue Jul 10 04:18:50 2018 From: lakhansharama4 at gmail.com (Lakhan Sharma) Date: Tue, 10 Jul 2018 14:48:50 +0530 Subject: [petsc-users] Translation, Script Writing, Transcription, Dubbing and Interpreter Message-ID: <5b4479fd.1c69fb81.5b243.9ebf@mx.google.com> Dear Sir/ Ma?am, Do you wish to make business communications more successful? So, why don?t you look for Translation services? We are an India Based Translation Company that has years of experience in Translating for startups, MNCs, small scale and International organizations. Backed by native Translators, we translate all kinds of certificates, websites, software, marketing collaterals and other documents in more than 200 languages. So, if interested, do get in touch with us!! Thanks & Regards, Lakhan Verma Team - TR & IN P.S. - In case, you don?t have such requirements, you can share references that will be provided an attractive referral rewards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingogaertner.tus at gmail.com Tue Jul 10 12:17:07 2018 From: ingogaertner.tus at gmail.com (Ingo Gaertner) Date: Tue, 10 Jul 2018 19:17:07 +0200 Subject: [petsc-users] Extending petsc4py Message-ID: Hello, can I find somewhere an example how to wrap my own PETSc-based code so that it can be used together with petsc4py? Let's assume I have a C function, which I want to access from python: Vec createMyVec(); I have written a SWIG interface file to generate a python wrapper for this function. The wrapper works, but I cannot use the return value as input for mpi4py routines that expect a Vec, because mpi4py's Vec type is different from the SWIG generated Vec type in my python wrapper. Any idea, how I can create mpi4py-compatible types? If the mpi4py wrapping technique is described somewhere, this may help as well, although some working example would be perfect. As a final remark, I'd like to keep my project decoupled from mpi4py. Therefore, including my extensions in the build process of mpi4py is not quite what I am looking for, although I could live with this as a workaround if no other solution is possible. (I am using petsc-3.9.1 built from source and mpi4py installed using pip on Ubuntu 18.04.) Thanks Ingo -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvalera-w at sdsu.edu Tue Jul 10 13:11:07 2018 From: mvalera-w at sdsu.edu (Manuel Valera) Date: Tue, 10 Jul 2018 11:11:07 -0700 Subject: [petsc-users] Finding global max & min on DMDAs Message-ID: Hi guys, It's me with another basic question, this time i need to find the global maximum and minimum of DMDA array to do an average, it is usually operated over a local vector but it has a global vector too, the code works as intended in one core but it comes up with different values for this average when i quote more than one processor, Is there an easy way to find maximum and minimums over a DMDA array? I currently have the following: call DMDAVecRestoreArrayF90(daDensity,LocDensity,dens,ierr) > call DMDAVecGetArrayF90(daDensity,gDensity,Gdens,ierr) > !Erase global density since it has already been broadcasted before and we > use > !the local version only: > Gdens = 0.0d0 > call DMDAVecRestoreArrayF90(daDensity,gDensity,Gdens,ierr) > !Broadcast the values of the updated density to the global array: > call DMLocalToGlobalBegin(daDensity,LocDensity,ADD_VALUES,gDensity,ierr) > call DMLocalToGlobalEnd(daDensity,LocDensity,ADD_VALUES,gDensity,ierr) > call DMDAVecGetArrayF90(daDensity,gDensity,Gdens,ierr) !Calculate 'average' on the global domain, taking care is done on inner > points > !only: > rho_P0 = (minval(Gdens(xstart:xend-1,ystart:yend-1,zstart:zend-1)) > + & > > &maxval(Gdens(xstart:xend-1,ystart:yend-1,zstart:zend-1)))/2.0D0 > print*,'My rho_P0: ', rho_P0 > call DMDAVecRestoreArrayF90(daDensity,gDensity,Gdens,ierr) > call DMDAVecGetArrayF90(daDensity,LocDensity,dens,ierr) The idea here was to use the global vector so it would have the information of the whole array, but is not working as intended, what am i doing wrong? Thanks, Manuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Tue Jul 10 14:00:23 2018 From: knepley at gmail.com (Matthew Knepley) Date: Tue, 10 Jul 2018 15:00:23 -0400 Subject: [petsc-users] Finding global max & min on DMDAs In-Reply-To: References: Message-ID: On Tue, Jul 10, 2018 at 2:11 PM Manuel Valera wrote: > Hi guys, > > It's me with another basic question, this time i need to find the global > maximum and minimum of DMDA array to do an average, it is usually operated > over a local vector but it has a global vector too, the code works as > intended in one core but it comes up with different values for this average > when i quote more than one processor, > > Is there an easy way to find maximum and minimums over a DMDA array? > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecMax.html Thanks, Matt > I currently have the following: > > call DMDAVecRestoreArrayF90(daDensity,LocDensity,dens,ierr) >> call DMDAVecGetArrayF90(daDensity,gDensity,Gdens,ierr) >> !Erase global density since it has already been broadcasted before and we >> use >> !the local version only: >> Gdens = 0.0d0 >> call DMDAVecRestoreArrayF90(daDensity,gDensity,Gdens,ierr) >> !Broadcast the values of the updated density to the global array: >> call DMLocalToGlobalBegin(daDensity,LocDensity,ADD_VALUES,gDensity,ierr) >> call DMLocalToGlobalEnd(daDensity,LocDensity,ADD_VALUES,gDensity,ierr) >> call DMDAVecGetArrayF90(daDensity,gDensity,Gdens,ierr) > > !Calculate 'average' on the global domain, taking care is done on inner >> points >> !only: >> rho_P0 = >> (minval(Gdens(xstart:xend-1,ystart:yend-1,zstart:zend-1)) + & >> >> &maxval(Gdens(xstart:xend-1,ystart:yend-1,zstart:zend-1)))/2.0D0 >> print*,'My rho_P0: ', rho_P0 >> call DMDAVecRestoreArrayF90(daDensity,gDensity,Gdens,ierr) >> call DMDAVecGetArrayF90(daDensity,LocDensity,dens,ierr) > > > The idea here was to use the global vector so it would have the > information of the whole array, but is not working as intended, what am i > doing wrong? > > Thanks, > > Manuel > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvalera-w at sdsu.edu Tue Jul 10 15:06:50 2018 From: mvalera-w at sdsu.edu (Manuel Valera) Date: Tue, 10 Jul 2018 13:06:50 -0700 Subject: [petsc-users] Finding global max & min on DMDAs In-Reply-To: References: Message-ID: Thank you Matthew, i was aware of this function but i couldn't find an example with DMDAs, i now see ex5 has that and after some work i was able to use it in Fortran, now my code is working as intended, i did learn something new, Thanks again, Manuel On Tue, Jul 10, 2018 at 12:00 PM, Matthew Knepley wrote: > On Tue, Jul 10, 2018 at 2:11 PM Manuel Valera wrote: > >> Hi guys, >> >> It's me with another basic question, this time i need to find the global >> maximum and minimum of DMDA array to do an average, it is usually operated >> over a local vector but it has a global vector too, the code works as >> intended in one core but it comes up with different values for this average >> when i quote more than one processor, >> >> Is there an easy way to find maximum and minimums over a DMDA array? >> > > http://www.mcs.anl.gov/petsc/petsc-current/docs/ > manualpages/Vec/VecMax.html > > Thanks, > > Matt > > >> I currently have the following: >> >> call DMDAVecRestoreArrayF90(daDensity,LocDensity,dens,ierr) >>> call DMDAVecGetArrayF90(daDensity,gDensity,Gdens,ierr) >>> !Erase global density since it has already been broadcasted before and >>> we use >>> !the local version only: >>> Gdens = 0.0d0 >>> call DMDAVecRestoreArrayF90(daDensity,gDensity,Gdens,ierr) >>> !Broadcast the values of the updated density to the global array: >>> call DMLocalToGlobalBegin(daDensity,LocDensity,ADD_VALUES,gDensity,ierr) >>> call DMLocalToGlobalEnd(daDensity,LocDensity,ADD_VALUES,gDensity,ierr) >>> call DMDAVecGetArrayF90(daDensity,gDensity,Gdens,ierr) >> >> !Calculate 'average' on the global domain, taking care is done on inner >>> points >>> !only: >>> rho_P0 = (minval(Gdens(xstart:xend-1,ystart:yend-1,zstart:zend-1)) >>> + & >>> &maxval(Gdens(xstart:xend-1, >>> ystart:yend-1,zstart:zend-1)))/2.0D0 >>> print*,'My rho_P0: ', rho_P0 >>> call DMDAVecRestoreArrayF90(daDensity,gDensity,Gdens,ierr) >>> call DMDAVecGetArrayF90(daDensity,LocDensity,dens,ierr) >> >> >> The idea here was to use the global vector so it would have the >> information of the whole array, but is not working as intended, what am i >> doing wrong? >> >> Thanks, >> >> Manuel >> > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zakaryah at gmail.com Tue Jul 10 16:10:42 2018 From: zakaryah at gmail.com (zakaryah) Date: Tue, 10 Jul 2018 17:10:42 -0400 Subject: [petsc-users] Equivalent of DMGetRefineLevel and DMGetCoarsenLevel for FAS Message-ID: I'm trying to incorporate auxiliary fields (in a DMDA) in a problem in nonlinear elasticity, in a way which is compatible with multi-grid techniques. The advice I got previously was to use DMCoarsenHookAdd and DMRefineHookAdd. I finally managed to make sense of the example that Jed pointed out (SNES ex48.c), which was helpful. However, I thought that since the same coarsening and refinement would be used repeatedly, I could just keep everything around at all times, like example KSP ex42.c, using DMRefineHierarchy. I managed to get that working with grid sequencing. However, I can't seem to generalize to FAS, because in my FormFunction routine, I need to be able to determine which of the auxiliary DMs from the hierarchy corresponds to the current scale. With grid sequencing, I could use DMGetRefineLevel. Is it possible to do something similar with FAS? Is it completely stupid to try to do it this way? Thanks for any help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Tue Jul 10 16:15:07 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Tue, 10 Jul 2018 21:15:07 +0000 Subject: [petsc-users] Equivalent of DMGetRefineLevel and DMGetCoarsenLevel for FAS In-Reply-To: References: Message-ID: <94176B76-532A-40D8-A93D-900A692F5715@anl.gov> Hm, you could always hunt through your list of auxiliary DMS to find something of the same size? > On Jul 10, 2018, at 4:10 PM, zakaryah wrote: > > I'm trying to incorporate auxiliary fields (in a DMDA) in a problem in nonlinear elasticity, in a way which is compatible with multi-grid techniques. The advice I got previously was to use DMCoarsenHookAdd and DMRefineHookAdd. I finally managed to make sense of the example that Jed pointed out (SNES ex48.c), which was helpful. However, I thought that since the same coarsening and refinement would be used repeatedly, I could just keep everything around at all times, like example KSP ex42.c, using DMRefineHierarchy. I managed to get that working with grid sequencing. However, I can't seem to generalize to FAS, because in my FormFunction routine, I need to be able to determine which of the auxiliary DMs from the hierarchy corresponds to the current scale. With grid sequencing, I could use DMGetRefineLevel. Is it possible to do something similar with FAS? Is it completely stupid to try to do it this way? Thanks for any help. From zakaryah at gmail.com Tue Jul 10 16:17:47 2018 From: zakaryah at gmail.com (zakaryah) Date: Tue, 10 Jul 2018 17:17:47 -0400 Subject: [petsc-users] Equivalent of DMGetRefineLevel and DMGetCoarsenLevel for FAS In-Reply-To: <94176B76-532A-40D8-A93D-900A692F5715@anl.gov> References: <94176B76-532A-40D8-A93D-900A692F5715@anl.gov> Message-ID: Thanks Barry - I thought about that and decided if that was the best way, then I must be doing something misguided. -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Tue Jul 10 16:19:30 2018 From: knepley at gmail.com (Matthew Knepley) Date: Tue, 10 Jul 2018 17:19:30 -0400 Subject: [petsc-users] Equivalent of DMGetRefineLevel and DMGetCoarsenLevel for FAS In-Reply-To: References: <94176B76-532A-40D8-A93D-900A692F5715@anl.gov> Message-ID: I have been attaching an auxDM to every DM that gives the auxiliary field layout, and also a Vec with the values. This seems to work well for me. Thanks, Matt On Tue, Jul 10, 2018 at 5:18 PM zakaryah wrote: > Thanks Barry - I thought about that and decided if that was the best way, > then I must be doing something misguided. > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zakaryah at gmail.com Tue Jul 10 16:21:22 2018 From: zakaryah at gmail.com (zakaryah) Date: Tue, 10 Jul 2018 17:21:22 -0400 Subject: [petsc-users] Equivalent of DMGetRefineLevel and DMGetCoarsenLevel for FAS In-Reply-To: References: <94176B76-532A-40D8-A93D-900A692F5715@anl.gov> Message-ID: Hi Matt - that sounds like it would work great for me. How do you attach the auxDM? On Tue, Jul 10, 2018 at 5:19 PM, Matthew Knepley wrote: > I have been attaching an auxDM to every DM that gives the auxiliary field > layout, and also a Vec with the values. This seems to work well for me. > > Thanks, > > Matt > > On Tue, Jul 10, 2018 at 5:18 PM zakaryah wrote: > >> Thanks Barry - I thought about that and decided if that was the best way, >> then I must be doing something misguided. >> > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Tue Jul 10 16:22:42 2018 From: knepley at gmail.com (Matthew Knepley) Date: Tue, 10 Jul 2018 17:22:42 -0400 Subject: [petsc-users] Equivalent of DMGetRefineLevel and DMGetCoarsenLevel for FAS In-Reply-To: References: <94176B76-532A-40D8-A93D-900A692F5715@anl.gov> Message-ID: On Tue, Jul 10, 2018 at 5:21 PM zakaryah wrote: > Hi Matt - that sounds like it would work great for me. How do you attach > the auxDM? > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscObjectCompose.html Thanks, Matt > On Tue, Jul 10, 2018 at 5:19 PM, Matthew Knepley > wrote: > >> I have been attaching an auxDM to every DM that gives the auxiliary field >> layout, and also a Vec with the values. This seems to work well for me. >> >> Thanks, >> >> Matt >> >> On Tue, Jul 10, 2018 at 5:18 PM zakaryah wrote: >> >>> Thanks Barry - I thought about that and decided if that was the best >>> way, then I must be doing something misguided. >>> >> >> >> -- >> What most experimenters take for granted before they begin their >> experiments is infinitely more interesting than any results to which their >> experiments lead. >> -- Norbert Wiener >> >> https://www.cse.buffalo.edu/~knepley/ >> > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zakaryah at gmail.com Tue Jul 10 16:27:25 2018 From: zakaryah at gmail.com (zakaryah) Date: Tue, 10 Jul 2018 17:27:25 -0400 Subject: [petsc-users] Equivalent of DMGetRefineLevel and DMGetCoarsenLevel for FAS In-Reply-To: References: <94176B76-532A-40D8-A93D-900A692F5715@anl.gov> Message-ID: Thanks - that's really helpful! On Tue, Jul 10, 2018 at 5:22 PM, Matthew Knepley wrote: > On Tue, Jul 10, 2018 at 5:21 PM zakaryah wrote: > >> Hi Matt - that sounds like it would work great for me. How do you attach >> the auxDM? >> > > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/ > PetscObjectCompose.html > > Thanks, > > Matt > > >> On Tue, Jul 10, 2018 at 5:19 PM, Matthew Knepley >> wrote: >> >>> I have been attaching an auxDM to every DM that gives the auxiliary >>> field layout, and also a Vec with the values. This seems to work well for >>> me. >>> >>> Thanks, >>> >>> Matt >>> >>> On Tue, Jul 10, 2018 at 5:18 PM zakaryah wrote: >>> >>>> Thanks Barry - I thought about that and decided if that was the best >>>> way, then I must be doing something misguided. >>>> >>> >>> >>> -- >>> What most experimenters take for granted before they begin their >>> experiments is infinitely more interesting than any results to which their >>> experiments lead. >>> -- Norbert Wiener >>> >>> https://www.cse.buffalo.edu/~knepley/ >>> >> >> > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbuerkle at web.de Tue Jul 10 23:50:09 2018 From: mbuerkle at web.de (Marius Buerkle) Date: Wed, 11 Jul 2018 06:50:09 +0200 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From dalcinl at gmail.com Wed Jul 11 04:26:47 2018 From: dalcinl at gmail.com (Lisandro Dalcin) Date: Wed, 11 Jul 2018 12:26:47 +0300 Subject: [petsc-users] Extending petsc4py In-Reply-To: References: Message-ID: On Tue, 10 Jul 2018 at 20:17, Ingo Gaertner wrote: > Hello, > can I find somewhere an example how to wrap my own PETSc-based code so > that it can be used together with petsc4py? > > Let's assume I have a C function, which I want to access from python: > Vec createMyVec(); > > I have written a SWIG interface file to generate a python wrapper for this > function. The wrapper works, but I cannot use the return value as input for > mpi4py routines that expect a Vec, because mpi4py's Vec type is different > from the SWIG generated Vec type in my python wrapper. Any idea, how I can > create mpi4py-compatible types? > > If the mpi4py wrapping technique is described somewhere, this may help as > well, although some working example would be perfect. > > As a final remark, I'd like to keep my project decoupled from mpi4py. > Therefore, including my extensions in the build process of mpi4py is not > quite what I am looking for, although I could live with this as a > workaround if no other solution is possible. > (I am using petsc-3.9.1 built from source and mpi4py installed using pip > on Ubuntu 18.04.) > > Sorry, but I'm quite confused. Why are you talking about mpi4py? There is no "Vec" in mpi4py. The only type intersection between petsc4py and mpi4py is "Comm" for MPI communicators, in that case you should use the following to make the conversions: mpi4py_comm = petsc4py_comm.tompi4py() # mpi4py <-- petsc4py petsc4py_comm = PETSc.Comm(mpi4py_comm) # petsc4py <-- mpi4py About SWIG, are you using typemaps written by yourself, or the typemaps provided by petsc4py? Have you looked at "demo/wrap-swig" in petsc4py sources? -- Lisandro Dalcin ============ Research Scientist Computer, Electrical and Mathematical Sciences & Engineering (CEMSE) Extreme Computing Research Center (ECRC) King Abdullah University of Science and Technology (KAUST) http://ecrc.kaust.edu.sa/ 4700 King Abdullah University of Science and Technology al-Khawarizmi Bldg (Bldg 1), Office # 0109 Thuwal 23955-6900, Kingdom of Saudi Arabia http://www.kaust.edu.sa Office Phone: +966 12 808-0459 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Wed Jul 11 05:16:29 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Wed, 11 Jul 2018 10:16:29 +0000 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: Message-ID: <90DFBA32-7EF5-4378-ACB9-DAEC27A669D8@mcs.anl.gov> > On Jul 10, 2018, at 11:50 PM, Marius Buerkle wrote: > > Sorry, I have yet another question. While it works well for MPIAIJ, I end up in a deadlock if I use MatCreateSubmatrix on a MPIDENSE matrix. Should MatCreateSubmatrix work on dense matricies ? yes > On Mon, Jul 9, 2018 at 10:02 PM Marius Buerkle wrote: > MatGetSubmatrix is in the current PETSc released called MatCreateSubmatrix. Is this correct ? > > > Yep. I am old and cannot follow API changes anymore. > > Matt > > On Mon, Jul 9, 2018 at 8:38 PM Marius Buerkle wrote: > I see. What I want to do is to calculate the matrix product C=A*B' between two sparse matrices A=(A11 0 , A21 0) and B=(B11 0 , B21 0) where C will be dense in the end but I just want to calculate some selected entries C_ij of C. At the moment I extract submatricies for the corresponding rows and columns, > > I think that is the right way, but you should only need MatGetSubmatrix for that. > > Thanks, > > Matt > > so I was wondering if there is a simpler or performancer-wise faster way. I assume there is not such thing as a restricted MatMatMul which just calculated the lets say predefined nonzero entries of C. > > > These are "internal" routines that we rarely expect end users to use since they are specific for particular matrix implementations. As such they are also kind of strange to use from Fortran since none of the AIJ data structures can be made visible to Fortran. > > Could you explain why you want them from Fortran and maybe we'll have alternative suggestions on how you can achieve the same effect. > > Barry > > > > On Jul 5, 2018, at 3:05 AM, Marius Buerkle wrote: > > > > or MatMPIAIJGetLocalMatCondensed for that matter. > > > > > > > > Hi ! > > > > Is MatMPIAIJGetSeqAIJ implemented for fortran? > > > > best, > > Marius > > > > -- > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > > > -- > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ From mbuerkle at web.de Wed Jul 11 05:53:53 2018 From: mbuerkle at web.de (Marius Buerkle) Date: Wed, 11 Jul 2018 12:53:53 +0200 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: <90DFBA32-7EF5-4378-ACB9-DAEC27A669D8@mcs.anl.gov> References: <90DFBA32-7EF5-4378-ACB9-DAEC27A669D8@mcs.anl.gov> Message-ID: An HTML attachment was scrubbed... URL: From ingogaertner.tus at gmail.com Wed Jul 11 14:48:08 2018 From: ingogaertner.tus at gmail.com (Ingo Gaertner) Date: Wed, 11 Jul 2018 21:48:08 +0200 Subject: [petsc-users] Extending petsc4py In-Reply-To: References: Message-ID: I am sorry. I meant to ask about petsc4py only, so please replace every mpi4py in my question with petsc4py. The "demo/wrap-swig" has solved my problems. Thanks Ingo 2018-07-11 11:26 GMT+02:00 Lisandro Dalcin : > > > On Tue, 10 Jul 2018 at 20:17, Ingo Gaertner > wrote: > >> Hello, >> can I find somewhere an example how to wrap my own PETSc-based code so >> that it can be used together with petsc4py? >> >> Let's assume I have a C function, which I want to access from python: >> Vec createMyVec(); >> >> I have written a SWIG interface file to generate a python wrapper for >> this function. The wrapper works, but I cannot use the return value as >> input for mpi4py routines that expect a Vec, because mpi4py's Vec type is >> different from the SWIG generated Vec type in my python wrapper. Any idea, >> how I can create mpi4py-compatible types? >> >> If the mpi4py wrapping technique is described somewhere, this may help as >> well, although some working example would be perfect. >> >> As a final remark, I'd like to keep my project decoupled from mpi4py. >> Therefore, including my extensions in the build process of mpi4py is not >> quite what I am looking for, although I could live with this as a >> workaround if no other solution is possible. >> (I am using petsc-3.9.1 built from source and mpi4py installed using pip >> on Ubuntu 18.04.) >> >> > Sorry, but I'm quite confused. Why are you talking about mpi4py? There is > no "Vec" in mpi4py. The only type intersection between petsc4py and mpi4py > is "Comm" for MPI communicators, in that case you should use the following > to make the conversions: > > mpi4py_comm = petsc4py_comm.tompi4py() # mpi4py <-- petsc4py > petsc4py_comm = PETSc.Comm(mpi4py_comm) # petsc4py <-- mpi4py > > About SWIG, are you using typemaps written by yourself, or the typemaps > provided by petsc4py? Have you looked at "demo/wrap-swig" in petsc4py > sources? > > -- > Lisandro Dalcin > ============ > Research Scientist > Computer, Electrical and Mathematical Sciences & Engineering (CEMSE) > Extreme Computing Research Center (ECRC) > King Abdullah University of Science and Technology (KAUST) > http://ecrc.kaust.edu.sa/ > > 4700 King Abdullah University of Science and Technology > al-Khawarizmi Bldg (Bldg 1), Office # 0109 > Thuwal 23955-6900, Kingdom of Saudi Arabia > http://www.kaust.edu.sa > > Office Phone: +966 12 808-0459 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lei.wang at durham.ac.uk Wed Jul 11 16:06:28 2018 From: lei.wang at durham.ac.uk (WANG, LEI) Date: Wed, 11 Jul 2018 21:06:28 +0000 Subject: [petsc-users] MatView changes matrix Message-ID: Dear all I met a strange problem. The value of the matrix A seems to be changed after MatView(A, viewer). With this MatView, my code can run more steps than without MatView. Why does this happen? Does MatView(A, viewer) do some change on A? Thank you very much in advance. Cheers Lei -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Wed Jul 11 16:13:41 2018 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 11 Jul 2018 17:13:41 -0400 Subject: [petsc-users] MatView changes matrix In-Reply-To: References: Message-ID: On Wed, Jul 11, 2018 at 5:06 PM WANG, LEI wrote: > Dear all > > > > I met a strange problem. The value of the matrix A seems to be changed > after MatView(A, viewer). With this MatView, my code can run more steps > than without MatView. Why does this happen? Does MatView(A, viewer) do some > change on A? > No. Its likely you have a memory error. Run with valgrind. Thanks, Matt > > > Thank you very much in advance. > > > > Cheers > > Lei > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbuerkle at web.de Wed Jul 11 21:54:57 2018 From: mbuerkle at web.de (Marius Buerkle) Date: Thu, 12 Jul 2018 04:54:57 +0200 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: <90DFBA32-7EF5-4378-ACB9-DAEC27A669D8@mcs.anl.gov> Message-ID: An HTML attachment was scrubbed... URL: From huq2090 at gmail.com Thu Jul 12 00:00:31 2018 From: huq2090 at gmail.com (Fazlul Huq) Date: Thu, 12 Jul 2018 00:00:31 -0500 Subject: [petsc-users] Trying to solve Ax = b problem with Boundary condition using ksp Message-ID: Hi, I am trying to solve this problem with the following code: static char help[] = "Solves a tridiagonal linear system with KSP.\n\n"; /*T Concepts: KSP^solving a system of linear equations Processors: 1 T*/ /* Include "petscksp.h" so that we can use KSP solvers. Note that this file automatically includes: petscsys.h - base PETSc routines petscvec.h - vectors petscmat.h - matrices petscis.h - index sets petscksp.h - Krylov subspace methods petscviewer.h - viewers petscpc.h - preconditioners Note: The corresponding parallel example is ex23.c */ #include int main(int argc,char **args) { Vec x, b, u; /* approx solution, RHS, exact solution */ Mat A; /* linear system matrix */ KSP ksp; /* linear solver context */ PC pc; /* preconditioner context */ PetscReal norm; /* norm of solution error */ PetscErrorCode ierr; PetscInt i,n = 10,col[3],its; PetscMPIInt size; // PetscScalar zero = 0; PetscScalar hundredth = 0.01,value[3]; PetscScalar one = 1.0; PetscScalar leftbc = 10.01; PetscScalar rightbc = 15.01; PetscBool nonzeroguess = PETSC_FALSE,changepcside = PETSC_FALSE; ierr = PetscInitialize(&argc,&args,(char*)0,help);if (ierr) return ierr; ierr = MPI_Comm_size(PETSC_COMM_WORLD,&size);CHKERRQ(ierr); if (size != 1) SETERRQ(PETSC_COMM_WORLD,1,"This is a uniprocessor example only!"); ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr); ierr = PetscOptionsGetBool(NULL,NULL,"-nonzero_guess",& nonzeroguess,NULL);CHKERRQ(ierr); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Compute the matrix and right-hand-side vector that define the linear system, Ax = b. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Create vectors. Note that we form 1 vector from scratch and then duplicate as needed. */ ierr = VecCreate(PETSC_COMM_WORLD,&x);CHKERRQ(ierr); ierr = PetscObjectSetName((PetscObject) x, "Solution");CHKERRQ(ierr); ierr = VecSetSizes(x,PETSC_DECIDE,n);CHKERRQ(ierr); ierr = VecSetFromOptions(x);CHKERRQ(ierr); ierr = VecDuplicate(x,&b);CHKERRQ(ierr); ierr = VecDuplicate(x,&u);CHKERRQ(ierr); i=1; ierr = VecSetValues(b, 1, &i, &leftbc, INSERT_VALUES);CHKERRQ(ierr); for (i=2; i -pc_type -ksp_monitor -ksp_rtol These options will override those specified above as long as KSPSetFromOptions() is called _after_ any other customization routines. */ ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); if (nonzeroguess) { PetscScalar p = .5; ierr = VecSet(x,p);CHKERRQ(ierr); ierr = KSPSetInitialGuessNonzero(ksp,PETSC_TRUE);CHKERRQ(ierr); } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Solve the linear system - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Solve linear system */ ierr = KSPSolve(ksp,b,x);CHKERRQ(ierr); /* View solver info; we could instead use the option -ksp_view to print this info to the screen at the conclusion of KSPSolve(). */ ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Check solution and clean up - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Check the error */ ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr); ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr); ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr); ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, Iterations %D\n",(double)norm,its);CHKERRQ(ierr); /* Free work space. All PETSc objects should be destroyed when they are no longer needed. */ ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = VecDestroy(&u);CHKERRQ(ierr); ierr = VecDestroy(&b);CHKERRQ(ierr); ierr = MatDestroy(&A);CHKERRQ(ierr); ierr = KSPDestroy(&ksp);CHKERRQ(ierr); /* Always call PetscFinalize() before exiting a program. This routine - finalizes the PETSc libraries as well as MPI - provides summary and diagnostic information if certain runtime options are chosen (e.g., -log_view). */ ierr = PetscFinalize(); return ierr; } But I got the following error message: [0]PETSC ERROR: ------------------------------------------------------------ ------------ [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html# valgrind [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors [0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run [0]PETSC ERROR: to get more information on the crash. [0]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [0]PETSC ERROR: Signal received [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]PETSC ERROR: Petsc Release Version 3.8.3, Dec, 09, 2017 [0]PETSC ERROR: ./ex1 on a arch-linux2-c-opt named huq2090 by huq2090 Wed Jul 11 23:48:10 2018 [0]PETSC ERROR: Configure options --prefix=/opt/moose/petsc-3.8.3/mpich-3.2_gcc-7.3.0-opt --download-hypre=1 --with-ssl=0 --with-debugging=no --with-pic=1 --with-shared-libraries=1 --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --download-fblaslapack=1 --download-metis=1 --download-parmetis=1 --download-superlu_dist=1 --download-mumps=1 --download-scalapack=1 -CC=mpicc -CXX=mpicxx -FC=mpif90 -F77=mpif77 -F90=mpif90 -CFLAGS="-fPIC -fopenmp" -CXXFLAGS="-fPIC -fopenmp" -FFLAGS="-fPIC -fopenmp" -FCFLAGS="-fPIC -fopenmp" -F90FLAGS="-fPIC -fopenmp" -F77FLAGS="-fPIC -fopenmp" [0]PETSC ERROR: #1 User provided function() line 0 in unknown file application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0 [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=59 : system msg for write_line failure : Bad file descriptor And again, when I tried to solve the same code with another pc, I got different error message attached herewith as an attachment. Can you please suggest me about what to do. Thanks. Best, Huq -- Fazlul Huq Graduate Research Assistant Department of Nuclear, Plasma & Radiological Engineering (NPRE) University of Illinois at Urbana-Champaign (UIUC) E-mail: huq2090 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IMG20180711130232.jpg Type: image/jpeg Size: 2887492 bytes Desc: not available URL: From arkhazali at cc.iut.ac.ir Thu Jul 12 05:29:57 2018 From: arkhazali at cc.iut.ac.ir (Ali Reza Khaz'ali) Date: Thu, 12 Jul 2018 14:59:57 +0430 Subject: [petsc-users] Problem in SNES Message-ID: <50c248e4-aed7-dacc-d7b0-914b15335e4c@cc.iut.ac.ir> Hi, I have to apologize if I'm asking a noob question. I am trying to solve y"-(1-x/5)yy'=x with boundary condition of y(1)=2 and y(3)=-1 with finite difference method. The discretized equations is to be solved by SNES. I wrote the follwoing code, however, it only works if number of MPI processes is set to one. for more workers, it does not seem to give valid results. I'd be grateful if anybody can guide me to debug the code, please. Regards, Ali static char help[] = "Newton's method for a non-linear ODE system.\n\n"; double h; int nParts; #include /* User-defined routines */ extern PetscErrorCode FormJacobian(SNES, Vec, Mat, Mat, void*); extern PetscErrorCode FormFunction(SNES, Vec, Vec, void*); int main(int argc, char **argv) { ??? SNES?????????? snes;???????? /* nonlinear solver context */ ??? KSP??????????? ksp;????????? /* linear solver context */ ??? PC???????????? pc;?????????? /* preconditioner context */ ??? Vec??????????? x, r;????????? /* solution, residual vectors */ ??? Mat??????????? J;??????????? /* Jacobian matrix */ ??? PetscErrorCode ierr; ??? PetscMPIInt??? size; ??? PetscScalar??? pfive = 0, *xx; ??? int rank; ??? int i, j; ??? Vec f; ??? nParts = 30; ??? h = (3.0 - 1.0) / nParts; ??? ierr = PetscInitialize(&argc, &argv, (char*)0, help); if (ierr) return ierr; ??? ierr = MPI_Comm_size(PETSC_COMM_WORLD, &size); CHKERRQ(ierr); ??? ierr = SNESCreate(PETSC_COMM_WORLD, &snes); CHKERRQ(ierr); ??? ierr = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, nParts-1, &x); CHKERRQ(ierr); ??? ierr = VecDuplicate(x, &r); CHKERRQ(ierr); ??? ierr = MatCreateAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, nParts - 1, nParts - 1, 3, NULL, 3, NULL, &J); CHKERRQ(ierr); ??? ierr = SNESSetFunction(snes, r, FormFunction, NULL); CHKERRQ(ierr); ??? ierr = SNESSetJacobian(snes, J, J, FormJacobian, NULL); CHKERRQ(ierr); ??? ierr = SNESGetKSP(snes, &ksp); CHKERRQ(ierr); ??? ierr = KSPGetPC(ksp, &pc); CHKERRQ(ierr); ??? ierr = KSPSetTolerances(ksp, 1.e-8, 1e-16, PETSC_DEFAULT, 200); CHKERRQ(ierr); ??? ierr = SNESSetTolerances(snes, 1.e-8, 1e-16, PETSC_DEFAULT, 200, 200); CHKERRQ(ierr); ??? ierr = SNESSetType(snes, SNESNEWTONLS); CHKERRQ(ierr); ??? ierr = KSPSetType(ksp, KSPCG); CHKERRQ(ierr); ??? ierr = SNESSetFromOptions(snes); CHKERRQ(ierr); ??? ierr = VecSet(x, pfive); CHKERRQ(ierr); ??? ierr = SNESSolve(snes, NULL, x); CHKERRQ(ierr); ??? ierr = SNESGetFunction(snes, &f, 0, 0); CHKERRQ(ierr); ??? ierr = VecDestroy(&x); CHKERRQ(ierr); ierr = VecDestroy(&r); CHKERRQ(ierr); ??? ierr = MatDestroy(&J); CHKERRQ(ierr); ierr = SNESDestroy(&snes); CHKERRQ(ierr); ??? ierr = PetscFinalize(); ??? return ierr; } PetscErrorCode FormFunction(SNES snes, Vec x, Vec f, void *ctx) { ??? PetscErrorCode??? ierr; ??? const PetscScalar *xx; ??? PetscScalar?????? *ff; ??? PetscInt vstart, vend; ??? int i, j, rank, size, xlength; ??? double xp, xxstart, xxend, x1, x2; ??? MPI_Status MyStat; ??? xxstart = 0; ??? xxend = 0; ??? MPI_Comm_rank(PETSC_COMM_WORLD, &rank); ??? MPI_Comm_size(PETSC_COMM_WORLD, &size); ??? ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); ??? xlength = vend - vstart; ??? ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); ??? ierr = VecGetArray(f, &ff); CHKERRQ(ierr); ??? ierr = VecView(x, PETSC_VIEWER_STDOUT_WORLD); ??? if (size > 1) { ??? ??? if (rank == 0) { ??? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, PETSC_COMM_WORLD, &MyStat); ??? ??? } ??? ??? else if (rank == (size - 1)) { ??? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, PETSC_COMM_WORLD); ??? ??? } ??? ??? else { ??? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, rank, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - 1, PETSC_COMM_WORLD, &MyStat); ??? ??? } ??? } ??? for (i = vstart; i < vend; i++) { ??? ??? xp = 1 + i * h; ??? ??? j = i - vstart; ??? ??? if (i == vstart) x1 = xxstart; ??? ??? else x1 = xx[j - 1]; ??? ??? if (i == (vend - 1)) x2 = xxend; ??? ??? else x2 = xx[j + 1]; ??? ??? if (i==0) ff[j] = (x2 - 2 * xx[j] + 2) / (h*h) - (1 - xp / 5)*xx[j] * (x2 - 2) / (2 * h) - xp; ??? ??? else if (i==(nParts-2)) ff[j]=(-1 - 2 * xx[j] + x1) / (h*h) - (1 - xp / 5)*xx[j] * (-1 - x1) / (2 * h) - xp; ??? ??? else ff[j] = (x2 - 2 * xx[j] + x1) / (h*h) - (1 - xp / 5)*xx[j] * (x2 - x1) / (2 * h) - xp; ??? } ??? /* Restore vectors */ ??? ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); ??? ierr = VecRestoreArray(f, &ff); CHKERRQ(ierr); ??? return 0; } PetscErrorCode FormJacobian(SNES snes, Vec x, Mat jac, Mat B, void *dummy) { ??? const PetscScalar *xx; ??? PetscErrorCode??? ierr; ??? PetscInt vstart, vend; ??? double rrow[3]; ??? int col[3]; ??? int i, j, rank, size, xlength; ??? double xp, xxstart, xxend, x1, x2; ??? MPI_Status MyStat; ??? ierr = MatZeroEntries(jac); CHKERRQ(ierr); ??? ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); ??? xlength = vend - vstart; ??? MPI_Comm_rank(PETSC_COMM_WORLD, &rank); ??? MPI_Comm_size(PETSC_COMM_WORLD, &size); ??? xxstart = 0; ??? xxend = 0; ??? /* ??? Get pointer to vector data.0+1 ??? */ ??? ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); ??? if (size > 1) { ??? ??? if (rank == 0) { ??? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? xxstart = 1e12; ??? ??? } ??? ??? else if (rank == (size - 1)) { ??? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, PETSC_COMM_WORLD); ??? ??? ??? xxend = 1e12; ??? ??? } ??? ??? else { ??? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, rank, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - 1, PETSC_COMM_WORLD, &MyStat); ??? ??? } ??? } ??? for (i = vstart; i < vend; i++) { ??? ??? xp = 1 + i * h; ??? ??? j = i - vstart; ??? ??? if (i == vstart) x1 = xxstart; ??? ??? else x1 = xx[j - 1]; ??? ??? if (i == (vend - 1)) x2 = xxend; ??? ??? else x2 = xx[j + 1]; ??? ??? if (i == 0) { ??? ??? ??? rrow[0] = -2 / (h*h) - (1 - xp / 5)*(x2 - 2) / (2 * h); ??? ??? ??? rrow[1] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); ??? ??? ??? col[0] = i; ??? ??? ??? col[1] = i + 1; ??? ??? ??? ierr = MatSetValues(jac, 1, &i, 2, col, rrow, INSERT_VALUES); CHKERRQ(ierr); ??? ??? } ??? ??? else if (i == (nParts-2)) { ??? ??? ??? rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); ??? ??? ??? rrow[1] = -2 / (h*h) - (1 - xp / 5)*(-1 - x1) / (2 * h); ??? ??? ??? col[0] = i - 1; ??? ??? ??? col[1] = i; ??? ??? ??? ierr = MatSetValues(jac, 1, &i, 2, col, rrow, INSERT_VALUES); CHKERRQ(ierr); ??? ??? } ??? ??? else { ??? ??? ??? rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); ??? ??? ??? rrow[1] = -2 / (h*h) - (1 - xp / 5)*(x2 - x1) / (2 * h); ??? ??? ??? rrow[2] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); ??? ??? ??? col[0] = i-1; ??? ??? ??? col[1] = i; ??? ??? ??? col[2] = i + 1; ??? ??? ??? ierr = MatSetValues(jac, 1, &i, 3, col, rrow, INSERT_VALUES); CHKERRQ(ierr); ??? ??? } ??? } ??? /* ??? Restore vector ??? */ ??? ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); ??? /* ??? Assemble matrix ??? */ ??? B = jac; ??? ierr = MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ??? ierr = MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ??? ierr = MatAssemblyBegin(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ??? ierr = MatAssemblyEnd(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ??? return 0; } From arkhazali at cc.iut.ac.ir Thu Jul 12 05:35:38 2018 From: arkhazali at cc.iut.ac.ir (Ali Reza Khaz'ali) Date: Thu, 12 Jul 2018 15:05:38 +0430 Subject: [petsc-users] Problem in SNES In-Reply-To: <50c248e4-aed7-dacc-d7b0-914b15335e4c@cc.iut.ac.ir> References: <50c248e4-aed7-dacc-d7b0-914b15335e4c@cc.iut.ac.ir> Message-ID: <5ad29e20-094b-ceb6-0b07-900e378287fd@cc.iut.ac.ir> Hi, I have to apologize if I'm asking a noob question. I am trying to solve y"-(1-x/5)yy'=x with boundary condition of y(1)=2 and y(3)=-1 with finite difference method. The discretized equations is to be solved by SNES. I wrote the follwoing code, however, it only works if number of MPI processes is set to one. for more workers, it does not seem to give valid results. I'd be grateful if anybody can guide me to debug the code, please. Regards, Ali static char help[] = "Newton's method for a non-linear ODE system.\n\n"; double h; int nParts; #include /* User-defined routines */ extern PetscErrorCode FormJacobian(SNES, Vec, Mat, Mat, void*); extern PetscErrorCode FormFunction(SNES, Vec, Vec, void*); int main(int argc, char **argv) { ??? SNES?????????? snes;???????? /* nonlinear solver context */ ??? KSP??????????? ksp;????????? /* linear solver context */ ??? PC???????????? pc;?????????? /* preconditioner context */ ??? Vec??????????? x, r;????????? /* solution, residual vectors */ ??? Mat??????????? J;??????????? /* Jacobian matrix */ ??? PetscErrorCode ierr; ??? PetscMPIInt??? size; ??? PetscScalar??? pfive = 0, *xx; ??? int rank; ??? int i, j; ??? Vec f; ??? nParts = 30; ??? h = (3.0 - 1.0) / nParts; ??? ierr = PetscInitialize(&argc, &argv, (char*)0, help); if (ierr) return ierr; ??? ierr = MPI_Comm_size(PETSC_COMM_WORLD, &size); CHKERRQ(ierr); ??? ierr = SNESCreate(PETSC_COMM_WORLD, &snes); CHKERRQ(ierr); ??? ierr = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, nParts-1, &x); CHKERRQ(ierr); ??? ierr = VecDuplicate(x, &r); CHKERRQ(ierr); ??? ierr = MatCreateAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, nParts - 1, nParts - 1, 3, NULL, 3, NULL, &J); CHKERRQ(ierr); ??? ierr = SNESSetFunction(snes, r, FormFunction, NULL); CHKERRQ(ierr); ??? ierr = SNESSetJacobian(snes, J, J, FormJacobian, NULL); CHKERRQ(ierr); ??? ierr = SNESGetKSP(snes, &ksp); CHKERRQ(ierr); ??? ierr = KSPGetPC(ksp, &pc); CHKERRQ(ierr); ??? ierr = KSPSetTolerances(ksp, 1.e-8, 1e-16, PETSC_DEFAULT, 200); CHKERRQ(ierr); ??? ierr = SNESSetTolerances(snes, 1.e-8, 1e-16, PETSC_DEFAULT, 200, 200); CHKERRQ(ierr); ??? ierr = SNESSetType(snes, SNESNEWTONLS); CHKERRQ(ierr); ??? ierr = KSPSetType(ksp, KSPCG); CHKERRQ(ierr); ??? ierr = SNESSetFromOptions(snes); CHKERRQ(ierr); ??? ierr = VecSet(x, pfive); CHKERRQ(ierr); ??? ierr = SNESSolve(snes, NULL, x); CHKERRQ(ierr); ??? ierr = SNESGetFunction(snes, &f, 0, 0); CHKERRQ(ierr); ??? ierr = VecDestroy(&x); CHKERRQ(ierr); ierr = VecDestroy(&r); CHKERRQ(ierr); ??? ierr = MatDestroy(&J); CHKERRQ(ierr); ierr = SNESDestroy(&snes); CHKERRQ(ierr); ??? ierr = PetscFinalize(); ??? return ierr; } PetscErrorCode FormFunction(SNES snes, Vec x, Vec f, void *ctx) { ??? PetscErrorCode??? ierr; ??? const PetscScalar *xx; ??? PetscScalar?????? *ff; ??? PetscInt vstart, vend; ??? int i, j, rank, size, xlength; ??? double xp, xxstart, xxend, x1, x2; ??? MPI_Status MyStat; ??? xxstart = 0; ??? xxend = 0; ??? MPI_Comm_rank(PETSC_COMM_WORLD, &rank); ??? MPI_Comm_size(PETSC_COMM_WORLD, &size); ??? ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); ??? xlength = vend - vstart; ??? ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); ??? ierr = VecGetArray(f, &ff); CHKERRQ(ierr); ??? ierr = VecView(x, PETSC_VIEWER_STDOUT_WORLD); ??? if (size > 1) { ??? ??? if (rank == 0) { ??? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, PETSC_COMM_WORLD, &MyStat); ??? ??? } ??? ??? else if (rank == (size - 1)) { ??? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, PETSC_COMM_WORLD); ??? ??? } ??? ??? else { ??? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, rank, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - 1, PETSC_COMM_WORLD, &MyStat); ??? ??? } ??? } ??? for (i = vstart; i < vend; i++) { ??? ??? xp = 1 + i * h; ??? ??? j = i - vstart; ??? ??? if (i == vstart) x1 = xxstart; ??? ??? else x1 = xx[j - 1]; ??? ??? if (i == (vend - 1)) x2 = xxend; ??? ??? else x2 = xx[j + 1]; ??? ??? if (i==0) ff[j] = (x2 - 2 * xx[j] + 2) / (h*h) - (1 - xp / 5)*xx[j] * (x2 - 2) / (2 * h) - xp; ??? ??? else if (i==(nParts-2)) ff[j]=(-1 - 2 * xx[j] + x1) / (h*h) - (1 - xp / 5)*xx[j] * (-1 - x1) / (2 * h) - xp; ??? ??? else ff[j] = (x2 - 2 * xx[j] + x1) / (h*h) - (1 - xp / 5)*xx[j] * (x2 - x1) / (2 * h) - xp; ??? } ??? /* Restore vectors */ ??? ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); ??? ierr = VecRestoreArray(f, &ff); CHKERRQ(ierr); ??? return 0; } PetscErrorCode FormJacobian(SNES snes, Vec x, Mat jac, Mat B, void *dummy) { ??? const PetscScalar *xx; ??? PetscErrorCode??? ierr; ??? PetscInt vstart, vend; ??? double rrow[3]; ??? int col[3]; ??? int i, j, rank, size, xlength; ??? double xp, xxstart, xxend, x1, x2; ??? MPI_Status MyStat; ??? ierr = MatZeroEntries(jac); CHKERRQ(ierr); ??? ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); ??? xlength = vend - vstart; ??? MPI_Comm_rank(PETSC_COMM_WORLD, &rank); ??? MPI_Comm_size(PETSC_COMM_WORLD, &size); ??? xxstart = 0; ??? xxend = 0; ??? /* ??? Get pointer to vector data.0+1 ??? */ ??? ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); ??? if (size > 1) { ??? ??? if (rank == 0) { ??? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? xxstart = 1e12; ??? ??? } ??? ??? else if (rank == (size - 1)) { ??? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, PETSC_COMM_WORLD); ??? ??? ??? xxend = 1e12; ??? ??? } ??? ??? else { ??? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, rank, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, PETSC_COMM_WORLD, &MyStat); ??? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, PETSC_COMM_WORLD); ??? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - 1, PETSC_COMM_WORLD, &MyStat); ??? ??? } ??? } ??? for (i = vstart; i < vend; i++) { ??? ??? xp = 1 + i * h; ??? ??? j = i - vstart; ??? ??? if (i == vstart) x1 = xxstart; ??? ??? else x1 = xx[j - 1]; ??? ??? if (i == (vend - 1)) x2 = xxend; ??? ??? else x2 = xx[j + 1]; ??? ??? if (i == 0) { ??? ??? ??? rrow[0] = -2 / (h*h) - (1 - xp / 5)*(x2 - 2) / (2 * h); ??? ??? ??? rrow[1] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); ??? ??? ??? col[0] = i; ??? ??? ??? col[1] = i + 1; ??? ??? ??? ierr = MatSetValues(jac, 1, &i, 2, col, rrow, INSERT_VALUES); CHKERRQ(ierr); ??? ??? } ??? ??? else if (i == (nParts-2)) { ??? ??? ??? rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); ??? ??? ??? rrow[1] = -2 / (h*h) - (1 - xp / 5)*(-1 - x1) / (2 * h); ??? ??? ??? col[0] = i - 1; ??? ??? ??? col[1] = i; ??? ??? ??? ierr = MatSetValues(jac, 1, &i, 2, col, rrow, INSERT_VALUES); CHKERRQ(ierr); ??? ??? } ??? ??? else { ??? ??? ??? rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); ??? ??? ??? rrow[1] = -2 / (h*h) - (1 - xp / 5)*(x2 - x1) / (2 * h); ??? ??? ??? rrow[2] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); ??? ??? ??? col[0] = i-1; ??? ??? ??? col[1] = i; ??? ??? ??? col[2] = i + 1; ??? ??? ??? ierr = MatSetValues(jac, 1, &i, 3, col, rrow, INSERT_VALUES); CHKERRQ(ierr); ??? ??? } ??? } ??? /* ??? Restore vector ??? */ ??? ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); ??? /* ??? Assemble matrix ??? */ ??? B = jac; ??? ierr = MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ??? ierr = MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ??? ierr = MatAssemblyBegin(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ??? ierr = MatAssemblyEnd(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ??? return 0; } From knepley at gmail.com Thu Jul 12 06:22:31 2018 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 12 Jul 2018 07:22:31 -0400 Subject: [petsc-users] Trying to solve Ax = b problem with Boundary condition using ksp In-Reply-To: References: Message-ID: On Thu, Jul 12, 2018 at 1:00 AM Fazlul Huq wrote: > Hi, > I am trying to solve this problem with the following code: > > static char help[] = "Solves a tridiagonal linear system with KSP.\n\n"; > > /*T > Concepts: KSP^solving a system of linear equations > Processors: 1 > T*/ > > > > /* > Include "petscksp.h" so that we can use KSP solvers. Note that this file > automatically includes: > petscsys.h - base PETSc routines petscvec.h - vectors > petscmat.h - matrices > petscis.h - index sets petscksp.h - Krylov subspace > methods > petscviewer.h - viewers petscpc.h - preconditioners > > Note: The corresponding parallel example is ex23.c > */ > #include > > int main(int argc,char **args) > { > Vec x, b, u; /* approx solution, RHS, exact solution */ > Mat A; /* linear system matrix */ > KSP ksp; /* linear solver context */ > PC pc; /* preconditioner context */ > PetscReal norm; /* norm of solution error */ > PetscErrorCode ierr; > PetscInt i,n = 10,col[3],its; > PetscMPIInt size; > // PetscScalar zero = 0; > PetscScalar hundredth = 0.01,value[3]; > PetscScalar one = 1.0; > PetscScalar leftbc = 10.01; > PetscScalar rightbc = 15.01; > PetscBool nonzeroguess = PETSC_FALSE,changepcside = PETSC_FALSE; > > ierr = PetscInitialize(&argc,&args,(char*)0,help);if (ierr) return ierr; > ierr = MPI_Comm_size(PETSC_COMM_WORLD,&size);CHKERRQ(ierr); > if (size != 1) SETERRQ(PETSC_COMM_WORLD,1,"This is a uniprocessor > example only!"); > ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr); > ierr = > PetscOptionsGetBool(NULL,NULL,"-nonzero_guess",&nonzeroguess,NULL);CHKERRQ(ierr); > > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Compute the matrix and right-hand-side vector that define > the linear system, Ax = b. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > > /* > Create vectors. Note that we form 1 vector from scratch and > then duplicate as needed. > */ > ierr = VecCreate(PETSC_COMM_WORLD,&x);CHKERRQ(ierr); > ierr = PetscObjectSetName((PetscObject) x, "Solution");CHKERRQ(ierr); > ierr = VecSetSizes(x,PETSC_DECIDE,n);CHKERRQ(ierr); > ierr = VecSetFromOptions(x);CHKERRQ(ierr); > ierr = VecDuplicate(x,&b);CHKERRQ(ierr); > ierr = VecDuplicate(x,&u);CHKERRQ(ierr); > > i=1; > ierr = VecSetValues(b, 1, &i, &leftbc, INSERT_VALUES);CHKERRQ(ierr); > for (i=2; i ierr = VecSetValues(b, n-2, &i, &hundredth, > INSERT_VALUES);CHKERRQ(ierr); > } > i=n-1; > ierr = VecSetValues(b, 1, &i, &rightbc, INSERT_VALUES);CHKERRQ(ierr); > ierr = VecAssemblyBegin(b);CHKERRQ(ierr); > ierr = VecAssemblyEnd(b);CHKERRQ(ierr); > > /* > Create matrix. When using MatCreate(), the matrix format can > be specified at runtime. > > Performance tuning note: For problems of substantial size, > preallocation of matrix memory is crucial for attaining good > performance. See the matrix chapter of the users manual for details. > */ > ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); > ierr = MatSetSizes(A,PETSC_DECIDE,PETSC_DECIDE,n,n);CHKERRQ(ierr); > ierr = MatSetFromOptions(A);CHKERRQ(ierr); > ierr = MatSetUp(A);CHKERRQ(ierr); > > /* > Assemble matrix > */ > value[0] = -1.0; value[1] = 2.0; value[2] = -1.0; > for (i=1; i col[0] = i-1; col[1] = i; col[2] = i+1; > ierr = MatSetValues(A,1,&i,3,col,value,INSERT_VALUES);CHKERRQ(ierr); > } > i = n - 1; col[0] = n - 2; col[1] = n - 1; > ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); > i = 0; col[0] = 0; col[1] = 1; value[0] = 2.0; value[1] = -1.0; > ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); > ierr = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > ierr = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > /* > Set exact solution; then compute right-hand-side vector. > */ > > > ierr = VecSet(u,one);CHKERRQ(ierr); > // ierr = MatMult(A,u,b);CHKERRQ(ierr); > > i=0; > ierr = VecSetValues(b, 1, &i, &leftbc, INSERT_VALUES);CHKERRQ(ierr); > for (i=1; i ierr = VecSetValues(b, n-2, &i, &hundredth, > INSERT_VALUES);CHKERRQ(ierr); > What is the line above intended to do? You are telling it to take n-2 values, but only giving it one value (hundreth) so it is indexing far outside the array. Matt > } > i=n-1; > ierr = VecSetValues(b, 1, &i, &rightbc, INSERT_VALUES);CHKERRQ(ierr); > ierr = VecAssemblyBegin(b);CHKERRQ(ierr); > ierr = VecAssemblyEnd(b);CHKERRQ(ierr); > > ierr = MatMult(A,u,b);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Create the linear solver and set various options > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > /* > Create linear solver context > */ > ierr = KSPCreate(PETSC_COMM_WORLD,&ksp);CHKERRQ(ierr); > > /* > Set operators. Here the matrix that defines the linear system > also serves as the preconditioning matrix. > */ > ierr = KSPSetOperators(ksp,A,A);CHKERRQ(ierr); > > /* > Test if you can change the KSP side and type after they have been > previously set > */ > ierr = > PetscOptionsGetBool(NULL,NULL,"-change_pc_side",&changepcside,NULL);CHKERRQ(ierr); > if (changepcside) { > ierr = KSPSetUp(ksp);CHKERRQ(ierr); > ierr = PetscOptionsInsertString(NULL,"-ksp_norm_type unpreconditioned > -ksp_pc_side right");CHKERRQ(ierr); > ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); > ierr = KSPSetUp(ksp);CHKERRQ(ierr); > } > > /* > Set linear solver defaults for this problem (optional). > - By extracting the KSP and PC contexts from the KSP context, > we can then directly call any KSP and PC routines to set > various options. > - The following four statements are optional; all of these > parameters could alternatively be specified at runtime via > KSPSetFromOptions(); > */ > ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr); > ierr = PCSetType(pc,PCJACOBI);CHKERRQ(ierr); > ierr = > KSPSetTolerances(ksp,1.e-5,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr); > > /* > Set runtime options, e.g., > -ksp_type -pc_type -ksp_monitor -ksp_rtol > These options will override those specified above as long as > KSPSetFromOptions() is called _after_ any other customization > routines. > */ > ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); > > if (nonzeroguess) { > PetscScalar p = .5; > ierr = VecSet(x,p);CHKERRQ(ierr); > ierr = KSPSetInitialGuessNonzero(ksp,PETSC_TRUE);CHKERRQ(ierr); > } > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Solve the linear system > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > /* > Solve linear system > */ > ierr = KSPSolve(ksp,b,x);CHKERRQ(ierr); > > /* > View solver info; we could instead use the option -ksp_view to > print this info to the screen at the conclusion of KSPSolve(). > */ > ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Check solution and clean up > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > /* > Check the error > */ > ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr); > ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr); > ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr); > ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, Iterations > %D\n",(double)norm,its);CHKERRQ(ierr); > > /* > Free work space. All PETSc objects should be destroyed when they > are no longer needed. > */ > ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = VecDestroy(&u);CHKERRQ(ierr); > ierr = VecDestroy(&b);CHKERRQ(ierr); ierr = MatDestroy(&A);CHKERRQ(ierr); > ierr = KSPDestroy(&ksp);CHKERRQ(ierr); > > /* > Always call PetscFinalize() before exiting a program. This routine > - finalizes the PETSc libraries as well as MPI > - provides summary and diagnostic information if certain runtime > options are chosen (e.g., -log_view). > */ > ierr = PetscFinalize(); > return ierr; > } > > But I got the following error message: > > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, > probably memory access out of range > [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger > [0]PETSC ERROR: or see > http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind > [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS > X to find memory corruption errors > [0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and > run > [0]PETSC ERROR: to get more information on the crash. > [0]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [0]PETSC ERROR: Signal received > [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html > for trouble shooting. > [0]PETSC ERROR: Petsc Release Version 3.8.3, Dec, 09, 2017 > [0]PETSC ERROR: ./ex1 on a arch-linux2-c-opt named huq2090 by huq2090 Wed > Jul 11 23:48:10 2018 > [0]PETSC ERROR: Configure options > --prefix=/opt/moose/petsc-3.8.3/mpich-3.2_gcc-7.3.0-opt --download-hypre=1 > --with-ssl=0 --with-debugging=no --with-pic=1 --with-shared-libraries=1 > --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --download-fblaslapack=1 > --download-metis=1 --download-parmetis=1 --download-superlu_dist=1 > --download-mumps=1 --download-scalapack=1 -CC=mpicc -CXX=mpicxx -FC=mpif90 > -F77=mpif77 -F90=mpif90 -CFLAGS="-fPIC -fopenmp" -CXXFLAGS="-fPIC -fopenmp" > -FFLAGS="-fPIC -fopenmp" -FCFLAGS="-fPIC -fopenmp" -F90FLAGS="-fPIC > -fopenmp" -F77FLAGS="-fPIC -fopenmp" > [0]PETSC ERROR: #1 User provided function() line 0 in unknown file > application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0 > [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=59 > : > system msg for write_line failure : Bad file descriptor > > And again, when I tried to solve the same code with another pc, I got > different error message attached herewith as an attachment. > > Can you please suggest me about what to do. > > Thanks. > > Best, > Huq > > > > > -- > > Fazlul Huq > Graduate Research Assistant > Department of Nuclear, Plasma & Radiological Engineering (NPRE) > University of Illinois at Urbana-Champaign (UIUC) > E-mail: huq2090 at gmail.com > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Thu Jul 12 06:28:11 2018 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 12 Jul 2018 07:28:11 -0400 Subject: [petsc-users] Problem in SNES In-Reply-To: <50c248e4-aed7-dacc-d7b0-914b15335e4c@cc.iut.ac.ir> References: <50c248e4-aed7-dacc-d7b0-914b15335e4c@cc.iut.ac.ir> Message-ID: On Thu, Jul 12, 2018 at 6:30 AM Ali Reza Khaz'ali wrote: > Hi, > > I have to apologize if I'm asking a noob question. I am trying to solve > y"-(1-x/5)yy'=x with boundary condition of y(1)=2 and y(3)=-1 with > finite difference method. The discretized equations is to be solved by > SNES. I wrote the follwoing code, however, it only works if number of > MPI processes is set to one. for more workers, it does not seem to give > valid results. I'd be grateful if anybody can guide me to debug the > code, please. > Why not just use DMDA? There are lots of examples (SNES ex5 for instance) and it handles the parallelism for you. This problem could be done in a few hours I think. Thanks, Matt > Regards, > > Ali > > > > static char help[] = "Newton's method for a non-linear ODE system.\n\n"; > double h; > int nParts; > > #include > > /* > User-defined routines > */ > extern PetscErrorCode FormJacobian(SNES, Vec, Mat, Mat, void*); > extern PetscErrorCode FormFunction(SNES, Vec, Vec, void*); > > int main(int argc, char **argv) > { > SNES snes; /* nonlinear solver context */ > KSP ksp; /* linear solver context */ > PC pc; /* preconditioner context */ > Vec x, r; /* solution, residual vectors */ > Mat J; /* Jacobian matrix */ > PetscErrorCode ierr; > PetscMPIInt size; > PetscScalar pfive = 0, *xx; > int rank; > int i, j; > Vec f; > > > nParts = 30; > h = (3.0 - 1.0) / nParts; > > ierr = PetscInitialize(&argc, &argv, (char*)0, help); if (ierr) > return ierr; > ierr = MPI_Comm_size(PETSC_COMM_WORLD, &size); CHKERRQ(ierr); > ierr = SNESCreate(PETSC_COMM_WORLD, &snes); CHKERRQ(ierr); > ierr = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, nParts-1, &x); > CHKERRQ(ierr); > ierr = VecDuplicate(x, &r); CHKERRQ(ierr); > ierr = MatCreateAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, > nParts - 1, nParts - 1, 3, NULL, 3, NULL, &J); CHKERRQ(ierr); > > > > > ierr = SNESSetFunction(snes, r, FormFunction, NULL); CHKERRQ(ierr); > ierr = SNESSetJacobian(snes, J, J, FormJacobian, NULL); CHKERRQ(ierr); > > > > ierr = SNESGetKSP(snes, &ksp); CHKERRQ(ierr); > ierr = KSPGetPC(ksp, &pc); CHKERRQ(ierr); > ierr = KSPSetTolerances(ksp, 1.e-8, 1e-16, PETSC_DEFAULT, 200); > CHKERRQ(ierr); > ierr = SNESSetTolerances(snes, 1.e-8, 1e-16, PETSC_DEFAULT, 200, > 200); CHKERRQ(ierr); > ierr = SNESSetType(snes, SNESNEWTONLS); CHKERRQ(ierr); > ierr = KSPSetType(ksp, KSPCG); CHKERRQ(ierr); > > ierr = SNESSetFromOptions(snes); CHKERRQ(ierr); > ierr = VecSet(x, pfive); CHKERRQ(ierr); > ierr = SNESSolve(snes, NULL, x); CHKERRQ(ierr); > ierr = SNESGetFunction(snes, &f, 0, 0); CHKERRQ(ierr); > > > > ierr = VecDestroy(&x); CHKERRQ(ierr); ierr = VecDestroy(&r); > CHKERRQ(ierr); > ierr = MatDestroy(&J); CHKERRQ(ierr); ierr = SNESDestroy(&snes); > CHKERRQ(ierr); > ierr = PetscFinalize(); > return ierr; > } > > PetscErrorCode FormFunction(SNES snes, Vec x, Vec f, void *ctx) > { > PetscErrorCode ierr; > const PetscScalar *xx; > PetscScalar *ff; > PetscInt vstart, vend; > int i, j, rank, size, xlength; > double xp, xxstart, xxend, x1, x2; > MPI_Status MyStat; > > xxstart = 0; > xxend = 0; > > > MPI_Comm_rank(PETSC_COMM_WORLD, &rank); > MPI_Comm_size(PETSC_COMM_WORLD, &size); > > ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); > xlength = vend - vstart; > ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); > ierr = VecGetArray(f, &ff); CHKERRQ(ierr); > ierr = VecView(x, PETSC_VIEWER_STDOUT_WORLD); > if (size > 1) { > if (rank == 0) { > ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, > PETSC_COMM_WORLD); > ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, > PETSC_COMM_WORLD, &MyStat); > } > else if (rank == (size - 1)) { > ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - > 1, PETSC_COMM_WORLD, &MyStat); > ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, > PETSC_COMM_WORLD); > } > else { > ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, > rank, PETSC_COMM_WORLD); > ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, > PETSC_COMM_WORLD, &MyStat); > ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, > PETSC_COMM_WORLD); > ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - > 1, PETSC_COMM_WORLD, &MyStat); > } > } > > > > > for (i = vstart; i < vend; i++) { > xp = 1 + i * h; > j = i - vstart; > > > if (i == vstart) x1 = xxstart; > else x1 = xx[j - 1]; > if (i == (vend - 1)) x2 = xxend; > else x2 = xx[j + 1]; > > > if (i==0) ff[j] = (x2 - 2 * xx[j] + 2) / (h*h) - (1 - xp / > 5)*xx[j] * (x2 - 2) / (2 * h) - xp; > else if (i==(nParts-2)) ff[j]=(-1 - 2 * xx[j] + x1) / (h*h) - > (1 - xp / 5)*xx[j] * (-1 - x1) / (2 * h) - xp; > else ff[j] = (x2 - 2 * xx[j] + x1) / (h*h) - (1 - xp / 5)*xx[j] > * (x2 - x1) / (2 * h) - xp; > } > > /* Restore vectors */ > ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); > ierr = VecRestoreArray(f, &ff); CHKERRQ(ierr); > return 0; > } > > PetscErrorCode FormJacobian(SNES snes, Vec x, Mat jac, Mat B, void *dummy) > { > const PetscScalar *xx; > PetscErrorCode ierr; > > PetscInt vstart, vend; > double rrow[3]; > int col[3]; > int i, j, rank, size, xlength; > double xp, xxstart, xxend, x1, x2; > MPI_Status MyStat; > > ierr = MatZeroEntries(jac); CHKERRQ(ierr); > > ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); > xlength = vend - vstart; > MPI_Comm_rank(PETSC_COMM_WORLD, &rank); > MPI_Comm_size(PETSC_COMM_WORLD, &size); > > xxstart = 0; > xxend = 0; > > /* > Get pointer to vector data.0+1 > */ > ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); > if (size > 1) { > if (rank == 0) { > ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, > PETSC_COMM_WORLD); > ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, > PETSC_COMM_WORLD, &MyStat); > xxstart = 1e12; > } > else if (rank == (size - 1)) { > ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - > 1, PETSC_COMM_WORLD, &MyStat); > ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, > PETSC_COMM_WORLD); > xxend = 1e12; > } > else { > ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, > rank, PETSC_COMM_WORLD); > ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, > PETSC_COMM_WORLD, &MyStat); > ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, > PETSC_COMM_WORLD); > ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - > 1, PETSC_COMM_WORLD, &MyStat); > } > } > > > for (i = vstart; i < vend; i++) { > xp = 1 + i * h; > j = i - vstart; > > if (i == vstart) x1 = xxstart; > else x1 = xx[j - 1]; > if (i == (vend - 1)) x2 = xxend; > else x2 = xx[j + 1]; > > if (i == 0) { > rrow[0] = -2 / (h*h) - (1 - xp / 5)*(x2 - 2) / (2 * h); > rrow[1] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); > col[0] = i; > col[1] = i + 1; > ierr = MatSetValues(jac, 1, &i, 2, col, rrow, > INSERT_VALUES); CHKERRQ(ierr); > } > else if (i == (nParts-2)) { > rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); > rrow[1] = -2 / (h*h) - (1 - xp / 5)*(-1 - x1) / (2 * h); > col[0] = i - 1; > col[1] = i; > ierr = MatSetValues(jac, 1, &i, 2, col, rrow, > INSERT_VALUES); CHKERRQ(ierr); > } > else { > rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); > rrow[1] = -2 / (h*h) - (1 - xp / 5)*(x2 - x1) / (2 * h); > rrow[2] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); > col[0] = i-1; > col[1] = i; > col[2] = i + 1; > ierr = MatSetValues(jac, 1, &i, 3, col, rrow, > INSERT_VALUES); CHKERRQ(ierr); > } > } > > > > /* > Restore vector > */ > ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); > > /* > Assemble matrix > */ > B = jac; > ierr = MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > ierr = MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > ierr = MatAssemblyBegin(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > ierr = MatAssemblyEnd(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > > return 0; > } > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From arkhazali at cc.iut.ac.ir Thu Jul 12 10:14:06 2018 From: arkhazali at cc.iut.ac.ir (Ali Reza Khaz'ali) Date: Thu, 12 Jul 2018 19:44:06 +0430 Subject: [petsc-users] Problem in SNES In-Reply-To: References: <50c248e4-aed7-dacc-d7b0-914b15335e4c@cc.iut.ac.ir> Message-ID: <438e4657-f3ee-e9e8-f4b3-e21378fd2cd7@cc.iut.ac.ir> Thanks very much for your answer, I am experimenting with SNES for now, however, my purpose is to solve a multi-physics large system with unstructured grids (Enhanced Oil Recovery simulation in fractured petroleum reservoirs to be specific, phase equilibrium and three phase flow equations must be solved simultaneously), where to the extend of my knowledge, no existing PETSc vector structure can be used. Therefore, I started with solving simple ODEs with SNES without using those structures. An interesting fact about my code samples is, with increasing the number of MPI workers, the number of SNES iterations (and hence, the precision of the solution) decrease. I'm sure there is a flaw in my code (I do not have much MPI experience), but I can't find it. Best wishes, Ali On 7/12/2018 3:58 PM, Matthew Knepley wrote: > On Thu, Jul 12, 2018 at 6:30 AM Ali Reza Khaz'ali > > wrote: > > Hi, > > I have to apologize if I'm asking a noob question. I am trying to > solve > y"-(1-x/5)yy'=x with boundary condition of y(1)=2 and y(3)=-1 with > finite difference method. The discretized equations is to be > solved by > SNES. I wrote the follwoing code, however, it only works if number of > MPI processes is set to one. for more workers, it does not seem to > give > valid results. I'd be grateful if anybody can guide me to debug the > code, please. > > > Why not just use DMDA? There are lots of examples (SNES ex5 for > instance) and it > handles the parallelism for you. This problem could be done in a few > hours I think. > > ? Thanks, > > ? ? ?Matt > > Regards, > > Ali > > > > static char help[] = "Newton's method for a non-linear ODE > system.\n\n"; > double h; > int nParts; > > #include > > /* > User-defined routines > */ > extern PetscErrorCode FormJacobian(SNES, Vec, Mat, Mat, void*); > extern PetscErrorCode FormFunction(SNES, Vec, Vec, void*); > > int main(int argc, char **argv) > { > ???? SNES?????????? snes;???????? /* nonlinear solver context */ > ???? KSP??????????? ksp;????????? /* linear solver context */ > ???? PC???????????? pc;?????????? /* preconditioner context */ > ???? Vec??????????? x, r;????????? /* solution, residual vectors */ > ???? Mat??????????? J;??????????? /* Jacobian matrix */ > ???? PetscErrorCode ierr; > ???? PetscMPIInt??? size; > ???? PetscScalar??? pfive = 0, *xx; > ???? int rank; > ???? int i, j; > ???? Vec f; > > > ???? nParts = 30; > ???? h = (3.0 - 1.0) / nParts; > > ???? ierr = PetscInitialize(&argc, &argv, (char*)0, help); if (ierr) > return ierr; > ???? ierr = MPI_Comm_size(PETSC_COMM_WORLD, &size); CHKERRQ(ierr); > ???? ierr = SNESCreate(PETSC_COMM_WORLD, &snes); CHKERRQ(ierr); > ???? ierr = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, nParts-1, > &x); > CHKERRQ(ierr); > ???? ierr = VecDuplicate(x, &r); CHKERRQ(ierr); > ???? ierr = MatCreateAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, > PETSC_DECIDE, > nParts - 1, nParts - 1, 3, NULL, 3, NULL, &J); CHKERRQ(ierr); > > > > > ???? ierr = SNESSetFunction(snes, r, FormFunction, NULL); > CHKERRQ(ierr); > ???? ierr = SNESSetJacobian(snes, J, J, FormJacobian, NULL); > CHKERRQ(ierr); > > > > ???? ierr = SNESGetKSP(snes, &ksp); CHKERRQ(ierr); > ???? ierr = KSPGetPC(ksp, &pc); CHKERRQ(ierr); > ???? ierr = KSPSetTolerances(ksp, 1.e-8, 1e-16, PETSC_DEFAULT, 200); > CHKERRQ(ierr); > ???? ierr = SNESSetTolerances(snes, 1.e-8, 1e-16, PETSC_DEFAULT, 200, > 200); CHKERRQ(ierr); > ???? ierr = SNESSetType(snes, SNESNEWTONLS); CHKERRQ(ierr); > ???? ierr = KSPSetType(ksp, KSPCG); CHKERRQ(ierr); > > ???? ierr = SNESSetFromOptions(snes); CHKERRQ(ierr); > ???? ierr = VecSet(x, pfive); CHKERRQ(ierr); > ???? ierr = SNESSolve(snes, NULL, x); CHKERRQ(ierr); > ???? ierr = SNESGetFunction(snes, &f, 0, 0); CHKERRQ(ierr); > > > > ???? ierr = VecDestroy(&x); CHKERRQ(ierr); ierr = VecDestroy(&r); > CHKERRQ(ierr); > ???? ierr = MatDestroy(&J); CHKERRQ(ierr); ierr = SNESDestroy(&snes); > CHKERRQ(ierr); > ???? ierr = PetscFinalize(); > ???? return ierr; > } > > PetscErrorCode FormFunction(SNES snes, Vec x, Vec f, void *ctx) > { > ???? PetscErrorCode??? ierr; > ???? const PetscScalar *xx; > ???? PetscScalar?????? *ff; > ???? PetscInt vstart, vend; > ???? int i, j, rank, size, xlength; > ???? double xp, xxstart, xxend, x1, x2; > ???? MPI_Status MyStat; > > ???? xxstart = 0; > ???? xxend = 0; > > > ???? MPI_Comm_rank(PETSC_COMM_WORLD, &rank); > ???? MPI_Comm_size(PETSC_COMM_WORLD, &size); > > ???? ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); > ???? xlength = vend - vstart; > ???? ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); > ???? ierr = VecGetArray(f, &ff); CHKERRQ(ierr); > ???? ierr = VecView(x, PETSC_VIEWER_STDOUT_WORLD); > ???? if (size > 1) { > ???? ??? if (rank == 0) { > ???? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, > PETSC_COMM_WORLD); > ???? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, > PETSC_COMM_WORLD, &MyStat); > ???? ??? } > ???? ??? else if (rank == (size - 1)) { > ???? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, > rank - > 1, PETSC_COMM_WORLD, &MyStat); > ???? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, > PETSC_COMM_WORLD); > ???? ??? } > ???? ??? else { > ???? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank > + 1, > rank, PETSC_COMM_WORLD); > ???? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank > + 1, > PETSC_COMM_WORLD, &MyStat); > ???? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, > PETSC_COMM_WORLD); > ???? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, > rank - > 1, PETSC_COMM_WORLD, &MyStat); > ???? ??? } > ???? } > > > > > ???? for (i = vstart; i < vend; i++) { > ???? ??? xp = 1 + i * h; > ???? ??? j = i - vstart; > > > ???? ??? if (i == vstart) x1 = xxstart; > ???? ??? else x1 = xx[j - 1]; > ???? ??? if (i == (vend - 1)) x2 = xxend; > ???? ??? else x2 = xx[j + 1]; > > > ???? ??? if (i==0) ff[j] = (x2 - 2 * xx[j] + 2) / (h*h) - (1 - xp / > 5)*xx[j] * (x2 - 2) / (2 * h) - xp; > ???? ??? else if (i==(nParts-2)) ff[j]=(-1 - 2 * xx[j] + x1) / > (h*h) - > (1 - xp / 5)*xx[j] * (-1 - x1) / (2 * h) - xp; > ???? ??? else ff[j] = (x2 - 2 * xx[j] + x1) / (h*h) - (1 - xp / > 5)*xx[j] > * (x2 - x1) / (2 * h) - xp; > ???? } > > ???? /* Restore vectors */ > ???? ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); > ???? ierr = VecRestoreArray(f, &ff); CHKERRQ(ierr); > ???? return 0; > } > > PetscErrorCode FormJacobian(SNES snes, Vec x, Mat jac, Mat B, void > *dummy) > { > ???? const PetscScalar *xx; > ???? PetscErrorCode??? ierr; > > ???? PetscInt vstart, vend; > ???? double rrow[3]; > ???? int col[3]; > ???? int i, j, rank, size, xlength; > ???? double xp, xxstart, xxend, x1, x2; > ???? MPI_Status MyStat; > > ???? ierr = MatZeroEntries(jac); CHKERRQ(ierr); > > ???? ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); > ???? xlength = vend - vstart; > ???? MPI_Comm_rank(PETSC_COMM_WORLD, &rank); > ???? MPI_Comm_size(PETSC_COMM_WORLD, &size); > > ???? xxstart = 0; > ???? xxend = 0; > > ???? /* > ???? Get pointer to vector data.0+1 > ???? */ > ???? ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); > ???? if (size > 1) { > ???? ??? if (rank == 0) { > ???? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, > PETSC_COMM_WORLD); > ???? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, > PETSC_COMM_WORLD, &MyStat); > ???? ??? ??? xxstart = 1e12; > ???? ??? } > ???? ??? else if (rank == (size - 1)) { > ???? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, > rank - > 1, PETSC_COMM_WORLD, &MyStat); > ???? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, > PETSC_COMM_WORLD); > ???? ??? ??? xxend = 1e12; > ???? ??? } > ???? ??? else { > ???? ??? ??? ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank > + 1, > rank, PETSC_COMM_WORLD); > ???? ??? ??? ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank > + 1, > PETSC_COMM_WORLD, &MyStat); > ???? ??? ??? ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, > PETSC_COMM_WORLD); > ???? ??? ??? ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, > rank - > 1, PETSC_COMM_WORLD, &MyStat); > ???? ??? } > ???? } > > > ???? for (i = vstart; i < vend; i++) { > ???? ??? xp = 1 + i * h; > ???? ??? j = i - vstart; > > ???? ??? if (i == vstart) x1 = xxstart; > ???? ??? else x1 = xx[j - 1]; > ???? ??? if (i == (vend - 1)) x2 = xxend; > ???? ??? else x2 = xx[j + 1]; > > ???? ??? if (i == 0) { > ???? ??? ??? rrow[0] = -2 / (h*h) - (1 - xp / 5)*(x2 - 2) / (2 * h); > ???? ??? ??? rrow[1] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); > ???? ??? ??? col[0] = i; > ???? ??? ??? col[1] = i + 1; > ???? ??? ??? ierr = MatSetValues(jac, 1, &i, 2, col, rrow, > INSERT_VALUES); CHKERRQ(ierr); > ???? ??? } > ???? ??? else if (i == (nParts-2)) { > ???? ??? ??? rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); > ???? ??? ??? rrow[1] = -2 / (h*h) - (1 - xp / 5)*(-1 - x1) / (2 * h); > ???? ??? ??? col[0] = i - 1; > ???? ??? ??? col[1] = i; > ???? ??? ??? ierr = MatSetValues(jac, 1, &i, 2, col, rrow, > INSERT_VALUES); CHKERRQ(ierr); > ???? ??? } > ???? ??? else { > ???? ??? ??? rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); > ???? ??? ??? rrow[1] = -2 / (h*h) - (1 - xp / 5)*(x2 - x1) / (2 * h); > ???? ??? ??? rrow[2] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); > ???? ??? ??? col[0] = i-1; > ???? ??? ??? col[1] = i; > ???? ??? ??? col[2] = i + 1; > ???? ??? ??? ierr = MatSetValues(jac, 1, &i, 3, col, rrow, > INSERT_VALUES); CHKERRQ(ierr); > ???? ??? } > ???? } > > > > ???? /* > ???? Restore vector > ???? */ > ???? ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); > > ???? /* > ???? Assemble matrix > ???? */ > ???? B = jac; > ???? ierr = MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > ???? ierr = MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > ???? ierr = MatAssemblyBegin(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > ???? ierr = MatAssemblyEnd(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > > ???? return 0; > } > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which > their experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Thu Jul 12 10:30:15 2018 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 12 Jul 2018 11:30:15 -0400 Subject: [petsc-users] Problem in SNES In-Reply-To: <438e4657-f3ee-e9e8-f4b3-e21378fd2cd7@cc.iut.ac.ir> References: <50c248e4-aed7-dacc-d7b0-914b15335e4c@cc.iut.ac.ir> <438e4657-f3ee-e9e8-f4b3-e21378fd2cd7@cc.iut.ac.ir> Message-ID: On Thu, Jul 12, 2018 at 11:14 AM Ali Reza Khaz'ali wrote: > Thanks very much for your answer, > > I am experimenting with SNES for now, however, my purpose is to solve a > multi-physics large system with unstructured grids (Enhanced Oil Recovery > simulation in fractured petroleum reservoirs to be specific, phase > equilibrium and three phase flow equations must be solved simultaneously), > where to the extend of my knowledge, no existing PETSc vector structure can > be used. Therefore, I started with solving simple ODEs with SNES without > using those structures. > The intention is that you use DMPlex for this. > An interesting fact about my code samples is, with increasing the number > of MPI workers, the number of SNES iterations (and hence, the precision of > the solution) decrease. I'm sure there is a flaw in my code (I do not have > much MPI experience), but I can't find it. > We really do not have the resources to debug raw MPI code. That is why we have the examples. Thanks, Matt > Best wishes, > > Ali > > On 7/12/2018 3:58 PM, Matthew Knepley wrote: > > On Thu, Jul 12, 2018 at 6:30 AM Ali Reza Khaz'ali > wrote: > >> Hi, >> >> I have to apologize if I'm asking a noob question. I am trying to solve >> y"-(1-x/5)yy'=x with boundary condition of y(1)=2 and y(3)=-1 with >> finite difference method. The discretized equations is to be solved by >> SNES. I wrote the follwoing code, however, it only works if number of >> MPI processes is set to one. for more workers, it does not seem to give >> valid results. I'd be grateful if anybody can guide me to debug the >> code, please. >> > > Why not just use DMDA? There are lots of examples (SNES ex5 for instance) > and it > handles the parallelism for you. This problem could be done in a few hours > I think. > > Thanks, > > Matt > > >> Regards, >> >> Ali >> >> >> >> static char help[] = "Newton's method for a non-linear ODE system.\n\n"; >> double h; >> int nParts; >> >> #include >> >> /* >> User-defined routines >> */ >> extern PetscErrorCode FormJacobian(SNES, Vec, Mat, Mat, void*); >> extern PetscErrorCode FormFunction(SNES, Vec, Vec, void*); >> >> int main(int argc, char **argv) >> { >> SNES snes; /* nonlinear solver context */ >> KSP ksp; /* linear solver context */ >> PC pc; /* preconditioner context */ >> Vec x, r; /* solution, residual vectors */ >> Mat J; /* Jacobian matrix */ >> PetscErrorCode ierr; >> PetscMPIInt size; >> PetscScalar pfive = 0, *xx; >> int rank; >> int i, j; >> Vec f; >> >> >> nParts = 30; >> h = (3.0 - 1.0) / nParts; >> >> ierr = PetscInitialize(&argc, &argv, (char*)0, help); if (ierr) >> return ierr; >> ierr = MPI_Comm_size(PETSC_COMM_WORLD, &size); CHKERRQ(ierr); >> ierr = SNESCreate(PETSC_COMM_WORLD, &snes); CHKERRQ(ierr); >> ierr = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, nParts-1, &x); >> CHKERRQ(ierr); >> ierr = VecDuplicate(x, &r); CHKERRQ(ierr); >> ierr = MatCreateAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, >> nParts - 1, nParts - 1, 3, NULL, 3, NULL, &J); CHKERRQ(ierr); >> >> >> >> >> ierr = SNESSetFunction(snes, r, FormFunction, NULL); CHKERRQ(ierr); >> ierr = SNESSetJacobian(snes, J, J, FormJacobian, NULL); >> CHKERRQ(ierr); >> >> >> >> ierr = SNESGetKSP(snes, &ksp); CHKERRQ(ierr); >> ierr = KSPGetPC(ksp, &pc); CHKERRQ(ierr); >> ierr = KSPSetTolerances(ksp, 1.e-8, 1e-16, PETSC_DEFAULT, 200); >> CHKERRQ(ierr); >> ierr = SNESSetTolerances(snes, 1.e-8, 1e-16, PETSC_DEFAULT, 200, >> 200); CHKERRQ(ierr); >> ierr = SNESSetType(snes, SNESNEWTONLS); CHKERRQ(ierr); >> ierr = KSPSetType(ksp, KSPCG); CHKERRQ(ierr); >> >> ierr = SNESSetFromOptions(snes); CHKERRQ(ierr); >> ierr = VecSet(x, pfive); CHKERRQ(ierr); >> ierr = SNESSolve(snes, NULL, x); CHKERRQ(ierr); >> ierr = SNESGetFunction(snes, &f, 0, 0); CHKERRQ(ierr); >> >> >> >> ierr = VecDestroy(&x); CHKERRQ(ierr); ierr = VecDestroy(&r); >> CHKERRQ(ierr); >> ierr = MatDestroy(&J); CHKERRQ(ierr); ierr = SNESDestroy(&snes); >> CHKERRQ(ierr); >> ierr = PetscFinalize(); >> return ierr; >> } >> >> PetscErrorCode FormFunction(SNES snes, Vec x, Vec f, void *ctx) >> { >> PetscErrorCode ierr; >> const PetscScalar *xx; >> PetscScalar *ff; >> PetscInt vstart, vend; >> int i, j, rank, size, xlength; >> double xp, xxstart, xxend, x1, x2; >> MPI_Status MyStat; >> >> xxstart = 0; >> xxend = 0; >> >> >> MPI_Comm_rank(PETSC_COMM_WORLD, &rank); >> MPI_Comm_size(PETSC_COMM_WORLD, &size); >> >> ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); >> xlength = vend - vstart; >> ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); >> ierr = VecGetArray(f, &ff); CHKERRQ(ierr); >> ierr = VecView(x, PETSC_VIEWER_STDOUT_WORLD); >> if (size > 1) { >> if (rank == 0) { >> ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, >> PETSC_COMM_WORLD); >> ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, >> PETSC_COMM_WORLD, &MyStat); >> } >> else if (rank == (size - 1)) { >> ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - >> 1, PETSC_COMM_WORLD, &MyStat); >> ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, >> PETSC_COMM_WORLD); >> } >> else { >> ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, >> rank, PETSC_COMM_WORLD); >> ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, >> PETSC_COMM_WORLD, &MyStat); >> ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, >> PETSC_COMM_WORLD); >> ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - >> 1, PETSC_COMM_WORLD, &MyStat); >> } >> } >> >> >> >> >> for (i = vstart; i < vend; i++) { >> xp = 1 + i * h; >> j = i - vstart; >> >> >> if (i == vstart) x1 = xxstart; >> else x1 = xx[j - 1]; >> if (i == (vend - 1)) x2 = xxend; >> else x2 = xx[j + 1]; >> >> >> if (i==0) ff[j] = (x2 - 2 * xx[j] + 2) / (h*h) - (1 - xp / >> 5)*xx[j] * (x2 - 2) / (2 * h) - xp; >> else if (i==(nParts-2)) ff[j]=(-1 - 2 * xx[j] + x1) / (h*h) - >> (1 - xp / 5)*xx[j] * (-1 - x1) / (2 * h) - xp; >> else ff[j] = (x2 - 2 * xx[j] + x1) / (h*h) - (1 - xp / 5)*xx[j] >> * (x2 - x1) / (2 * h) - xp; >> } >> >> /* Restore vectors */ >> ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); >> ierr = VecRestoreArray(f, &ff); CHKERRQ(ierr); >> return 0; >> } >> >> PetscErrorCode FormJacobian(SNES snes, Vec x, Mat jac, Mat B, void *dummy) >> { >> const PetscScalar *xx; >> PetscErrorCode ierr; >> >> PetscInt vstart, vend; >> double rrow[3]; >> int col[3]; >> int i, j, rank, size, xlength; >> double xp, xxstart, xxend, x1, x2; >> MPI_Status MyStat; >> >> ierr = MatZeroEntries(jac); CHKERRQ(ierr); >> >> ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); >> xlength = vend - vstart; >> MPI_Comm_rank(PETSC_COMM_WORLD, &rank); >> MPI_Comm_size(PETSC_COMM_WORLD, &size); >> >> xxstart = 0; >> xxend = 0; >> >> /* >> Get pointer to vector data.0+1 >> */ >> ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); >> if (size > 1) { >> if (rank == 0) { >> ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, >> PETSC_COMM_WORLD); >> ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, >> PETSC_COMM_WORLD, &MyStat); >> xxstart = 1e12; >> } >> else if (rank == (size - 1)) { >> ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - >> 1, PETSC_COMM_WORLD, &MyStat); >> ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, >> PETSC_COMM_WORLD); >> xxend = 1e12; >> } >> else { >> ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, >> rank, PETSC_COMM_WORLD); >> ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, >> PETSC_COMM_WORLD, &MyStat); >> ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, >> PETSC_COMM_WORLD); >> ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - >> 1, PETSC_COMM_WORLD, &MyStat); >> } >> } >> >> >> for (i = vstart; i < vend; i++) { >> xp = 1 + i * h; >> j = i - vstart; >> >> if (i == vstart) x1 = xxstart; >> else x1 = xx[j - 1]; >> if (i == (vend - 1)) x2 = xxend; >> else x2 = xx[j + 1]; >> >> if (i == 0) { >> rrow[0] = -2 / (h*h) - (1 - xp / 5)*(x2 - 2) / (2 * h); >> rrow[1] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); >> col[0] = i; >> col[1] = i + 1; >> ierr = MatSetValues(jac, 1, &i, 2, col, rrow, >> INSERT_VALUES); CHKERRQ(ierr); >> } >> else if (i == (nParts-2)) { >> rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); >> rrow[1] = -2 / (h*h) - (1 - xp / 5)*(-1 - x1) / (2 * h); >> col[0] = i - 1; >> col[1] = i; >> ierr = MatSetValues(jac, 1, &i, 2, col, rrow, >> INSERT_VALUES); CHKERRQ(ierr); >> } >> else { >> rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); >> rrow[1] = -2 / (h*h) - (1 - xp / 5)*(x2 - x1) / (2 * h); >> rrow[2] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); >> col[0] = i-1; >> col[1] = i; >> col[2] = i + 1; >> ierr = MatSetValues(jac, 1, &i, 3, col, rrow, >> INSERT_VALUES); CHKERRQ(ierr); >> } >> } >> >> >> >> /* >> Restore vector >> */ >> ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); >> >> /* >> Assemble matrix >> */ >> B = jac; >> ierr = MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); >> ierr = MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); >> ierr = MatAssemblyBegin(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); >> ierr = MatAssemblyEnd(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); >> >> return 0; >> } >> >> > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From adenchfi at hawk.iit.edu Thu Jul 12 11:12:03 2018 From: adenchfi at hawk.iit.edu (Adam Denchfield) Date: Thu, 12 Jul 2018 11:12:03 -0500 Subject: [petsc-users] Problem in SNES In-Reply-To: References: <50c248e4-aed7-dacc-d7b0-914b15335e4c@cc.iut.ac.ir> <438e4657-f3ee-e9e8-f4b3-e21378fd2cd7@cc.iut.ac.ir> Message-ID: You may want to look at DMNetwork since you are doing a multi-physics system, http://www.mcs.anl.gov/papers/P7065-0617.pdf. Regards, *Adam Denchfield* *Peer Career Coach - Career Services* Illinois Institute of Technology *Bachelors of Science in Applied Physics (2018)* Email: adenchfi at hawk.iit.edu My LinkedIn My ResearchGate Profile On Thu, Jul 12, 2018 at 10:30 AM, Matthew Knepley wrote: > On Thu, Jul 12, 2018 at 11:14 AM Ali Reza Khaz'ali > wrote: > >> Thanks very much for your answer, >> >> I am experimenting with SNES for now, however, my purpose is to solve a >> multi-physics large system with unstructured grids (Enhanced Oil Recovery >> simulation in fractured petroleum reservoirs to be specific, phase >> equilibrium and three phase flow equations must be solved simultaneously), >> where to the extend of my knowledge, no existing PETSc vector structure can >> be used. Therefore, I started with solving simple ODEs with SNES without >> using those structures. >> > The intention is that you use DMPlex for this. > >> An interesting fact about my code samples is, with increasing the number >> of MPI workers, the number of SNES iterations (and hence, the precision of >> the solution) decrease. I'm sure there is a flaw in my code (I do not have >> much MPI experience), but I can't find it. >> > We really do not have the resources to debug raw MPI code. That is why we > have the examples. > > Thanks, > > Matt > >> Best wishes, >> >> Ali >> >> On 7/12/2018 3:58 PM, Matthew Knepley wrote: >> >> On Thu, Jul 12, 2018 at 6:30 AM Ali Reza Khaz'ali >> wrote: >> >>> Hi, >>> >>> I have to apologize if I'm asking a noob question. I am trying to solve >>> y"-(1-x/5)yy'=x with boundary condition of y(1)=2 and y(3)=-1 with >>> finite difference method. The discretized equations is to be solved by >>> SNES. I wrote the follwoing code, however, it only works if number of >>> MPI processes is set to one. for more workers, it does not seem to give >>> valid results. I'd be grateful if anybody can guide me to debug the >>> code, please. >>> >> >> Why not just use DMDA? There are lots of examples (SNES ex5 for instance) >> and it >> handles the parallelism for you. This problem could be done in a few >> hours I think. >> >> Thanks, >> >> Matt >> >> >>> Regards, >>> >>> Ali >>> >>> >>> >>> static char help[] = "Newton's method for a non-linear ODE system.\n\n"; >>> double h; >>> int nParts; >>> >>> #include >>> >>> /* >>> User-defined routines >>> */ >>> extern PetscErrorCode FormJacobian(SNES, Vec, Mat, Mat, void*); >>> extern PetscErrorCode FormFunction(SNES, Vec, Vec, void*); >>> >>> int main(int argc, char **argv) >>> { >>> SNES snes; /* nonlinear solver context */ >>> KSP ksp; /* linear solver context */ >>> PC pc; /* preconditioner context */ >>> Vec x, r; /* solution, residual vectors */ >>> Mat J; /* Jacobian matrix */ >>> PetscErrorCode ierr; >>> PetscMPIInt size; >>> PetscScalar pfive = 0, *xx; >>> int rank; >>> int i, j; >>> Vec f; >>> >>> >>> nParts = 30; >>> h = (3.0 - 1.0) / nParts; >>> >>> ierr = PetscInitialize(&argc, &argv, (char*)0, help); if (ierr) >>> return ierr; >>> ierr = MPI_Comm_size(PETSC_COMM_WORLD, &size); CHKERRQ(ierr); >>> ierr = SNESCreate(PETSC_COMM_WORLD, &snes); CHKERRQ(ierr); >>> ierr = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, nParts-1, &x); >>> CHKERRQ(ierr); >>> ierr = VecDuplicate(x, &r); CHKERRQ(ierr); >>> ierr = MatCreateAIJ(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, >>> nParts - 1, nParts - 1, 3, NULL, 3, NULL, &J); CHKERRQ(ierr); >>> >>> >>> >>> >>> ierr = SNESSetFunction(snes, r, FormFunction, NULL); CHKERRQ(ierr); >>> ierr = SNESSetJacobian(snes, J, J, FormJacobian, NULL); >>> CHKERRQ(ierr); >>> >>> >>> >>> ierr = SNESGetKSP(snes, &ksp); CHKERRQ(ierr); >>> ierr = KSPGetPC(ksp, &pc); CHKERRQ(ierr); >>> ierr = KSPSetTolerances(ksp, 1.e-8, 1e-16, PETSC_DEFAULT, 200); >>> CHKERRQ(ierr); >>> ierr = SNESSetTolerances(snes, 1.e-8, 1e-16, PETSC_DEFAULT, 200, >>> 200); CHKERRQ(ierr); >>> ierr = SNESSetType(snes, SNESNEWTONLS); CHKERRQ(ierr); >>> ierr = KSPSetType(ksp, KSPCG); CHKERRQ(ierr); >>> >>> ierr = SNESSetFromOptions(snes); CHKERRQ(ierr); >>> ierr = VecSet(x, pfive); CHKERRQ(ierr); >>> ierr = SNESSolve(snes, NULL, x); CHKERRQ(ierr); >>> ierr = SNESGetFunction(snes, &f, 0, 0); CHKERRQ(ierr); >>> >>> >>> >>> ierr = VecDestroy(&x); CHKERRQ(ierr); ierr = VecDestroy(&r); >>> CHKERRQ(ierr); >>> ierr = MatDestroy(&J); CHKERRQ(ierr); ierr = SNESDestroy(&snes); >>> CHKERRQ(ierr); >>> ierr = PetscFinalize(); >>> return ierr; >>> } >>> >>> PetscErrorCode FormFunction(SNES snes, Vec x, Vec f, void *ctx) >>> { >>> PetscErrorCode ierr; >>> const PetscScalar *xx; >>> PetscScalar *ff; >>> PetscInt vstart, vend; >>> int i, j, rank, size, xlength; >>> double xp, xxstart, xxend, x1, x2; >>> MPI_Status MyStat; >>> >>> xxstart = 0; >>> xxend = 0; >>> >>> >>> MPI_Comm_rank(PETSC_COMM_WORLD, &rank); >>> MPI_Comm_size(PETSC_COMM_WORLD, &size); >>> >>> ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); >>> xlength = vend - vstart; >>> ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); >>> ierr = VecGetArray(f, &ff); CHKERRQ(ierr); >>> ierr = VecView(x, PETSC_VIEWER_STDOUT_WORLD); >>> if (size > 1) { >>> if (rank == 0) { >>> ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, >>> PETSC_COMM_WORLD); >>> ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, >>> PETSC_COMM_WORLD, &MyStat); >>> } >>> else if (rank == (size - 1)) { >>> ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - >>> 1, PETSC_COMM_WORLD, &MyStat); >>> ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, >>> PETSC_COMM_WORLD); >>> } >>> else { >>> ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, >>> rank, PETSC_COMM_WORLD); >>> ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, >>> PETSC_COMM_WORLD, &MyStat); >>> ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, >>> PETSC_COMM_WORLD); >>> ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - >>> 1, PETSC_COMM_WORLD, &MyStat); >>> } >>> } >>> >>> >>> >>> >>> for (i = vstart; i < vend; i++) { >>> xp = 1 + i * h; >>> j = i - vstart; >>> >>> >>> if (i == vstart) x1 = xxstart; >>> else x1 = xx[j - 1]; >>> if (i == (vend - 1)) x2 = xxend; >>> else x2 = xx[j + 1]; >>> >>> >>> if (i==0) ff[j] = (x2 - 2 * xx[j] + 2) / (h*h) - (1 - xp / >>> 5)*xx[j] * (x2 - 2) / (2 * h) - xp; >>> else if (i==(nParts-2)) ff[j]=(-1 - 2 * xx[j] + x1) / (h*h) - >>> (1 - xp / 5)*xx[j] * (-1 - x1) / (2 * h) - xp; >>> else ff[j] = (x2 - 2 * xx[j] + x1) / (h*h) - (1 - xp / 5)*xx[j] >>> * (x2 - x1) / (2 * h) - xp; >>> } >>> >>> /* Restore vectors */ >>> ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); >>> ierr = VecRestoreArray(f, &ff); CHKERRQ(ierr); >>> return 0; >>> } >>> >>> PetscErrorCode FormJacobian(SNES snes, Vec x, Mat jac, Mat B, void >>> *dummy) >>> { >>> const PetscScalar *xx; >>> PetscErrorCode ierr; >>> >>> PetscInt vstart, vend; >>> double rrow[3]; >>> int col[3]; >>> int i, j, rank, size, xlength; >>> double xp, xxstart, xxend, x1, x2; >>> MPI_Status MyStat; >>> >>> ierr = MatZeroEntries(jac); CHKERRQ(ierr); >>> >>> ierr = VecGetOwnershipRange(x, &vstart, &vend); CHKERRQ(ierr); >>> xlength = vend - vstart; >>> MPI_Comm_rank(PETSC_COMM_WORLD, &rank); >>> MPI_Comm_size(PETSC_COMM_WORLD, &size); >>> >>> xxstart = 0; >>> xxend = 0; >>> >>> /* >>> Get pointer to vector data.0+1 >>> */ >>> ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr); >>> if (size > 1) { >>> if (rank == 0) { >>> ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, 1, 0, >>> PETSC_COMM_WORLD); >>> ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, 1, 1, >>> PETSC_COMM_WORLD, &MyStat); >>> xxstart = 1e12; >>> } >>> else if (rank == (size - 1)) { >>> ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - >>> 1, PETSC_COMM_WORLD, &MyStat); >>> ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, >>> PETSC_COMM_WORLD); >>> xxend = 1e12; >>> } >>> else { >>> ierr = MPI_Send(&xx[xlength - 1], 1, MPI_DOUBLE, rank + 1, >>> rank, PETSC_COMM_WORLD); >>> ierr = MPI_Recv(&xxend, 1, MPI_DOUBLE, rank + 1, rank + 1, >>> PETSC_COMM_WORLD, &MyStat); >>> ierr = MPI_Send(&xx[0], 1, MPI_DOUBLE, rank - 1, rank, >>> PETSC_COMM_WORLD); >>> ierr = MPI_Recv(&xxstart, 1, MPI_DOUBLE, rank - 1, rank - >>> 1, PETSC_COMM_WORLD, &MyStat); >>> } >>> } >>> >>> >>> for (i = vstart; i < vend; i++) { >>> xp = 1 + i * h; >>> j = i - vstart; >>> >>> if (i == vstart) x1 = xxstart; >>> else x1 = xx[j - 1]; >>> if (i == (vend - 1)) x2 = xxend; >>> else x2 = xx[j + 1]; >>> >>> if (i == 0) { >>> rrow[0] = -2 / (h*h) - (1 - xp / 5)*(x2 - 2) / (2 * h); >>> rrow[1] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); >>> col[0] = i; >>> col[1] = i + 1; >>> ierr = MatSetValues(jac, 1, &i, 2, col, rrow, >>> INSERT_VALUES); CHKERRQ(ierr); >>> } >>> else if (i == (nParts-2)) { >>> rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); >>> rrow[1] = -2 / (h*h) - (1 - xp / 5)*(-1 - x1) / (2 * h); >>> col[0] = i - 1; >>> col[1] = i; >>> ierr = MatSetValues(jac, 1, &i, 2, col, rrow, >>> INSERT_VALUES); CHKERRQ(ierr); >>> } >>> else { >>> rrow[0] = 1 / (h*h) + (1 + xp / 5)*xx[j] / (2 * h); >>> rrow[1] = -2 / (h*h) - (1 - xp / 5)*(x2 - x1) / (2 * h); >>> rrow[2] = 1 / (h*h) - (1 + xp / 5)*xx[j] / (2 * h); >>> col[0] = i-1; >>> col[1] = i; >>> col[2] = i + 1; >>> ierr = MatSetValues(jac, 1, &i, 3, col, rrow, >>> INSERT_VALUES); CHKERRQ(ierr); >>> } >>> } >>> >>> >>> >>> /* >>> Restore vector >>> */ >>> ierr = VecRestoreArrayRead(x, &xx); CHKERRQ(ierr); >>> >>> /* >>> Assemble matrix >>> */ >>> B = jac; >>> ierr = MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); >>> ierr = MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); >>> ierr = MatAssemblyBegin(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); >>> ierr = MatAssemblyEnd(jac, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); >>> >>> return 0; >>> } >>> >>> >> >> -- >> What most experimenters take for granted before they begin their >> experiments is infinitely more interesting than any results to which their >> experiments lead. >> -- Norbert Wiener >> >> https://www.cse.buffalo.edu/~knepley/ >> >> >> > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Thu Jul 12 15:52:26 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Thu, 12 Jul 2018 20:52:26 +0000 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: <90DFBA32-7EF5-4378-ACB9-DAEC27A669D8@mcs.anl.gov> Message-ID: The communicator used to construct the IS must be the same communicator as used to construct the matrix, in your case PETSC_COMM_WORLD. Barry I will add an error check in the maint branch to catch these bugs in the future. It just so happens that you can use the PETSC_COMM_SELF communicator for AIJ matrices. > On Jul 11, 2018, at 9:54 PM, Marius Buerkle wrote: > > here some example code which works for MPIAIJ but fails for MPIDENSE. Maybe you can tell me what I am doing wrong > > > program submatrix > #include > use petscmat > implicit none > > Mat :: A,B > PetscInt ::n,m,nl1,nl2,nlc1,nlc2,nproc,iproc,i,ncols,nrow,ncol > PetscReal :: info(MAT_INFO_SIZE) > PetscErrorCode :: ierr > IS :: isrow,iscol > integer,allocatable :: irow(:),icol(:),cols(:) > character(256) :: stype,sdummy > > call PetscInitialize(PETSC_NULL_CHARACTER,ierr) > > call MPI_COMM_SIZE(PETSC_COMM_WORLD, nproc,ierr) > > call MPI_Comm_rank(PETSC_COMM_WORLD, iproc, ierr ) > > if (nproc.ne.3) then > if (iproc.eq.0) write(0,*) "nproc.ne.3 ",nproc > call PetscFinalize(ierr) > stop > end if > > n=3 > m=n > > call MatCreateDense(PETSC_COMM_WORLD,1,PETSC_DECIDE,n,m,PETSC_NULL_SCALAR,A,ierr) > call MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY,ierr) > call MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY,ierr) > > allocate(irow(1),icol(1)) > > !~ call MatConvert(A,MATAIJ, MAT_INPLACE_MATRIX,A,ierr) > > nrow=0 > ncol=1 > icol=iproc > if (iproc.eq.0) then > irow=iproc > nrow=1 > end if > call ISCreateGeneral(PETSC_COMM_SELF,nrow,irow,& > & PETSC_COPY_VALUES,isrow,ierr) > > call ISCreateGeneral(PETSC_COMM_SELF,ncol,icol,& > & PETSC_COPY_VALUES,iscol,ierr) > > call MatCreateSubMatrix(A,isrow,iscol,MAT_INITIAL_MATRIX,B,ierr) > > call MatGetType(B,stype,ierr) > call MatGetInfo(B, MAT_LOCAL, info,ierr) > call MatGetOwnershipRange(B,nl1,nl2,ierr) > call MatGetOwnershipRangeColumn(B,nlc1,nlc2,ierr) > call MatGetSize(B,m,n,ierr) > write(sdummy,fmt='(A,25i16)') trim(stype),iproc,int(info(mat_info_nz_allocated)),int(info(mat_info_nz_used)),nl1,nl2,nlc1,nlc2,m,n > call PetscSynchronizedPrintf(PETSC_COMM_WORLD,trim(sdummy)//NEW_LINE('A'),ierr) > call PetscSynchronizedFlush(PETSC_COMM_WORLD,PETSC_STDOUT,ierr) > > > call PetscFinalize(ierr) > > end program submatrix > > > > > > i see. but i doesn't work for me. maybe I made some mistake. If not I will try to make some example code where it fails. > > > > > On Jul 10, 2018, at 11:50 PM, Marius Buerkle wrote: > > > > Sorry, I have yet another question. While it works well for MPIAIJ, I end up in a deadlock if I use MatCreateSubmatrix on a MPIDENSE matrix. Should MatCreateSubmatrix work on dense matricies ? > > yes > > > On Mon, Jul 9, 2018 at 10:02 PM Marius Buerkle wrote: > > MatGetSubmatrix is in the current PETSc released called MatCreateSubmatrix. Is this correct ? > > > > > > Yep. I am old and cannot follow API changes anymore. > > > > Matt > > > > On Mon, Jul 9, 2018 at 8:38 PM Marius Buerkle wrote: > > I see. What I want to do is to calculate the matrix product C=A*B' between two sparse matrices A=(A11 0 , A21 0) and B=(B11 0 , B21 0) where C will be dense in the end but I just want to calculate some selected entries C_ij of C. At the moment I extract submatricies for the corresponding rows and columns, > > > > I think that is the right way, but you should only need MatGetSubmatrix for that. > > > > Thanks, > > > > Matt > > > > so I was wondering if there is a simpler or performancer-wise faster way. I assume there is not such thing as a restricted MatMatMul which just calculated the lets say predefined nonzero entries of C. > > > > > > These are "internal" routines that we rarely expect end users to use since they are specific for particular matrix implementations. As such they are also kind of strange to use from Fortran since none of the AIJ data structures can be made visible to Fortran. > > > > Could you explain why you want them from Fortran and maybe we'll have alternative suggestions on how you can achieve the same effect. > > > > Barry > > > > > > > On Jul 5, 2018, at 3:05 AM, Marius Buerkle wrote: > > > > > > or MatMPIAIJGetLocalMatCondensed for that matter. > > > > > > > > > > > > Hi ! > > > > > > Is MatMPIAIJGetSeqAIJ implemented for fortran? > > > > > > best, > > > Marius > > > > > > > > -- > > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. > > -- Norbert Wiener > > > > https://www.cse.buffalo.edu/~knepley/ > > > > > > -- > > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. > > -- Norbert Wiener > > > > https://www.cse.buffalo.edu/~knepley/ > From mbuerkle at web.de Thu Jul 12 21:17:56 2018 From: mbuerkle at web.de (Marius Buerkle) Date: Fri, 13 Jul 2018 04:17:56 +0200 Subject: [petsc-users] MatMPIAIJGetSeqAIJ implemented for fortran? In-Reply-To: References: <90DFBA32-7EF5-4378-ACB9-DAEC27A669D8@mcs.anl.gov> Message-ID: An HTML attachment was scrubbed... URL: From j.wagner at rice.edu Fri Jul 13 08:17:25 2018 From: j.wagner at rice.edu (Jordan Wagner) Date: Fri, 13 Jul 2018 08:17:25 -0500 Subject: [petsc-users] Can PetscSections of a DMPlex be written out and read in with HDF5? Message-ID: Hi, In my code, I have a separate preprocessing script that I usually run in serial to set up various things for my solver. One of the things I want the preprocessor to do is setup everything related to the DMPlex, and then I write it out to an HDF5 file to be read in the main solver. In the preprocessor, I have everything set up how I want it as far as the DM and have created and specified a default section. My problem is that when reading the resulting HDF5 file with DMLoad in my main solver, it doesn't look like I have the default section anymore. Most everything else, such as the labels, seem to be working fine. Is there a way to make the DMView/DMLoad functions write/read the default sections as well? That way I can immediately run DMPlexDistribute and have everything distributed right off the bat in the main solver. Thanks a lot! jw From knepley at gmail.com Fri Jul 13 10:46:14 2018 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 13 Jul 2018 11:46:14 -0400 Subject: [petsc-users] Can PetscSections of a DMPlex be written out and read in with HDF5? In-Reply-To: References: Message-ID: On Fri, Jul 13, 2018 at 9:17 AM Jordan Wagner wrote: > Hi, > > In my code, I have a separate preprocessing script that I usually run in > serial to set up various things for my solver. One of the things I want > the preprocessor to do is setup everything related to the DMPlex, and > then I write it out to an HDF5 file to be read in the main solver. In > the preprocessor, I have everything set up how I want it as far as the > DM and have created and specified a default section. My problem is that > when reading the resulting HDF5 file with DMLoad in my main solver, it > doesn't look like I have the default section anymore. Most everything > else, such as the labels, seem to be working fine. Is there a way to > make the DMView/DMLoad functions write/read the default sections as > well? That way I can immediately run DMPlexDistribute and have > everything distributed right off the bat in the main solver. > Hi Jordan, I had not written it this way because my Sections are created automatically from a specification of the discretization. What kind of discretization are you using? We could certainly do this. The easiest way I think is to wrap the internal dof and off arrays as IS and use ISView/Load. Would you also want the BC? Thanks, Matt > Thanks a lot! > > jw > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zakaryah at gmail.com Mon Jul 16 22:33:16 2018 From: zakaryah at gmail.com (zakaryah) Date: Mon, 16 Jul 2018 23:33:16 -0400 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> Message-ID: I'm still working on this, and I have a separate question about the implementation, which is related to calculating and removing the nullspace from the Jacobian. I have a system of n nonlinear equations in n+1 variables, due to the auxiliary variable (homotopy variable). Given a guess, z, I'd like to calculate a corrector (Newton iteration) dz which solves J(z) dz = -F(z) where J is the n x (n+1) Jacobian of F. Since J has a rank-one nullspace, I'd like to calculate that nullspace in each iteration of the SNES, then find the minimal norm solution dz. The tricks for finding the nullspace without messing up the nice structure of the n x n submatrix of J are in Watson's paper: add a "dummy" row to J to form a square matrix A: A^T = [J^T e_k] and a trivial RHS: b^T = [0 ... 0 b_k] where the value of b_k is essentially arbitrary but can be chosen to orient the solution in the direction of increasing arc length. A vector in the rank-one nullspace of J, u, solves A u = b (1) and a specific solution for the Newton iterate solves A v = c (2) where c^T = [-F^T c_{n+1}] and c_{n+1} is also an arbitrary constant. The desired Newton update dz is just the Graham-Schmidt orthogonalization of v wrt u. >From the previous discussion I think A can be implemented as a shell matrix as a straightforward way to efficiently solve the linear systems. I have three questions about the implementation of this within the SNES: 1) What is the best way to "hook" a calculation of the nullspace of J, via eq. (1), within the SNES? c is formed in FormFunction(), A is formed in FormJacobian(), but I need an intermediate step to form b and solve for u, then, I assume, set it as the nullspace of A (see question 3). 2) Is there a way to reuse the KSP for (1) to efficiently solve (2), given the method which answers question 1) ? 3) Can I set u to be in the nullspace of A? It's really in the nullspace of the submatrix J, while the full matrix A has no nullspace, but the point is that I don't care about the last row of A - that's the whole trick of the homotopy. I guess my question is whether anything in the solver will complain that Au != 0, because for all other purposes I want to project u out of the solution to (2) and it seems like treating it as a nullspace will achieve that. -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Tue Jul 17 06:39:03 2018 From: knepley at gmail.com (Matthew Knepley) Date: Tue, 17 Jul 2018 07:39:03 -0400 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> Message-ID: On Mon, Jul 16, 2018 at 11:33 PM zakaryah wrote: > I'm still working on this, and I have a separate question about the > implementation, which is related to calculating and removing the nullspace > from the Jacobian. > > I have a system of n nonlinear equations in n+1 variables, due to the > auxiliary variable (homotopy variable). Given a guess, z, I'd like to > calculate a corrector (Newton iteration) dz which solves > > J(z) dz = -F(z) > > where J is the n x (n+1) Jacobian of F. Since J has a rank-one nullspace, > I'd like to calculate that nullspace in each iteration of the SNES, then > find the minimal norm solution dz. The tricks for finding the nullspace > without messing up the nice structure of the n x n submatrix of J are in > Watson's paper: add a "dummy" row to J to form a square matrix A: > > A^T = [J^T e_k] > > and a trivial RHS: > > b^T = [0 ... 0 b_k] > > where the value of b_k is essentially arbitrary but can be chosen to > orient the solution in the direction of increasing arc length. A vector in > the rank-one nullspace of J, u, solves > > A u = b (1) > > and a specific solution for the Newton iterate solves > > A v = c (2) > > where c^T = [-F^T c_{n+1}] > > and c_{n+1} is also an arbitrary constant. The desired Newton update dz > is just the Graham-Schmidt orthogonalization of v wrt u. > > From the previous discussion I think A can be implemented as a shell > matrix as a straightforward way to efficiently solve the linear systems. I > have three questions about the implementation of this within the SNES: > > 1) What is the best way to "hook" a calculation of the nullspace of J, via > eq. (1), within the SNES? c is formed in FormFunction(), A is formed in > FormJacobian(), but I need an intermediate step to form b and solve for u, > then, I assume, set it as the nullspace of A (see question 3). > Just calculate the nullspace inside FormJacobian(). > 2) Is there a way to reuse the KSP for (1) to efficiently solve (2), given > the method which answers question 1) ? > Not really, unless you use some type of factorization for the preconditioner. > 3) Can I set u to be in the nullspace of A? It's really in the nullspace > of the submatrix J, while the full matrix A has no nullspace, but the point > is that I don't care about the last row of A - that's the whole trick of > the homotopy. I guess my question is whether anything in the solver will > complain that Au != 0, because for all other purposes I want to project u > out of the solution to (2) and it seems like treating it as a nullspace > will achieve that. > Yes, I think it should be fine. Matt -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zakaryah at gmail.com Tue Jul 17 12:31:39 2018 From: zakaryah at gmail.com (zakaryah) Date: Tue, 17 Jul 2018 13:31:39 -0400 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> Message-ID: Thanks Matt. > > >> 2) Is there a way to reuse the KSP for (1) to efficiently solve (2), >> given the method which answers question 1) ? >> > > Not really, unless you use some type of factorization for the > preconditioner. > Can you elaborate? ?I know that KSP can efficiently solve linear systems with the same matrix but different right-hand sides, just by calling KSPSolve successively. Will this be impossible within the nonlinear solver after calculating the nullspace?? -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Wed Jul 18 09:55:38 2018 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 18 Jul 2018 10:55:38 -0400 Subject: [petsc-users] Implementing a homotopy solver In-Reply-To: References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> Message-ID: On Tue, Jul 17, 2018 at 1:32 PM zakaryah wrote: > Thanks Matt. > >> >> >>> 2) Is there a way to reuse the KSP for (1) to efficiently solve (2), >>> given the method which answers question 1) ? >>> >> >> Not really, unless you use some type of factorization for the >> preconditioner. >> > > Can you elaborate? > ?I know that KSP can efficiently solve linear systems with the same matrix > but different right-hand sides, just by calling KSPSolve successively. > Will this be impossible within the nonlinear solver after calculating the > nullspace?? > >> This is what I was referring to. KSP reuse only works if you have some factorization preconditioner. In that case, KSP will keep it around if you call KSPSolve() again with a different rhs. You can do that same thing in your case. Thanks, Matt -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.knezevic at akselos.com Wed Jul 18 12:31:34 2018 From: david.knezevic at akselos.com (David Knezevic) Date: Wed, 18 Jul 2018 13:31:34 -0400 Subject: [petsc-users] Changing the jacobian matrix during SNES iterations Message-ID: I'm using SNES for a finite element contact solve, in which the sparsity pattern of the jacobian can change from one Newton iteration to the next (since the nodes on the contact surface move). In order to handle this I figured the best way would be to destroy the jacobian matrix and re-allocate it with a new sparsity pattern inside each call to FormJacobian, does that seem like a reasonable approach in this context? Also, I recall from an earlier discussion that this matrix re-allocation inside FormJacobian is supported by SNES, but I just wanted to confirm that? Also, I was wondering if there is any example where the matrix is re-allocated inside SNES iterations so that I can make sure that I do it correctly? Best regards, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Wed Jul 18 12:59:48 2018 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 18 Jul 2018 13:59:48 -0400 Subject: [petsc-users] Changing the jacobian matrix during SNES iterations In-Reply-To: References: Message-ID: On Wed, Jul 18, 2018 at 1:31 PM David Knezevic wrote: > I'm using SNES for a finite element contact solve, in which the sparsity > pattern of the jacobian can change from one Newton iteration to the next > (since the nodes on the contact surface move). > > In order to handle this I figured the best way would be to destroy the > jacobian matrix and re-allocate it with a new sparsity pattern inside each > call to FormJacobian, does that seem like a reasonable approach in this > context? > Yes. > Also, I recall from an earlier discussion that this matrix re-allocation > inside FormJacobian is supported by SNES, but I just wanted to confirm that? > Yes. > Also, I was wondering if there is any example where the matrix is > re-allocated inside SNES iterations so that I can make sure that I do it > correctly? > No, unfortunately. Contributions always welcome :) Thanks, Matt > Best regards, > David > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From alistairbntl at gmail.com Wed Jul 18 13:20:52 2018 From: alistairbntl at gmail.com (Alistair Bentley) Date: Wed, 18 Jul 2018 14:20:52 -0400 Subject: [petsc-users] Unknown PETSc-HYPRE Error Message-ID: Hello all, I'm a first time PETSc mailing list user, so I apologize in advance if this is not the right mailing list for this post! I've been using PETSc with HYPRE (BoomerAMG) as part of a Schur complement block preconditioner for a time-dependent 3D Navier-Stokes equation. Specifically, for the Schur complement approximation, I've been using PETSc's selfp method (given the simulation's short time steps, this has been producing reasonable results) and a single application of the default HYPRE BoomerAMG. When I run on my local machine (up to 4 processors), the simulation runs to completion smoothly. The GMRES iterations for the global system (as well as the block solves) appear to scale well with h. Next I pushed to job to our HPC resource and ran a small job (stabilized P1P1 elements on 329013 tetrahedra and 56970 nodes) with 36 cores. This time, however, the simulation did not run to completion. Rather, I began to encounter the following error: [ 6] KSPSolve() line 666 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/interface/itfunc.c [ 6] KSPSolve_FGMRES() line 291 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/impls/gmres/fgmres/fgmres.c [ 6] KSPFGMRESCycle() line 166 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/impls/gmres/fgmres/fgmres.c [ 6] KSP_PCApply() line 275 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/include/petsc/private/kspimpl.h [ 6] PCApply() line 458 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/pc/interface/precon.c [ 6] PCApply_FieldSplit_Schur() line 900 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/pc/impls/fieldsplit/fieldsplit.c [ 6] KSPSolve() line 666 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/interface/itfunc.c [ 6] KSPSolve_PREONLY() line 22 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/impls/preonly/preonly.c [ 6] KSP_PCApply() line 275 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/include/petsc/private/kspimpl.h [ 6] PCApply() line 458 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/pc/interface/precon.c [ 6] PCApply_HYPRE() line 351 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/pc/impls/hypre/hypre.c [ 6] Error in external library [ 6] Error in HYPRE solver, error code 1 Unfortunately, HYPRE lists an error code1 as a *generic error* which does not give me much to go on. Further, while this error appears consistently, it seems to occur randomly. For instance, the error message above occurred on the 6th MPI process after the simulation had reached t = 0.1. A previous run with the exact same configuration occurred on the 28th MPI process after the simulation reached t = 1.1 seconds. I've been experimenting with different configurations to try and find a stable solution, but I'm at a bit of a loss as to how to proceed. Any suggestions for moving forward would be greatly appreciated. Thanks! - Alistair -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.knezevic at akselos.com Wed Jul 18 14:25:23 2018 From: david.knezevic at akselos.com (David Knezevic) Date: Wed, 18 Jul 2018 15:25:23 -0400 Subject: [petsc-users] Changing the jacobian matrix during SNES iterations In-Reply-To: References: Message-ID: On Wed, Jul 18, 2018 at 1:59 PM, Matthew Knepley wrote: > On Wed, Jul 18, 2018 at 1:31 PM David Knezevic > wrote: > >> I'm using SNES for a finite element contact solve, in which the sparsity >> pattern of the jacobian can change from one Newton iteration to the next >> (since the nodes on the contact surface move). >> >> In order to handle this I figured the best way would be to destroy the >> jacobian matrix and re-allocate it with a new sparsity pattern inside each >> call to FormJacobian, does that seem like a reasonable approach in this >> context? >> > > Yes. > > >> Also, I recall from an earlier discussion that this matrix re-allocation >> inside FormJacobian is supported by SNES, but I just wanted to confirm that? >> > > Yes. > > >> Also, I was wondering if there is any example where the matrix is >> re-allocated inside SNES iterations so that I can make sure that I do it >> correctly? >> > > No, unfortunately. Contributions always welcome :) > OK, as a test case I'd like to modify snes/tutorials/ex1.c to destroy and reallocate the jacobian matrix with the same sparsity pattern inside FormJacobian1 (once I can do that with the same sparsity pattern, then it should be straightforward to do the same thing with a modified sparsity pattern). To do that, I tried adding the following code inside FormJacobian1: ierr = MatDestroy(&B); ierr = MatCreate(PETSC_COMM_WORLD,&B);CHKERRQ(ierr); ierr = MatSetSizes(B,PETSC_DECIDE,PETSC_DECIDE,2,2);CHKERRQ(ierr); ierr = MatSetFromOptions(B);CHKERRQ(ierr); ierr = MatSetUp(B);CHKERRQ(ierr); That gives a segfault, so I gather something else is needed here, any suggestions on what I need to do? I guess I need to do something else in order to make sure that the SNES uses the newly created matrix (e.g. update the original Mat J)? Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Wed Jul 18 14:34:52 2018 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 18 Jul 2018 15:34:52 -0400 Subject: [petsc-users] Changing the jacobian matrix during SNES iterations In-Reply-To: References: Message-ID: On Wed, Jul 18, 2018 at 3:25 PM David Knezevic wrote: > On Wed, Jul 18, 2018 at 1:59 PM, Matthew Knepley > wrote: > >> On Wed, Jul 18, 2018 at 1:31 PM David Knezevic < >> david.knezevic at akselos.com> wrote: >> >>> I'm using SNES for a finite element contact solve, in which the sparsity >>> pattern of the jacobian can change from one Newton iteration to the next >>> (since the nodes on the contact surface move). >>> >>> In order to handle this I figured the best way would be to destroy the >>> jacobian matrix and re-allocate it with a new sparsity pattern inside each >>> call to FormJacobian, does that seem like a reasonable approach in this >>> context? >>> >> >> Yes. >> >> >>> Also, I recall from an earlier discussion that this matrix re-allocation >>> inside FormJacobian is supported by SNES, but I just wanted to confirm that? >>> >> >> Yes. >> >> >>> Also, I was wondering if there is any example where the matrix is >>> re-allocated inside SNES iterations so that I can make sure that I do it >>> correctly? >>> >> >> No, unfortunately. Contributions always welcome :) >> > > > OK, as a test case I'd like to modify snes/tutorials/ex1.c to destroy and > reallocate the jacobian matrix with the same sparsity pattern > inside FormJacobian1 (once I can do that with the same sparsity pattern, > then it should be straightforward to do the same thing with a modified > sparsity pattern). To do that, I tried adding the following code inside > FormJacobian1: > > ierr = MatDestroy(&B); > You do not want to destroy the matrix. There would be no way to get another Mat back out of the function. > ierr = MatCreate(PETSC_COMM_WORLD,&B);CHKERRQ(ierr); > And do not recreate it. > ierr = MatSetSizes(B,PETSC_DECIDE,PETSC_DECIDE,2,2);CHKERRQ(ierr); > Nor reset the sizes. However, you do want to call MatSetPreallocationXAIJ(); which should work > ierr = MatSetFromOptions(B);CHKERRQ(ierr); > ierr = MatSetUp(B);CHKERRQ(ierr); > THanks, Matt > That gives a segfault, so I gather something else is needed here, any > suggestions on what I need to do? I guess I need to do something else in > order to make sure that the SNES uses the newly created matrix (e.g. update > the original Mat J)? > > Thanks, > David > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Wed Jul 18 16:07:46 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Wed, 18 Jul 2018 21:07:46 +0000 Subject: [petsc-users] Unknown PETSc-HYPRE Error In-Reply-To: References: Message-ID: valgrind http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind Note if your HPC resource doesn't have valgrind you can still run your app under it on a local machine. (Big as problem as you can fit). Barry > On Jul 18, 2018, at 1:20 PM, Alistair Bentley wrote: > > Hello all, > > I'm a first time PETSc mailing list user, so I apologize in advance if this is not the right mailing list for this post! > > I've been using PETSc with HYPRE (BoomerAMG) as part of a Schur complement block preconditioner for a time-dependent 3D Navier-Stokes equation. > > Specifically, for the Schur complement approximation, I've been using PETSc's selfp method (given the simulation's short time steps, this has been producing reasonable results) and a single application of the default HYPRE BoomerAMG. > > When I run on my local machine (up to 4 processors), the simulation runs to completion smoothly. The GMRES iterations for the global system (as well as the block solves) appear to scale well with h. > > Next I pushed to job to our HPC resource and ran a small job (stabilized P1P1 elements on 329013 tetrahedra and 56970 nodes) with 36 cores. This time, however, the simulation did not run to completion. Rather, I began to encounter the following error: > > [ 6] KSPSolve() line 666 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/interface/itfunc.c > [ 6] KSPSolve_FGMRES() line 291 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/impls/gmres/fgmres/fgmres.c > [ 6] KSPFGMRESCycle() line 166 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/impls/gmres/fgmres/fgmres.c > [ 6] KSP_PCApply() line 275 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/include/petsc/private/kspimpl.h > [ 6] PCApply() line 458 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/pc/interface/precon.c > [ 6] PCApply_FieldSplit_Schur() line 900 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/pc/impls/fieldsplit/fieldsplit.c > [ 6] KSPSolve() line 666 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/interface/itfunc.c > [ 6] KSPSolve_PREONLY() line 22 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/ksp/impls/preonly/preonly.c > [ 6] KSP_PCApply() line 275 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/include/petsc/private/kspimpl.h > [ 6] PCApply() line 458 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/pc/interface/precon.c > [ 6] PCApply_HYPRE() line 351 in /p/home/abentle/.hashdist/tmp/petsc-mtyptrixhukj/src/ksp/pc/impls/hypre/hypre.c > [ 6] Error in external library > [ 6] Error in HYPRE solver, error code 1 > > Unfortunately, HYPRE lists an error code1 as a generic error which does not give me much to go on. Further, while this error appears consistently, it seems to occur randomly. For instance, the error message above occurred on the 6th MPI process after the simulation had reached t = 0.1. A previous run with the exact same configuration occurred on the 28th MPI process after the simulation reached t = 1.1 seconds. > > I've been experimenting with different configurations to try and find a stable solution, but I'm at a bit of a loss as to how to proceed. Any suggestions for moving forward would be greatly appreciated. > > Thanks! > > - Alistair > From david.knezevic at akselos.com Wed Jul 18 21:15:00 2018 From: david.knezevic at akselos.com (David Knezevic) Date: Wed, 18 Jul 2018 22:15:00 -0400 Subject: [petsc-users] Changing the jacobian matrix during SNES iterations In-Reply-To: References: Message-ID: On Wed, Jul 18, 2018 at 3:34 PM, Matthew Knepley wrote: > On Wed, Jul 18, 2018 at 3:25 PM David Knezevic > wrote: > >> On Wed, Jul 18, 2018 at 1:59 PM, Matthew Knepley >> wrote: >> >>> On Wed, Jul 18, 2018 at 1:31 PM David Knezevic < >>> david.knezevic at akselos.com> wrote: >>> >>>> I'm using SNES for a finite element contact solve, in which the >>>> sparsity pattern of the jacobian can change from one Newton iteration to >>>> the next (since the nodes on the contact surface move). >>>> >>>> In order to handle this I figured the best way would be to destroy the >>>> jacobian matrix and re-allocate it with a new sparsity pattern inside each >>>> call to FormJacobian, does that seem like a reasonable approach in this >>>> context? >>>> >>> >>> Yes. >>> >>> >>>> Also, I recall from an earlier discussion that this matrix >>>> re-allocation inside FormJacobian is supported by SNES, but I just wanted >>>> to confirm that? >>>> >>> >>> Yes. >>> >>> >>>> Also, I was wondering if there is any example where the matrix is >>>> re-allocated inside SNES iterations so that I can make sure that I do it >>>> correctly? >>>> >>> >>> No, unfortunately. Contributions always welcome :) >>> >> >> >> OK, as a test case I'd like to modify snes/tutorials/ex1.c to destroy and >> reallocate the jacobian matrix with the same sparsity pattern >> inside FormJacobian1 (once I can do that with the same sparsity pattern, >> then it should be straightforward to do the same thing with a modified >> sparsity pattern). To do that, I tried adding the following code inside >> FormJacobian1: >> >> ierr = MatDestroy(&B); >> > > You do not want to destroy the matrix. There would be no way to get > another Mat back out of the function. > > >> ierr = MatCreate(PETSC_COMM_WORLD,&B);CHKERRQ(ierr); >> > > And do not recreate it. > > >> ierr = MatSetSizes(B,PETSC_DECIDE,PETSC_DECIDE,2,2);CHKERRQ(ierr); >> > > Nor reset the sizes. However, you do want to call > > MatSetPreallocationXAIJ(); > > which should work > > >> ierr = MatSetFromOptions(B);CHKERRQ(ierr); >> ierr = MatSetUp(B);CHKERRQ(ierr); >> > > THanks, > > Matt > Thanks! Calling MatSetPreallocationXAIJ inside FormJacobian works for me. So I guess this means that we create a new sparsity pattern "from scratch" each time we call MatSetPreallocationXAIJ and set the values in the matrix? Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From emiel.van.de.ven at gmail.com Thu Jul 19 05:17:54 2018 From: emiel.van.de.ven at gmail.com (Emiel van de Ven) Date: Thu, 19 Jul 2018 12:17:54 +0200 Subject: [petsc-users] DMLabelFilter start index 0 question Message-ID: Dear PETSc users, I have a mesh where I have a label that contains some elements. If I understand correctly, after uniform refinement, the label also contains the refined faces and vertices. Since I'd like to have only cells in the label, I thought to remove the rest using something like: DMPlexGetDepthStratum(dm, 3, &vStart, &vEnd); DMLabelFilter(label, vStart, vEnd); However, I don't fully understand the functioning of DMLabelFilter. When vStart>0, it works as I would expect, but when vStart=0, it simply removes all the points from the label. Why is this happening? Since for the cells vStart usually is 0, I can't use this method. Am I missing something? Attached is a minimal working example. Best, Emiel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dmlabelfilter_test.tar.gz Type: application/gzip Size: 1002 bytes Desc: not available URL: From knepley at gmail.com Thu Jul 19 05:48:45 2018 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 19 Jul 2018 06:48:45 -0400 Subject: [petsc-users] DMLabelFilter start index 0 question In-Reply-To: References: Message-ID: On Thu, Jul 19, 2018 at 6:21 AM Emiel van de Ven wrote: > Dear PETSc users, > > I have a mesh where I have a label that contains some elements. If I > understand correctly, after uniform refinement, the label also contains the > refined faces and vertices. Since I'd like to have only cells in the label, > I thought to remove the rest using something like: > > DMPlexGetDepthStratum(dm, 3, &vStart, &vEnd); > DMLabelFilter(label, vStart, vEnd); > > However, I don't fully understand the functioning of DMLabelFilter. When > vStart>0, it works as I would expect, but when vStart=0, it simply removes > all the points from the label. Why is this happening? > > Since for the cells vStart usually is 0, I can't use this method. Am I > missing something? > > Attached is a minimal working example. > I have just compiled and run your example. This is what I get: master *:~/Downloads/tmp$ ./main Label 'Cell Sets': Index has been calculated in [1, 10) [0]: 1 (4) [0]: 2 (4) [0]: 3 (4) [0]: 4 (4) [0]: 5 (4) [0]: 6 (4) [0]: 7 (4) [0]: 8 (4) [0]: 9 (4) Label 'Cell Sets': Index has been calculated in [0, 10) [0]: 1 (4) [0]: 2 (4) [0]: 3 (4) [0]: 4 (4) [0]: 5 (4) [0]: 6 (4) [0]: 7 (4) [0]: 8 (4) [0]: 9 (4) What version are your running with? Thanks, Matt > Best, > Emiel > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Thu Jul 19 06:01:55 2018 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 19 Jul 2018 07:01:55 -0400 Subject: [petsc-users] Changing the jacobian matrix during SNES iterations In-Reply-To: References: Message-ID: On Wed, Jul 18, 2018 at 10:15 PM David Knezevic wrote: > On Wed, Jul 18, 2018 at 3:34 PM, Matthew Knepley > wrote: > >> On Wed, Jul 18, 2018 at 3:25 PM David Knezevic < >> david.knezevic at akselos.com> wrote: >> >>> On Wed, Jul 18, 2018 at 1:59 PM, Matthew Knepley >>> wrote: >>> >>>> On Wed, Jul 18, 2018 at 1:31 PM David Knezevic < >>>> david.knezevic at akselos.com> wrote: >>>> >>>>> I'm using SNES for a finite element contact solve, in which the >>>>> sparsity pattern of the jacobian can change from one Newton iteration to >>>>> the next (since the nodes on the contact surface move). >>>>> >>>>> In order to handle this I figured the best way would be to destroy the >>>>> jacobian matrix and re-allocate it with a new sparsity pattern inside each >>>>> call to FormJacobian, does that seem like a reasonable approach in this >>>>> context? >>>>> >>>> >>>> Yes. >>>> >>>> >>>>> Also, I recall from an earlier discussion that this matrix >>>>> re-allocation inside FormJacobian is supported by SNES, but I just wanted >>>>> to confirm that? >>>>> >>>> >>>> Yes. >>>> >>>> >>>>> Also, I was wondering if there is any example where the matrix is >>>>> re-allocated inside SNES iterations so that I can make sure that I do it >>>>> correctly? >>>>> >>>> >>>> No, unfortunately. Contributions always welcome :) >>>> >>> >>> >>> OK, as a test case I'd like to modify snes/tutorials/ex1.c to destroy >>> and reallocate the jacobian matrix with the same sparsity pattern >>> inside FormJacobian1 (once I can do that with the same sparsity pattern, >>> then it should be straightforward to do the same thing with a modified >>> sparsity pattern). To do that, I tried adding the following code inside >>> FormJacobian1: >>> >>> ierr = MatDestroy(&B); >>> >> >> You do not want to destroy the matrix. There would be no way to get >> another Mat back out of the function. >> >> >>> ierr = MatCreate(PETSC_COMM_WORLD,&B);CHKERRQ(ierr); >>> >> >> And do not recreate it. >> >> >>> ierr = MatSetSizes(B,PETSC_DECIDE,PETSC_DECIDE,2,2);CHKERRQ(ierr); >>> >> >> Nor reset the sizes. However, you do want to call >> >> MatSetPreallocationXAIJ(); >> >> which should work >> >> >>> ierr = MatSetFromOptions(B);CHKERRQ(ierr); >>> ierr = MatSetUp(B);CHKERRQ(ierr); >>> >> >> THanks, >> >> Matt >> > > Thanks! Calling MatSetPreallocationXAIJ inside FormJacobian works for me. > > So I guess this means that we create a new sparsity pattern "from > scratch" each time we call MatSetPreallocationXAIJ and set the values in > the matrix? > Yes. Matt > Thanks, > David > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From david97sommer at gmail.com Thu Jul 19 06:51:14 2018 From: david97sommer at gmail.com (David Sommer) Date: Thu, 19 Jul 2018 13:51:14 +0200 Subject: [petsc-users] Parallel QR decomposition Message-ID: Hi, i was wondering if there is an implementation of parallel qr decomposition in PETSc. I was looking at http://www.mcs.anl.gov/petsc/documentation/linearsolvertable.html but all i found was this non-parallel MATLAB-Solver. Am i searching in the wrong place? Best regards, David Sommer -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Thu Jul 19 07:07:40 2018 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 19 Jul 2018 08:07:40 -0400 Subject: [petsc-users] Parallel QR decomposition In-Reply-To: References: Message-ID: On Thu, Jul 19, 2018 at 7:51 AM David Sommer wrote: > > Hi, > > i was wondering if there is an implementation of parallel qr decomposition > in PETSc. I was looking at > http://www.mcs.anl.gov/petsc/documentation/linearsolvertable.html > but all i found was this non-parallel MATLAB-Solver. Am i searching in the > wrong place? > No. There is a TSQR in SLEPc which we will someday absorb, and you can use Elemental for general parallel QR. Thanks, Matt > Best regards, > > David Sommer > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From david97sommer at gmail.com Thu Jul 19 07:10:00 2018 From: david97sommer at gmail.com (David Sommer) Date: Thu, 19 Jul 2018 14:10:00 +0200 Subject: [petsc-users] Parallel QR decomposition In-Reply-To: References: Message-ID: Thanks a lot. Am Do., 19. Juli 2018 um 14:07 Uhr schrieb Matthew Knepley < knepley at gmail.com>: > On Thu, Jul 19, 2018 at 7:51 AM David Sommer > wrote: > >> >> Hi, >> >> i was wondering if there is an implementation of parallel qr >> decomposition in PETSc. I was looking at >> http://www.mcs.anl.gov/petsc/documentation/linearsolvertable.html >> but all i found was this non-parallel MATLAB-Solver. Am i searching in >> the wrong place? >> > > No. There is a TSQR in SLEPc which we will someday absorb, and you can use > Elemental for > general parallel QR. > > Thanks, > > Matt > > >> Best regards, >> >> David Sommer >> >> > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emiel.van.de.ven at gmail.com Thu Jul 19 09:30:31 2018 From: emiel.van.de.ven at gmail.com (Emiel van de Ven) Date: Thu, 19 Jul 2018 16:30:31 +0200 Subject: [petsc-users] DMLabelFilter start index 0 question In-Reply-To: References: Message-ID: Ah, that's the problem, I was running version 3.8.3, with 3.9.3 it's working fine. I see that the implementation of DMLabelFilter changed in version 3.9 to mitigate this problem, that when the start is below or at the start of the label node range it wont allocate. Thanks for the quick response! Best, Emiel Op do 19 jul. 2018 om 12:48 schreef Matthew Knepley : > On Thu, Jul 19, 2018 at 6:21 AM Emiel van de Ven < > emiel.van.de.ven at gmail.com> wrote: > >> Dear PETSc users, >> >> I have a mesh where I have a label that contains some elements. If I >> understand correctly, after uniform refinement, the label also contains the >> refined faces and vertices. Since I'd like to have only cells in the label, >> I thought to remove the rest using something like: >> >> DMPlexGetDepthStratum(dm, 3, &vStart, &vEnd); >> DMLabelFilter(label, vStart, vEnd); >> >> However, I don't fully understand the functioning of DMLabelFilter. When >> vStart>0, it works as I would expect, but when vStart=0, it simply removes >> all the points from the label. Why is this happening? >> >> Since for the cells vStart usually is 0, I can't use this method. Am I >> missing something? >> >> Attached is a minimal working example. >> > > I have just compiled and run your example. This is what I get: > > master *:~/Downloads/tmp$ ./main > > Label 'Cell Sets': > > Index has been calculated in [1, 10) > > [0]: 1 (4) > > [0]: 2 (4) > > [0]: 3 (4) > > [0]: 4 (4) > > [0]: 5 (4) > > [0]: 6 (4) > > [0]: 7 (4) > > [0]: 8 (4) > > [0]: 9 (4) > > Label 'Cell Sets': > > Index has been calculated in [0, 10) > > [0]: 1 (4) > > [0]: 2 (4) > > [0]: 3 (4) > > [0]: 4 (4) > > [0]: 5 (4) > > [0]: 6 (4) > > [0]: 7 (4) > > [0]: 8 (4) > > [0]: 9 (4) > > What version are your running with? > > Thanks, > > Matt > > >> Best, >> Emiel >> > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From huq2090 at gmail.com Thu Jul 19 12:44:41 2018 From: huq2090 at gmail.com (Fazlul Huq) Date: Thu, 19 Jul 2018 12:44:41 -0500 Subject: [petsc-users] Saving output and execution time Message-ID: Hello all, I can run the following code with this command showing output on the console: ./poisson_m -ksp_view_solution The code is: static char help[] = "Solves a tridiagonal linear system.\n\n"; /*T Concepts: KSP^basic parallel example; Processors: n T*/ /* Include "petscksp.h" so that we can use KSP solvers. Note that this file automatically includes: petscsys.h - base PETSc routines petscvec.h - vectors petscmat.h - matrices petscis.h - index sets petscksp.h - Krylov subspace methods petscviewer.h - viewers petscpc.h - preconditioners Note: The corresponding uniprocessor example is ex1.c */ #include int main(int argc,char **args) { Vec x, b, u; /* approx solution, RHS, exact solution */ Mat A; /* linear system matrix */ KSP ksp; /* linear solver context */ PC pc; /* preconditioner context */ PetscReal norm,tol=1000.*PETSC_MACHINE_EPSILON; /* norm of solution error */ PetscErrorCode ierr; PetscInt i,n = 99,col[3],its,rstart,rend,nlocal; PetscScalar one = 1.0,hundredth = 0.001,leftbc = 10.001,rightbc = 15.001,value[3]; ierr = PetscInitialize(&argc,&args,(char*)0,help);if (ierr) return ierr; ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Compute the matrix and right-hand-side vector that define the linear system, Ax = b. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Create vectors. Note that we form 1 vector from scratch and then duplicate as needed. For this simple case let PETSc decide how many elements of the vector are stored on each processor. The second argument to VecSetSizes() below causes PETSc to decide. */ ierr = VecCreate(PETSC_COMM_WORLD,&x);CHKERRQ(ierr); ierr = VecSetSizes(x,PETSC_DECIDE,n);CHKERRQ(ierr); ierr = VecSetFromOptions(x);CHKERRQ(ierr); ierr = VecDuplicate(x,&b);CHKERRQ(ierr); ierr = VecDuplicate(x,&u);CHKERRQ(ierr); /* Identify the starting and ending mesh points on each processor for the interior part of the mesh. We let PETSc decide above. */ ierr = VecGetOwnershipRange(x,&rstart,&rend);CHKERRQ(ierr); ierr = VecGetLocalSize(x,&nlocal);CHKERRQ(ierr); /* Create matrix. When using MatCreate(), the matrix format can be specified at runtime. Performance tuning note: For problems of substantial size, preallocation of matrix memory is crucial for attaining good performance. See the matrix chapter of the users manual for details. We pass in nlocal as the "local" size of the matrix to force it to have the same parallel layout as the vector created above. */ ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); ierr = MatSetSizes(A,nlocal,nlocal,n,n);CHKERRQ(ierr); ierr = MatSetFromOptions(A);CHKERRQ(ierr); ierr = MatSetUp(A);CHKERRQ(ierr); /* Assemble matrix. The linear system is distributed across the processors by chunks of contiguous rows, which correspond to contiguous sections of the mesh on which the problem is discretized. For matrix assembly, each processor contributes entries for the part that it owns locally. */ if (!rstart) { rstart = 1; i = 0; col[0] = 0; col[1] = 1; value[0] = 2.0; value[1] = -1.0; ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); } if (rend == n) { rend = n-1; i = n-1; col[0] = n-2; col[1] = n-1; value[0] = -1.0; value[1] = 2.0; ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); } /* Set entries corresponding to the mesh interior */ value[0] = -1.0; value[1] = 2.0; value[2] = -1.0; for (i=rstart; i -pc_type -ksp_monitor -ksp_rtol These options will override those specified above as long as KSPSetFromOptions() is called _after_ any other customization routines. */ ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Solve the linear system - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Solve linear system */ ierr = KSPSolve(ksp,b,x);CHKERRQ(ierr); /* View solver info; we could instead use the option -ksp_view to print this info to the screen at the conclusion of KSPSolve(). */ ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Check solution and clean up - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Check the error */ ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr); ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr); ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr); if (norm > tol) { ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, Iterations %D\n",(double)norm,its);CHKERRQ(ierr); } /* Free work space. All PETSc objects should be destroyed when they are no longer needed. */ ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = VecDestroy(&u);CHKERRQ(ierr); ierr = VecDestroy(&b);CHKERRQ(ierr); ierr = MatDestroy(&A);CHKERRQ(ierr); ierr = KSPDestroy(&ksp);CHKERRQ(ierr); /* Always call PetscFinalize() before exiting a program. This routine - finalizes the PETSc libraries as well as MPI - provides summary and diagnostic information if certain runtime options are chosen (e.g., -log_view). */ ierr = PetscFinalize(); return ierr; } Now I am trying to save this output in a file (say in a .csv file) at runtime along with execution time but I can't. Any suggestion please! Sincerely, Huq -- Fazlul Huq Graduate Research Assistant Department of Nuclear, Plasma & Radiological Engineering (NPRE) University of Illinois at Urbana-Champaign (UIUC) E-mail: huq2090 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jte1 at rice.edu Thu Jul 19 17:58:13 2018 From: jte1 at rice.edu (Joseph Essman) Date: Thu, 19 Jul 2018 17:58:13 -0500 Subject: [petsc-users] Using both DMDA and matrix-free methods with KSP Message-ID: Hello all, I'm a relatively new PETSc user and am currently attempting to apply matrix-free methods to a program I wrote that uses the KSP and DMDA libraries. However, I've come across an issue. When I use KSPSetDM, it requires that I set operators with KSPSetComputeOperators rather than simply setting an operator. However, the primary issue here is that when I use KSPSetComputeOperators, I attempt to compute my operators with the following function: PetscErrorCode ComputeMatrix(KSP ksp, Mat A, Mat jac, void *user){ PetscErrorCode ierr; AppCtx *ctx = (AppCtx*)user; PetscFunctionBegin; ierr = MatSetType(A, MATSHELL);CHKERRQ(ierr); ierr = MatCreateShell(PETSC_COMM_WORLD,ctx->high-ctx->low,ctx->high-ctx->low,\ PETSC_DETERMINE, PETSC_DETERMINE, (void*)ctx, &A);CHKERRQ(ierr); ierr = MatShellSetOperation(A,MATOP_MULT,(void(*)(void))MyMatMult); CHKERRQ(ierr); ierr = MatSetUp(A);CHKERRQ(ierr); ierr = MatSetType(jac, MATSHELL);CHKERRQ(ierr); ierr = MatCreateShell(PETSC_COMM_WORLD,ctx->high-ctx->low,ctx->high-ctx->low,\ PETSC_DETERMINE, PETSC_DETERMINE, (void*)ctx, &jac);CHKERRQ(ierr); ierr = MatShellSetOperation(jac,MATOP_MULT,(void(*)(void))MyMatMult); CHKERRQ(ierr); ierr = MatSetUp(jac);CHKERRQ(ierr); PetscFunctionReturn(ierr); } When I try to run KSPSolve, I get the following error message: joseph at Otto ~/petsc-3.9.3/Diffusion $ mpirun -n 1 ./diffu2matfree -x 3 -y 3 shell [0]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [0]PETSC ERROR: Object is in wrong state [0]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatMult() [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]PETSC ERROR: Petsc Release Version 3.9.3, Jul, 02, 2018 [0]PETSC ERROR: ./diffu2matfree on a arch-linux2-c-debug named Otto by joseph Thu Jul 19 17:53:00 2018 [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack [0]PETSC ERROR: #1 MatMult() line 2306 in /home/joseph/petsc-3.9.3/src/mat/interface/matrix.c [0]PETSC ERROR: #2 PCApplyBAorAB() line 682 in /home/joseph/petsc-3.9.3/src/ksp/pc/interface/precon.c [0]PETSC ERROR: #3 KSP_PCApplyBAorAB() line 304 in /home/joseph/petsc-3.9.3/include/petsc/private/kspimpl.h [0]PETSC ERROR: #4 KSPGMRESCycle() line 152 in /home/joseph/petsc-3.9.3/src/ksp/ksp/impls/gmres/gmres.c [0]PETSC ERROR: #5 KSPSolve_GMRES() line 234 in /home/joseph/petsc-3.9.3/src/ksp/ksp/impls/gmres/gmres.c [0]PETSC ERROR: #6 KSPSolve() line 669 in /home/joseph/petsc-3.9.3/src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: #7 main() line 110 in /home/joseph/petsc-3.9.3/Diffusion/diffu2matfree.cpp [0]PETSC ERROR: PETSc Option Table entries: [0]PETSC ERROR: -x 3 [0]PETSC ERROR: -y 3 [0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint at mcs.anl.gov---------- application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0 Does anybody know what's going on here? I've also tried to make the algorithm work without KSPSetDM and KSPSetComputeOperators, but my MatMult step is dependent on DMDA, which is no longer used for the vectors in the KSP if I don't use KSPSetDM. I've attached my code in full if there are any questions as to the structure of my code. Thanks, Joseph Essman -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: diffu2matfree.cpp Type: text/x-c++src Size: 9600 bytes Desc: not available URL: From bsmith at mcs.anl.gov Thu Jul 19 19:24:56 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Fri, 20 Jul 2018 00:24:56 +0000 Subject: [petsc-users] Using both DMDA and matrix-free methods with KSP In-Reply-To: References: Message-ID: This is wrong ierr = MatCreateShell(PETSC_COMM_WORLD,ctx->high-ctx->low,ctx->high-ctx->low,\ PETSC_DETERMINE, PETSC_DETERMINE, (void*)ctx, &A);CHKERRQ(ierr); It changes the copy of A inside this routine to a shell matrix; it doesn't affect the A that is passed in so it is not a setup shell matrix like you need. Instead you need to use ierr = MatSetSizes(A,ctx->high-ctx->low,ctx->high-ctx->low,\ PETSC_DETERMINE, PETSC_DETERMINE);CHKERRQ(ierr); ierr = MatSetType(A,MATSHELL);CHKERRQ(ierr); ierr = MatShellSetContext(A,ctx);CHKERRQ(ierr); ierr = MatSetUp(A);CHKERRQ(ierr); Also in your main program immediately after creating the DMDA you must call DMSetMatType(da,MATSHELL); otherwise it will create an AIJ matrix which you don't want. Barry > On Jul 19, 2018, at 5:58 PM, Joseph Essman wrote: > > Hello all, > > I'm a relatively new PETSc user and am currently attempting to apply matrix-free methods to a program I wrote that uses the KSP and DMDA libraries. > > However, I've come across an issue. When I use KSPSetDM, it requires that I set operators with KSPSetComputeOperators rather than simply setting an operator. However, the primary issue here is that when I use KSPSetComputeOperators, I attempt to compute my operators with the following function: > > PetscErrorCode ComputeMatrix(KSP ksp, Mat A, Mat jac, void *user){ > PetscErrorCode ierr; > AppCtx *ctx = (AppCtx*)user; > > PetscFunctionBegin; > ierr = MatSetType(A, MATSHELL);CHKERRQ(ierr); > ierr = MatCreateShell(PETSC_COMM_WORLD,ctx->high-ctx->low,ctx->high-ctx->low,\ > PETSC_DETERMINE, PETSC_DETERMINE, (void*)ctx, &A);CHKERRQ(ierr); > ierr = MatShellSetOperation(A,MATOP_MULT,(void(*)(void))MyMatMult); > CHKERRQ(ierr); > ierr = MatSetUp(A);CHKERRQ(ierr); > > ierr = MatSetType(jac, MATSHELL);CHKERRQ(ierr); > ierr = MatCreateShell(PETSC_COMM_WORLD,ctx->high-ctx->low,ctx->high-ctx->low,\ > PETSC_DETERMINE, PETSC_DETERMINE, (void*)ctx, &jac);CHKERRQ(ierr); > ierr = MatShellSetOperation(jac,MATOP_MULT,(void(*)(void))MyMatMult); > CHKERRQ(ierr); > ierr = MatSetUp(jac);CHKERRQ(ierr); > > PetscFunctionReturn(ierr); > } > > When I try to run KSPSolve, I get the following error message: > > joseph at Otto ~/petsc-3.9.3/Diffusion $ mpirun -n 1 ./diffu2matfree -x 3 -y 3 > shell > [0]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- > [0]PETSC ERROR: Object is in wrong state > [0]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatMult() > [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. > [0]PETSC ERROR: Petsc Release Version 3.9.3, Jul, 02, 2018 > [0]PETSC ERROR: ./diffu2matfree on a arch-linux2-c-debug named Otto by joseph Thu Jul 19 17:53:00 2018 > [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack > [0]PETSC ERROR: #1 MatMult() line 2306 in /home/joseph/petsc-3.9.3/src/mat/interface/matrix.c > [0]PETSC ERROR: #2 PCApplyBAorAB() line 682 in /home/joseph/petsc-3.9.3/src/ksp/pc/interface/precon.c > [0]PETSC ERROR: #3 KSP_PCApplyBAorAB() line 304 in /home/joseph/petsc-3.9.3/include/petsc/private/kspimpl.h > [0]PETSC ERROR: #4 KSPGMRESCycle() line 152 in /home/joseph/petsc-3.9.3/src/ksp/ksp/impls/gmres/gmres.c > [0]PETSC ERROR: #5 KSPSolve_GMRES() line 234 in /home/joseph/petsc-3.9.3/src/ksp/ksp/impls/gmres/gmres.c > [0]PETSC ERROR: #6 KSPSolve() line 669 in /home/joseph/petsc-3.9.3/src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: #7 main() line 110 in /home/joseph/petsc-3.9.3/Diffusion/diffu2matfree.cpp > [0]PETSC ERROR: PETSc Option Table entries: > [0]PETSC ERROR: -x 3 > [0]PETSC ERROR: -y 3 > [0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint at mcs.anl.gov---------- > application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0 > > > Does anybody know what's going on here? I've also tried to make the algorithm work without KSPSetDM and KSPSetComputeOperators, but my MatMult step is dependent on DMDA, which is no longer used for the vectors in the KSP if I don't use KSPSetDM. I've attached my code in full if there are any questions as to the structure of my code. > > Thanks, > > Joseph Essman > From knepley at gmail.com Thu Jul 19 19:34:19 2018 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 19 Jul 2018 20:34:19 -0400 Subject: [petsc-users] Saving output and execution time In-Reply-To: References: Message-ID: On Thu, Jul 19, 2018 at 1:44 PM Fazlul Huq wrote: > Hello all, > > I can run the following code with this command showing output on the > console: ./poisson_m -ksp_view_solution > What is the question? To put that ASCII output in a file, use -ksp_view_solution :sol.txt There is a chapter in the manual on viewing. Thanks, Matt > The code is: > static char help[] = "Solves a tridiagonal linear system.\n\n"; > > /*T > Concepts: KSP^basic parallel example; > Processors: n > T*/ > > /* > Include "petscksp.h" so that we can use KSP solvers. Note that this file > automatically includes: > petscsys.h - base PETSc routines petscvec.h - vectors > petscmat.h - matrices > petscis.h - index sets petscksp.h - Krylov subspace > methods > petscviewer.h - viewers petscpc.h - preconditioners > > Note: The corresponding uniprocessor example is ex1.c > */ > #include > > int main(int argc,char **args) > { > Vec x, b, u; /* approx solution, RHS, exact solution > */ > Mat A; /* linear system matrix */ > KSP ksp; /* linear solver context */ > PC pc; /* preconditioner context */ > PetscReal norm,tol=1000.*PETSC_MACHINE_EPSILON; /* norm of > solution error */ > PetscErrorCode ierr; > PetscInt i,n = 99,col[3],its,rstart,rend,nlocal; > PetscScalar one = 1.0,hundredth = 0.001,leftbc = 10.001,rightbc = > 15.001,value[3]; > > ierr = PetscInitialize(&argc,&args,(char*)0,help);if (ierr) return ierr; > ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Compute the matrix and right-hand-side vector that define > the linear system, Ax = b. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > > /* > Create vectors. Note that we form 1 vector from scratch and > then duplicate as needed. For this simple case let PETSc decide how > many elements of the vector are stored on each processor. The second > argument to VecSetSizes() below causes PETSc to decide. > */ > ierr = VecCreate(PETSC_COMM_WORLD,&x);CHKERRQ(ierr); > ierr = VecSetSizes(x,PETSC_DECIDE,n);CHKERRQ(ierr); > ierr = VecSetFromOptions(x);CHKERRQ(ierr); > ierr = VecDuplicate(x,&b);CHKERRQ(ierr); > ierr = VecDuplicate(x,&u);CHKERRQ(ierr); > > /* Identify the starting and ending mesh points on each > processor for the interior part of the mesh. We let PETSc decide > above. */ > > ierr = VecGetOwnershipRange(x,&rstart,&rend);CHKERRQ(ierr); > ierr = VecGetLocalSize(x,&nlocal);CHKERRQ(ierr); > > /* > Create matrix. When using MatCreate(), the matrix format can > be specified at runtime. > > Performance tuning note: For problems of substantial size, > preallocation of matrix memory is crucial for attaining good > performance. See the matrix chapter of the users manual for details. > > We pass in nlocal as the "local" size of the matrix to force it > to have the same parallel layout as the vector created above. > */ > ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); > ierr = MatSetSizes(A,nlocal,nlocal,n,n);CHKERRQ(ierr); > ierr = MatSetFromOptions(A);CHKERRQ(ierr); > ierr = MatSetUp(A);CHKERRQ(ierr); > > /* > Assemble matrix. > The linear system is distributed across the processors by > chunks of contiguous rows, which correspond to contiguous > sections of the mesh on which the problem is discretized. > For matrix assembly, each processor contributes entries for > the part that it owns locally. > */ > > > if (!rstart) { > rstart = 1; > i = 0; col[0] = 0; col[1] = 1; value[0] = 2.0; value[1] = -1.0; > ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); > } > if (rend == n) { > rend = n-1; > i = n-1; col[0] = n-2; col[1] = n-1; value[0] = -1.0; value[1] = > 2.0; > ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); > } > > /* Set entries corresponding to the mesh interior */ > value[0] = -1.0; value[1] = 2.0; value[2] = -1.0; > for (i=rstart; i col[0] = i-1; col[1] = i; col[2] = i+1; > ierr = MatSetValues(A,1,&i,3,col,value,INSERT_VALUES);CHKERRQ(ierr); > } > > /* Assemble the matrix */ > ierr = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > ierr = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > /* > Set exact solution; then compute right-hand-side vector. > */ > ierr = VecSet(u,one);CHKERRQ(ierr); > > i=0; > ierr = VecSetValues(b, 1, &i, &leftbc, INSERT_VALUES);CHKERRQ(ierr); > for (i=1; i ierr = VecSetValues(b, 1, &i, &hundredth, INSERT_VALUES);CHKERRQ(ierr); > } > i=n-1; > ierr = VecSetValues(b, 1, &i, &rightbc, INSERT_VALUES);CHKERRQ(ierr); > ierr = VecAssemblyBegin(b);CHKERRQ(ierr); > ierr = VecAssemblyEnd(b);CHKERRQ(ierr); > > // ierr = MatMult(A,u,b);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Create the linear solver and set various options > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > /* > Create linear solver context > */ > ierr = KSPCreate(PETSC_COMM_WORLD,&ksp);CHKERRQ(ierr); > > /* > Set operators. Here the matrix that defines the linear system > also serves as the preconditioning matrix. > */ > ierr = KSPSetOperators(ksp,A,A);CHKERRQ(ierr); > > /* > Set linear solver defaults for this problem (optional). > - By extracting the KSP and PC contexts from the KSP context, > we can then directly call any KSP and PC routines to set > various options. > - The following four statements are optional; all of these > parameters could alternatively be specified at runtime via > KSPSetFromOptions(); > */ > ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr); > ierr = PCSetType(pc,PCJACOBI);CHKERRQ(ierr); > ierr = > KSPSetTolerances(ksp,1.e-7,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr); > > /* > Set runtime options, e.g., > -ksp_type -pc_type -ksp_monitor -ksp_rtol > These options will override those specified above as long as > KSPSetFromOptions() is called _after_ any other customization > routines. > */ > ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Solve the linear system > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > /* > Solve linear system > */ > ierr = KSPSolve(ksp,b,x);CHKERRQ(ierr); > > /* > View solver info; we could instead use the option -ksp_view to > print this info to the screen at the conclusion of KSPSolve(). > */ > ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Check solution and clean up > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > /* > Check the error > */ > ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr); > ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr); > ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr); > if (norm > tol) { > ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, Iterations > %D\n",(double)norm,its);CHKERRQ(ierr); > } > > /* > Free work space. All PETSc objects should be destroyed when they > are no longer needed. > */ > ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = VecDestroy(&u);CHKERRQ(ierr); > ierr = VecDestroy(&b);CHKERRQ(ierr); ierr = MatDestroy(&A);CHKERRQ(ierr); > ierr = KSPDestroy(&ksp);CHKERRQ(ierr); > > /* > Always call PetscFinalize() before exiting a program. This routine > - finalizes the PETSc libraries as well as MPI > - provides summary and diagnostic information if certain runtime > options are chosen (e.g., -log_view). > */ > ierr = PetscFinalize(); > return ierr; > } > > > Now I am trying to save this output in a file (say in a .csv file) at > runtime along with execution time but I can't. > > Any suggestion please! > > Sincerely, > Huq > > -- > > Fazlul Huq > Graduate Research Assistant > Department of Nuclear, Plasma & Radiological Engineering (NPRE) > University of Illinois at Urbana-Champaign (UIUC) > E-mail: huq2090 at gmail.com > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From weston8 at llnl.gov Thu Jul 19 20:44:15 2018 From: weston8 at llnl.gov (Weston, Brian Thomas) Date: Fri, 20 Jul 2018 01:44:15 +0000 Subject: [petsc-users] Better PCGAMG Settings in 2D? Message-ID: Hi Mark, I?m using the default settings with GAMG for 2D problems and it?s performing much worse than BoomerAMG for my problem. I was told, however, that GAMG?s defaults were optimized for 3D problems, so I was wondering if you knew of better settings for 2D or which knobs might be most significant to play with? Is pc mg levels the way to control the number of aggressive coarsening levels? I tried using unsmoothed aggregation, but it was only marginally better than the default. The discretization is a essentially a 2nd-order cell-centered finite-volume scheme and I?m primarily solving a pressure-velocity Schur complement system. best, Brian From bsmith at mcs.anl.gov Thu Jul 19 22:19:03 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Fri, 20 Jul 2018 03:19:03 +0000 Subject: [petsc-users] Parallel QR decomposition In-Reply-To: References: Message-ID: For what purpose do you need a QR? We may have suggestions if we know how you want to use it. Barry > On Jul 19, 2018, at 6:51 AM, David Sommer wrote: > > > Hi, > > i was wondering if there is an implementation of parallel qr decomposition in PETSc. I was looking at > http://www.mcs.anl.gov/petsc/documentation/linearsolvertable.html > but all i found was this non-parallel MATLAB-Solver. Am i searching in the wrong place? > > Best regards, > > David Sommer > From pierpaolo.minelli at cnr.it Fri Jul 20 07:01:18 2018 From: pierpaolo.minelli at cnr.it (Pierpaolo Minelli) Date: Fri, 20 Jul 2018 14:01:18 +0200 Subject: [petsc-users] Solving Linear Systems with Scalar Real and Complex Message-ID: Hi, in my code I have to solve both a system in the field of real numbers and in the field of complex numbers. My approach has been as follows. First I configured PETSc with the --with-scalar-type=complex option. Using this option I have unfortunately lost the possibility to use the two preconditioners ML and Hypre. I later created two subspaces of Krylov and tried to solve the two systems as I used to when solving the only equation in the real numbers field. In order to correctly solve the system in the field of real numbers I had to transform the coefficients from real to complex with an imaginary part equal to zero. Is there a possibility to use a different and better approach to solve my problem? Perhaps an approach where you can continue to use ML and Hypre for system solving in the real numbers field or where you don't need to use complex numbers when real numbers would actually suffice? Thanks in advance Pierpaolo From knepley at gmail.com Fri Jul 20 07:08:07 2018 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 20 Jul 2018 08:08:07 -0400 Subject: [petsc-users] Solving Linear Systems with Scalar Real and Complex In-Reply-To: References: Message-ID: On Fri, Jul 20, 2018 at 8:01 AM Pierpaolo Minelli wrote: > Hi, > > in my code I have to solve both a system in the field of real numbers and > in the field of complex numbers. > My approach has been as follows. > First I configured PETSc with the --with-scalar-type=complex option. > Using this option I have unfortunately lost the possibility to use the two > preconditioners ML and Hypre. > I later created two subspaces of Krylov and tried to solve the two systems > as I used to when solving the only equation in the real numbers field. > In order to correctly solve the system in the field of real numbers I had > to transform the coefficients from real to complex with an imaginary part > equal to zero. > > Is there a possibility to use a different and better approach to solve my > problem? > > Perhaps an approach where you can continue to use ML and Hypre for system > solving in the real numbers field or where you don't need to use complex > numbers when real numbers would actually suffice? > Yes, any linear system in complex numbers can be converted to a system twice as large in real numbers. So far, I think this is the best way to handle it, especially the elliptic ones. Thanks, Matt > Thanks in advance > > Pierpaolo > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierpaolo.minelli at cnr.it Fri Jul 20 07:54:40 2018 From: pierpaolo.minelli at cnr.it (Pierpaolo Minelli) Date: Fri, 20 Jul 2018 14:54:40 +0200 Subject: [petsc-users] Solving Linear Systems with Scalar Real and Complex In-Reply-To: References: Message-ID: <9B7928B6-BE04-4136-8F52-DA4A07BAAC5A@cnr.it> Thanks a lot for the helpful tips. Pierpaolo > Il giorno 20 lug 2018, alle ore 14:08, Matthew Knepley ha scritto: > > On Fri, Jul 20, 2018 at 8:01 AM Pierpaolo Minelli > wrote: > Hi, > > in my code I have to solve both a system in the field of real numbers and in the field of complex numbers. > My approach has been as follows. > First I configured PETSc with the --with-scalar-type=complex option. > Using this option I have unfortunately lost the possibility to use the two preconditioners ML and Hypre. > I later created two subspaces of Krylov and tried to solve the two systems as I used to when solving the only equation in the real numbers field. > In order to correctly solve the system in the field of real numbers I had to transform the coefficients from real to complex with an imaginary part equal to zero. > > Is there a possibility to use a different and better approach to solve my problem? > > Perhaps an approach where you can continue to use ML and Hypre for system solving in the real numbers field or where you don't need to use complex numbers when real numbers would actually suffice? > > Yes, any linear system in complex numbers can be converted to a system twice as large in real numbers. So far, > I think this is the best way to handle it, especially the elliptic ones. > > Thanks, > > Matt > > Thanks in advance > > Pierpaolo > > > > -- > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfadams at lbl.gov Fri Jul 20 11:38:53 2018 From: mfadams at lbl.gov (Mark Adams) Date: Fri, 20 Jul 2018 12:38:53 -0400 Subject: [petsc-users] Better PCGAMG Settings in 2D? In-Reply-To: References: Message-ID: On Thu, Jul 19, 2018 at 9:44 PM Weston, Brian Thomas wrote: > Hi Mark, > > I?m using the default settings with GAMG for 2D problems and it?s > performing much worse than BoomerAMG for my problem. I was told, however, > that GAMG?s defaults were optimized for 3D problems, so I was wondering if > you knew of better settings for 2D or which knobs might be most significant > to play with? Is pc mg levels the way to control the number of aggressive > coarsening levels? I tried using unsmoothed aggregation, but it was only > marginally better than the default. > Are you looking at iteration count or solve time? This is a 5-point stencil. You want to square the graph: '-pc_gamg_square_graph 20' (20 is the number of levels to square the graph, which is infinity really). You can use: -mg_levels_ksp_type richardson -mg_levels_pc_type sor and one processor this is a prefect smoother, just for debugging. And you can run with -info and grep on GAMG and send me the result (about 20 lines). This should give me an idea of what is wrong if these ideas don't work. Mark > The discretization is a essentially a 2nd-order cell-centered > finite-volume scheme and I?m primarily solving a pressure-velocity Schur > complement system. > > best, > Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Fri Jul 20 12:58:58 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Fri, 20 Jul 2018 17:58:58 +0000 Subject: [petsc-users] Solving Linear Systems with Scalar Real and Complex In-Reply-To: References: Message-ID: > On Jul 20, 2018, at 7:01 AM, Pierpaolo Minelli wrote: > > Hi, > > in my code I have to solve both a system in the field of real numbers and in the field of complex numbers. > My approach has been as follows. > First I configured PETSc with the --with-scalar-type=complex option. > Using this option I have unfortunately lost the possibility to use the two preconditioners ML and Hypre. You should still be able to use the PETSc PCGAMG algebraic multigrid solver. Have you tried that? If there are issues let us know because we would like to continue to improve the performance of PCGAMG to get it to be closer to as good as ML and hypre. Barry > I later created two subspaces of Krylov and tried to solve the two systems as I used to when solving the only equation in the real numbers field. > In order to correctly solve the system in the field of real numbers I had to transform the coefficients from real to complex with an imaginary part equal to zero. > > Is there a possibility to use a different and better approach to solve my problem? > > Perhaps an approach where you can continue to use ML and Hypre for system solving in the real numbers field or where you don't need to use complex numbers when real numbers would actually suffice? > > Thanks in advance > > Pierpaolo > From huq2090 at gmail.com Fri Jul 20 13:27:32 2018 From: huq2090 at gmail.com (Fazlul Huq) Date: Fri, 20 Jul 2018 13:27:32 -0500 Subject: [petsc-users] Getting time Message-ID: Hi all, I am trying to get how much time does is take to run the code. I looked at manual (scetion 13.6) as well as here ( http://www.mcs.anl.gov/petsc/petsc-3.9/docs/manualpages/Sys/PetscTime.html#PetscTime) and trying to print time from the following code but I got error message. The code and error messages are as follows: Code: static char help[] = "Solves a tridiagonal linear system.\n\n"; /*T Concepts: KSP^basic parallel example; Processors: n T*/ /* Include "petscksp.h" so that we can use KSP solvers. Note that this file automatically includes: petscsys.h - base PETSc routines petscvec.h - vectors petscmat.h - matrices petscis.h - index sets petscksp.h - Krylov subspace methods petscviewer.h - viewers petscpc.h - preconditioners Note: The corresponding uniprocessor example is ex1.c */ #include #include int main(int argc,char **args) { Vec x, b, u; /* approx solution, RHS, exact solution */ Mat A; /* linear system matrix */ KSP ksp; /* linear solver context */ PC pc; /* preconditioner context */ // PetscTime time; PetscReal v,norm,tol=1000.*PETSC_MACHINE_EPSILON; /* norm of solution error */ PetscErrorCode ierr; PetscInt i,n = 99,col[3],its,rstart,rend,nlocal; PetscScalar one = 1.0,hundredth = 0.001,leftbc = 10.001,rightbc = 15.001,value[3]; ierr = PetscInitialize(&argc,&args,(char*)0,help);if (ierr) return ierr; ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Compute the matrix and right-hand-side vector that define the linear system, Ax = b. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Create vectors. Note that we form 1 vector from scratch and then duplicate as needed. For this simple case let PETSc decide how many elements of the vector are stored on each processor. The second argument to VecSetSizes() below causes PETSc to decide. */ ierr = VecCreate(PETSC_COMM_WORLD,&x);CHKERRQ(ierr); ierr = VecSetSizes(x,PETSC_DECIDE,n);CHKERRQ(ierr); ierr = VecSetFromOptions(x);CHKERRQ(ierr); ierr = VecDuplicate(x,&b);CHKERRQ(ierr); ierr = VecDuplicate(x,&u);CHKERRQ(ierr); /* Identify the starting and ending mesh points on each processor for the interior part of the mesh. We let PETSc decide above. */ ierr = VecGetOwnershipRange(x,&rstart,&rend);CHKERRQ(ierr); ierr = VecGetLocalSize(x,&nlocal);CHKERRQ(ierr); /* Create matrix. When using MatCreate(), the matrix format can be specified at runtime. Performance tuning note: For problems of substantial size, preallocation of matrix memory is crucial for attaining good performance. See the matrix chapter of the users manual for details. We pass in nlocal as the "local" size of the matrix to force it to have the same parallel layout as the vector created above. */ ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); ierr = MatSetSizes(A,nlocal,nlocal,n,n);CHKERRQ(ierr); ierr = MatSetFromOptions(A);CHKERRQ(ierr); ierr = MatSetUp(A);CHKERRQ(ierr); /* Assemble matrix. The linear system is distributed across the processors by chunks of contiguous rows, which correspond to contiguous sections of the mesh on which the problem is discretized. For matrix assembly, each processor contributes entries for the part that it owns locally. */ if (!rstart) { rstart = 1; i = 0; col[0] = 0; col[1] = 1; value[0] = 2.0; value[1] = -1.0; ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); } if (rend == n) { rend = n-1; i = n-1; col[0] = n-2; col[1] = n-1; value[0] = -1.0; value[1] = 2.0; ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); } /* Set entries corresponding to the mesh interior */ value[0] = -1.0; value[1] = 2.0; value[2] = -1.0; for (i=rstart; i -pc_type -ksp_monitor -ksp_rtol These options will override those specified above as long as KSPSetFromOptions() is called _after_ any other customization routines. */ ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Solve the linear system - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Solve linear system */ ierr = KSPSolve(ksp,b,x);CHKERRQ(ierr); /* View solver info; we could instead use the option -ksp_view to print this info to the screen at the conclusion of KSPSolve(). */ ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Check solution and clean up - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Check the error */ ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr); ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr); ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr); if (norm > tol) { ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, Iterations %D\n",(double)norm,its);CHKERRQ(ierr); } // if (!PETSC_TRUE) { // ierr = PetscViewer viewer;CHKERRQ(ierr); // ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD, "Amat.m", &viewer);CHKERRQ(ierr); // ierr = PetscViewerPushFormat(viewer, PETSC_VIEWER_ASCII_MATLAB);CHKERRQ(ierr); // ierr = MatView(A,viewer);CHKERRQ(ierr); // ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr); // ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr); // } ierr = PetscTime(PetscLogDouble *v);CHKERRQ(ierr); ierr = PetscLogDouble v;CHKERRQ(ierr); ierr = PetscTime(&v);CHKERRQ(ierr); ierr = printf(MPI_Wtime, "Time for operation %g\n",(double)v); /* Free work space. All PETSc objects should be destroyed when they are no longer needed. */ ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = VecDestroy(&u);CHKERRQ(ierr); ierr = VecDestroy(&b);CHKERRQ(ierr); ierr = MatDestroy(&A);CHKERRQ(ierr); ierr = KSPDestroy(&ksp);CHKERRQ(ierr); /* Always call PetscFinalize() before exiting a program. This routine - finalizes the PETSc libraries as well as MPI - provides summary and diagnostic information if certain runtime options are chosen (e.g., -log_view). */ ierr = PetscFinalize(); return ierr; } Error Message: jimmy at dave:~/projects/petsc/problems/ksp$ make poisson_m /home/jimmy/projects/petsc/arch-linux2-c-debug/bin/mpicc -o poisson_m.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3 -I/home/jimmy/projects/petsc/include -I/home/jimmy/projects/petsc/arch-linux2-c-debug/include `pwd`/poisson_m.c /home/jimmy/projects/petsc/problems/ksp/poisson_m.c: In function ?main?: /home/jimmy/projects/petsc/problems/ksp/poisson_m.c:200:18: error: expected expression before ?PetscLogDouble? ierr = PetscTime(PetscLogDouble *v);CHKERRQ(ierr); ^~~~~~~~~~~~~~ /home/jimmy/projects/petsc/problems/ksp/poisson_m.c:201:8: error: expected expression before ?PetscLogDouble? ierr = PetscLogDouble v;CHKERRQ(ierr); ^~~~~~~~~~~~~~ /home/jimmy/projects/petsc/problems/ksp/poisson_m.c:203:15: warning: passing argument 1 of ?printf? from incompatible pointer type [-Wincompatible-pointer-types] ierr = printf(MPI_Wtime, "Time for operation %g\n",(double)v); ^~~~~~~~~ In file included from /home/jimmy/projects/petsc/include/petscsys.h:175:0, from /home/jimmy/projects/petsc/include/petscis.h:7, from /home/jimmy/projects/petsc/include/petscvec.h:9, from /home/jimmy/projects/petsc/include/petscmat.h:6, from /home/jimmy/projects/petsc/include/petscpc.h:6, from /home/jimmy/projects/petsc/include/petscksp.h:6, from /home/jimmy/projects/petsc/problems/ksp/poisson_m.c:21: /usr/include/stdio.h:362:12: note: expected ?const char * restrict? but argument is of type ?double (*)(void)? extern int printf (const char *__restrict __format, ...); ^~~~~~ /home/jimmy/projects/petsc/lib/petsc/conf/rules:359: recipe for target 'poisson_m.o' failed make: *** [poisson_m.o] Error 1 Thanks in advance. Sincerely, Huq -- Fazlul Huq Graduate Research Assistant Department of Nuclear, Plasma & Radiological Engineering (NPRE) University of Illinois at Urbana-Champaign (UIUC) E-mail: huq2090 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Fri Jul 20 13:29:59 2018 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 20 Jul 2018 14:29:59 -0400 Subject: [petsc-users] Getting time In-Reply-To: References: Message-ID: On Fri, Jul 20, 2018 at 2:27 PM Fazlul Huq wrote: > Hi all, > > I am trying to get how much time does is take to run the code. I looked at > manual (scetion 13.6) as well as here ( > http://www.mcs.anl.gov/petsc/petsc-3.9/docs/manualpages/Sys/PetscTime.html#PetscTime) > and trying to print time from the following code but I got error message. > The code and error messages are as follows: > > Code: > > static char help[] = "Solves a tridiagonal linear system.\n\n"; > > /*T > Concepts: KSP^basic parallel example; > Processors: n > T*/ > > > > /* > Include "petscksp.h" so that we can use KSP solvers. Note that this file > automatically includes: > petscsys.h - base PETSc routines petscvec.h - vectors > petscmat.h - matrices > petscis.h - index sets petscksp.h - Krylov subspace > methods > petscviewer.h - viewers petscpc.h - preconditioners > > Note: The corresponding uniprocessor example is ex1.c > */ > #include > #include > > int main(int argc,char **args) > { > Vec x, b, u; /* approx solution, RHS, exact solution > */ > Mat A; /* linear system matrix */ > KSP ksp; /* linear solver context */ > PC pc; /* preconditioner context */ > // PetscTime time; > PetscReal v,norm,tol=1000.*PETSC_MACHINE_EPSILON; /* norm of > solution error */ > PetscErrorCode ierr; > PetscInt i,n = 99,col[3],its,rstart,rend,nlocal; > PetscScalar one = 1.0,hundredth = 0.001,leftbc = 10.001,rightbc = > 15.001,value[3]; > > ierr = PetscInitialize(&argc,&args,(char*)0,help);if (ierr) return ierr; > ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Compute the matrix and right-hand-side vector that define > the linear system, Ax = b. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > > /* > Create vectors. Note that we form 1 vector from scratch and > then duplicate as needed. For this simple case let PETSc decide how > many elements of the vector are stored on each processor. The second > argument to VecSetSizes() below causes PETSc to decide. > */ > ierr = VecCreate(PETSC_COMM_WORLD,&x);CHKERRQ(ierr); > ierr = VecSetSizes(x,PETSC_DECIDE,n);CHKERRQ(ierr); > ierr = VecSetFromOptions(x);CHKERRQ(ierr); > ierr = VecDuplicate(x,&b);CHKERRQ(ierr); > ierr = VecDuplicate(x,&u);CHKERRQ(ierr); > > /* Identify the starting and ending mesh points on each > processor for the interior part of the mesh. We let PETSc decide > above. */ > > ierr = VecGetOwnershipRange(x,&rstart,&rend);CHKERRQ(ierr); > ierr = VecGetLocalSize(x,&nlocal);CHKERRQ(ierr); > > /* > Create matrix. When using MatCreate(), the matrix format can > be specified at runtime. > > Performance tuning note: For problems of substantial size, > preallocation of matrix memory is crucial for attaining good > performance. See the matrix chapter of the users manual for details. > > We pass in nlocal as the "local" size of the matrix to force it > to have the same parallel layout as the vector created above. > */ > ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); > ierr = MatSetSizes(A,nlocal,nlocal,n,n);CHKERRQ(ierr); > ierr = MatSetFromOptions(A);CHKERRQ(ierr); > ierr = MatSetUp(A);CHKERRQ(ierr); > > /* > Assemble matrix. > > The linear system is distributed across the processors by > chunks of contiguous rows, which correspond to contiguous > sections of the mesh on which the problem is discretized. > For matrix assembly, each processor contributes entries for > the part that it owns locally. > */ > > > if (!rstart) { > rstart = 1; > i = 0; col[0] = 0; col[1] = 1; value[0] = 2.0; value[1] = -1.0; > ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); > } > if (rend == n) { > rend = n-1; > i = n-1; col[0] = n-2; col[1] = n-1; value[0] = -1.0; value[1] = > 2.0; > ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); > } > > /* Set entries corresponding to the mesh interior */ > value[0] = -1.0; value[1] = 2.0; value[2] = -1.0; > for (i=rstart; i col[0] = i-1; col[1] = i; col[2] = i+1; > ierr = MatSetValues(A,1,&i,3,col,value,INSERT_VALUES);CHKERRQ(ierr); > } > > /* Assemble the matrix */ > ierr = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > ierr = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > /* > Set exact solution; then compute right-hand-side vector. > */ > ierr = VecSet(u,one);CHKERRQ(ierr); > > i=0; > ierr = VecSetValues(b, 1, &i, &leftbc, INSERT_VALUES);CHKERRQ(ierr); > for (i=1; i ierr = VecSetValues(b, 1, &i, &hundredth, INSERT_VALUES);CHKERRQ(ierr); > } > i=n-1; > ierr = VecSetValues(b, 1, &i, &rightbc, INSERT_VALUES);CHKERRQ(ierr); > ierr = VecAssemblyBegin(b);CHKERRQ(ierr); > ierr = VecAssemblyEnd(b);CHKERRQ(ierr); > > // ierr = MatMult(A,u,b);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Create the linear solver and set various options > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > /* > Create linear solver context > */ > ierr = KSPCreate(PETSC_COMM_WORLD,&ksp);CHKERRQ(ierr); > > /* > Set operators. Here the matrix that defines the linear system > also serves as the preconditioning matrix. > */ > ierr = KSPSetOperators(ksp,A,A);CHKERRQ(ierr); > > /* > Set linear solver defaults for this problem (optional). > - By extracting the KSP and PC contexts from the KSP context, > we can then directly call any KSP and PC routines to set > various options. > - The following four statements are optional; all of these > parameters could alternatively be specified at runtime via > KSPSetFromOptions(); > */ > ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr); > ierr = PCSetType(pc,PCJACOBI);CHKERRQ(ierr); > ierr = > KSPSetTolerances(ksp,1.e-7,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr); > > /* > Set runtime options, e.g., > -ksp_type -pc_type -ksp_monitor -ksp_rtol > These options will override those specified above as long as > KSPSetFromOptions() is called _after_ any other customization > routines. > */ > ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Solve the linear system > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > /* > Solve linear system > */ > ierr = KSPSolve(ksp,b,x);CHKERRQ(ierr); > > /* > View solver info; we could instead use the option -ksp_view to > print this info to the screen at the conclusion of KSPSolve(). > */ > ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr); > > /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Check solution and clean up > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ > /* > Check the error > */ > ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr); > ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr); > ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr); > if (norm > tol) { > ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, Iterations > %D\n",(double)norm,its);CHKERRQ(ierr); > } > > // if (!PETSC_TRUE) { > // ierr = PetscViewer viewer;CHKERRQ(ierr); > // ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD, "Amat.m", > &viewer);CHKERRQ(ierr); > // ierr = PetscViewerPushFormat(viewer, > PETSC_VIEWER_ASCII_MATLAB);CHKERRQ(ierr); > // ierr = MatView(A,viewer);CHKERRQ(ierr); > // ierr = PetscViewerPopFormat(viewer);CHKERRQ(ierr); > // ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr); > // } > ierr = PetscTime(PetscLogDouble *v);CHKERRQ(ierr); > 1) This is the function declaration, not a call 2) Use -log_view, not explicit timers Matt > ierr = PetscLogDouble v;CHKERRQ(ierr); > ierr = PetscTime(&v);CHKERRQ(ierr); > ierr = printf(MPI_Wtime, "Time for operation %g\n",(double)v); > > /* > Free work space. All PETSc objects should be destroyed when they > are no longer needed. > */ > ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = VecDestroy(&u);CHKERRQ(ierr); > ierr = VecDestroy(&b);CHKERRQ(ierr); ierr = MatDestroy(&A);CHKERRQ(ierr); > ierr = KSPDestroy(&ksp);CHKERRQ(ierr); > > /* > Always call PetscFinalize() before exiting a program. This routine > - finalizes the PETSc libraries as well as MPI > - provides summary and diagnostic information if certain runtime > options are chosen (e.g., -log_view). > */ > ierr = PetscFinalize(); > return ierr; > } > > Error Message: > jimmy at dave:~/projects/petsc/problems/ksp$ make poisson_m > /home/jimmy/projects/petsc/arch-linux2-c-debug/bin/mpicc -o poisson_m.o -c > -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas > -fstack-protector -fvisibility=hidden -g3 > -I/home/jimmy/projects/petsc/include > -I/home/jimmy/projects/petsc/arch-linux2-c-debug/include > `pwd`/poisson_m.c > /home/jimmy/projects/petsc/problems/ksp/poisson_m.c: In function ?main?: > /home/jimmy/projects/petsc/problems/ksp/poisson_m.c:200:18: error: > expected expression before ?PetscLogDouble? > ierr = PetscTime(PetscLogDouble *v);CHKERRQ(ierr); > ^~~~~~~~~~~~~~ > /home/jimmy/projects/petsc/problems/ksp/poisson_m.c:201:8: error: expected > expression before ?PetscLogDouble? > ierr = PetscLogDouble v;CHKERRQ(ierr); > ^~~~~~~~~~~~~~ > /home/jimmy/projects/petsc/problems/ksp/poisson_m.c:203:15: warning: > passing argument 1 of ?printf? from incompatible pointer type > [-Wincompatible-pointer-types] > ierr = printf(MPI_Wtime, "Time for operation %g\n",(double)v); > ^~~~~~~~~ > In file included from /home/jimmy/projects/petsc/include/petscsys.h:175:0, > from /home/jimmy/projects/petsc/include/petscis.h:7, > from /home/jimmy/projects/petsc/include/petscvec.h:9, > from /home/jimmy/projects/petsc/include/petscmat.h:6, > from /home/jimmy/projects/petsc/include/petscpc.h:6, > from /home/jimmy/projects/petsc/include/petscksp.h:6, > from > /home/jimmy/projects/petsc/problems/ksp/poisson_m.c:21: > /usr/include/stdio.h:362:12: note: expected ?const char * restrict? but > argument is of type ?double (*)(void)? > extern int printf (const char *__restrict __format, ...); > ^~~~~~ > /home/jimmy/projects/petsc/lib/petsc/conf/rules:359: recipe for target > 'poisson_m.o' failed > make: *** [poisson_m.o] Error 1 > > Thanks in advance. > > Sincerely, > Huq > > -- > > Fazlul Huq > Graduate Research Assistant > Department of Nuclear, Plasma & Radiological Engineering (NPRE) > University of Illinois at Urbana-Champaign (UIUC) > E-mail: huq2090 at gmail.com > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From shuwang12 at unm.edu Fri Jul 20 20:18:38 2018 From: shuwang12 at unm.edu (Shu Wang) Date: Sat, 21 Jul 2018 01:18:38 +0000 Subject: [petsc-users] Tao's user-defined Monitor crashes Message-ID: Hi all, I ran into a error with user-defined tao's monitor with TaoSetMonitor in Fortran. When I ran the example eptorsion2f in $PETSC_DIR/src/tao/unconstrained/examples/tutorials/ with '-testmonitor', there split the following error, [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors [0]PETSC ERROR: likely location of problem given in stack below [0]PETSC ERROR: --------------------- Stack Frames ------------------------------------ [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available, [0]PETSC ERROR: INSTEAD the line number of the start of the function [0]PETSC ERROR: is given. [0]PETSC ERROR: [0] TaoCancelMonitors line 1444 /home/ws/Softwares/petsc-3.9.3/src/tao/interface/taosolver.c [0]PETSC ERROR: [0] TaoDestroy line 276 /home/ws/Softwares/petsc-3.9.3/src/tao/interface/taosolver.c [0]PETSC ERROR: --------------------- Error Message ------------------------------------------------------------- My configuration for petsc-3.9.3 is as follows: --with-metis-dir=/usr/local/ --with-parmetis-dir=/usr/local/ --download-hdf5 -with-debugging=1 --with-mpi-dir=/usr/local/openmpi --download-fblaslapack --with-fortran-datatypes. and the compiler is gcc-4.7.4 with openmpi/2.0.1. Is there any bug associate with tao's destroy routine with user-defined monitor is invoked? Any comments are welcomed. Yours sincerely, Shu Wang Electrical and Computer Engineering Department of University of New Mexico Albuquerque, NM -------------- next part -------------- An HTML attachment was scrubbed... URL: From adener at anl.gov Fri Jul 20 20:58:49 2018 From: adener at anl.gov (Dener, Alp) Date: Sat, 21 Jul 2018 01:58:49 +0000 Subject: [petsc-users] Tao's user-defined Monitor crashes In-Reply-To: References: Message-ID: Hi Shu, I can confirm that I?m getting the same error on my end as well. I checked the eptorsion2f test and I don?t see anything immediately wrong with it. I think something may be bugged about the Fortran interface for TaoSetMonitor, or alternatively the internal fortran function pointer mapping for monitors, monitor contexts and monitor destroy functions. I will take a closer look at this over the weekend and we will get a fix for this tested and merged to master as soon as possible. Thanks! ________________________________ Alp Dener Argonne National Laboratory mcs.anl.gov/person/alp-dener On July 20, 2018 at 8:19:12 PM, Shu Wang (shuwang12 at unm.edu) wrote: Hi all, I ran into a error with user-defined tao's monitor with TaoSetMonitor in Fortran. When I ran the example eptorsion2f in $PETSC_DIR/src/tao/unconstrained/examples/tutorials/ with '-testmonitor', there split the following error, [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors [0]PETSC ERROR: likely location of problem given in stack below [0]PETSC ERROR: --------------------- Stack Frames ------------------------------------ [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available, [0]PETSC ERROR: INSTEAD the line number of the start of the function [0]PETSC ERROR: is given. [0]PETSC ERROR: [0] TaoCancelMonitors line 1444 /home/ws/Softwares/petsc-3.9.3/src/tao/interface/taosolver.c [0]PETSC ERROR: [0] TaoDestroy line 276 /home/ws/Softwares/petsc-3.9.3/src/tao/interface/taosolver.c [0]PETSC ERROR: --------------------- Error Message ------------------------------------------------------------- My configuration for petsc-3.9.3 is as follows: --with-metis-dir=/usr/local/ --with-parmetis-dir=/usr/local/ --download-hdf5 -with-debugging=1 --with-mpi-dir=/usr/local/openmpi --download-fblaslapack --with-fortran-datatypes. and the compiler is gcc-4.7.4 with openmpi/2.0.1. Is there any bug associate with tao's destroy routine with user-defined monitor is invoked? Any comments are welcomed. Yours sincerely, Shu Wang Electrical and Computer Engineering Department of University of New Mexico Albuquerque, NM -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlohry at gmail.com Sun Jul 22 08:43:22 2018 From: mlohry at gmail.com (Mark Lohry) Date: Sun, 22 Jul 2018 09:43:22 -0400 Subject: [petsc-users] Modifying the computed TS step, TSSetPostStep vs TSSetPostEvaluate Message-ID: For the time iteration y(t+dt) = y(t) + dt * R(y,t,...) I need to apply a spectral filter to R prior to moving to the next step, e.g. so not use exactly the step computed by TS. Where is the appropriate place to do this? SNES provides SNESLineSearchSetPostCheck where you can modify the newton step; is there a TS equivalent? Or do I need to internally maintain a copy of y(t) to re-compute R and then call TSSetSolution with a modified vector? -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefano.zampini at gmail.com Sun Jul 22 09:06:09 2018 From: stefano.zampini at gmail.com (Stefano Zampini) Date: Sun, 22 Jul 2018 11:36:09 -0230 Subject: [petsc-users] Modifying the computed TS step, TSSetPostStep vs TSSetPostEvaluate In-Reply-To: References: Message-ID: If the filter is part got your residual evaluation (your R), then you should do it inside your RHS function itself. Instead, if the filter applies to y(t+dt), you should do it in PostEvaluate. Note that PostStep is equivalent to PostEvaluate if you don?t have TSEvents set. > On Jul 22, 2018, at 11:13 AM, Mark Lohry wrote: > > For the time iteration > > y(t+dt) = y(t) + dt * R(y,t,...) > > I need to apply a spectral filter to R prior to moving to the next step, e.g. so not use exactly the step computed by TS. > > Where is the appropriate place to do this? SNES provides SNESLineSearchSetPostCheck where you can modify the newton step; is there a TS equivalent? > > Or do I need to internally maintain a copy of y(t) to re-compute R and then call TSSetSolution with a modified vector? From mlohry at gmail.com Sun Jul 22 09:17:00 2018 From: mlohry at gmail.com (Mark Lohry) Date: Sun, 22 Jul 2018 10:17:00 -0400 Subject: [petsc-users] Modifying the computed TS step, TSSetPostStep vs TSSetPostEvaluate In-Reply-To: References: Message-ID: Thanks Stefano. If the filter is part got your residual evaluation (your R), then you > should do it inside your RHS function itself. I've tried this and it works okay for explicit, but with implicit it seems to totally tank the krylov convergence. Instead, if the filter applies to y(t+dt), you should do it in > PostEvaluate. Note that PostStep is equivalent to PostEvaluate if you don?t > have TSEvents set. And it's okay to call a TSSetSolution here without any side effects? The filter is only applied to the time step direction, not y(t+dt) itself (i.e. if R=0 then y(t+dt) should equal y(t) without any filter effects), so I assume I'll have to store the previous time step and manually do the arithmetic here. On Sun, Jul 22, 2018 at 10:06 AM, Stefano Zampini wrote: > If the filter is part got your residual evaluation (your R), then you > should do it inside your RHS function itself. > > Instead, if the filter applies to y(t+dt), you should do it in > PostEvaluate. Note that PostStep is equivalent to PostEvaluate if you don?t > have TSEvents set. > > > On Jul 22, 2018, at 11:13 AM, Mark Lohry wrote: > > > > For the time iteration > > > > y(t+dt) = y(t) + dt * R(y,t,...) > > > > I need to apply a spectral filter to R prior to moving to the next step, > e.g. so not use exactly the step computed by TS. > > > > Where is the appropriate place to do this? SNES provides > SNESLineSearchSetPostCheck where you can modify the newton step; is there a > TS equivalent? > > > > Or do I need to internally maintain a copy of y(t) to re-compute R and > then call TSSetSolution with a modified vector? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefano.zampini at gmail.com Sun Jul 22 09:21:13 2018 From: stefano.zampini at gmail.com (Stefano Zampini) Date: Sun, 22 Jul 2018 11:51:13 -0230 Subject: [petsc-users] Modifying the computed TS step, TSSetPostStep vs TSSetPostEvaluate In-Reply-To: References: Message-ID: <1EED43F0-B834-4B6A-B14D-E32BCE72CAC6@gmail.com> > On Jul 22, 2018, at 11:47 AM, Mark Lohry wrote: > > Thanks Stefano. > > If the filter is part got your residual evaluation (your R), then you should do it inside your RHS function itself. > > I've tried this and it works okay for explicit, but with implicit it seems to totally tank the krylov convergence. > What do you mean by ?tank?? more iterations? larger time to solution? Also, which kind of filter is this? Probably you are changing the sparsity of the Jacobian. > > Instead, if the filter applies to y(t+dt), you should do it in PostEvaluate. Note that PostStep is equivalent to PostEvaluate if you don?t have TSEvents set. > > And it's okay to call a TSSetSolution here without any side effects? > There?s no need to call TSSetSolution inside the PostEvaluate routine. Just call TSGetSolution(ts,&U) and apply your filter on U. You are allowed to change U inside the post evaluate routine. > The filter is only applied to the time step direction, not y(t+dt) itself (i.e. if R=0 then y(t+dt) should equal y(t) without any filter effects), so I assume I'll have to store the previous time step and manually do the arithmetic here. > > On Sun, Jul 22, 2018 at 10:06 AM, Stefano Zampini > wrote: > If the filter is part got your residual evaluation (your R), then you should do it inside your RHS function itself. > > Instead, if the filter applies to y(t+dt), you should do it in PostEvaluate. Note that PostStep is equivalent to PostEvaluate if you don?t have TSEvents set. > > > On Jul 22, 2018, at 11:13 AM, Mark Lohry > wrote: > > > > For the time iteration > > > > y(t+dt) = y(t) + dt * R(y,t,...) > > > > I need to apply a spectral filter to R prior to moving to the next step, e.g. so not use exactly the step computed by TS. > > > > Where is the appropriate place to do this? SNES provides SNESLineSearchSetPostCheck where you can modify the newton step; is there a TS equivalent? > > > > Or do I need to internally maintain a copy of y(t) to re-compute R and then call TSSetSolution with a modified vector? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlohry at gmail.com Sun Jul 22 11:17:54 2018 From: mlohry at gmail.com (Mark Lohry) Date: Sun, 22 Jul 2018 12:17:54 -0400 Subject: [petsc-users] Modifying the computed TS step, TSSetPostStep vs TSSetPostEvaluate In-Reply-To: <1EED43F0-B834-4B6A-B14D-E32BCE72CAC6@gmail.com> References: <1EED43F0-B834-4B6A-B14D-E32BCE72CAC6@gmail.com> Message-ID: > > > What do you mean by ?tank?? more iterations? larger time to solution? > Also, which kind of filter is this? Probably you are changing the sparsity > of the Jacobian. > > This is a cell-local exponential filter in DG so it shouldn't change the sparsity. By "tank" I mean I've seen it take 2x more krylov iterations or worse when i apply the same filter directly to the RHS evaluation... although saying that now I'm having trouble recreating it and it's converging fine with a filtered right hand side. I've done some experiments with applying the same filter (a) to the right hand side directly, (b) to the newton search direction at each SNES step, and (c) to the time step update. (c) seems to be preferable, (b) has never worked for me, (a) works for explicit at least, but is of course more dissipative. There?s no need to call TSSetSolution inside the PostEvaluate routine. Just > call TSGetSolution(ts,&U) and apply your filter on U. You are allowed to > change U inside the post evaluate routine. Perfect, thanks! On Sun, Jul 22, 2018 at 10:21 AM, Stefano Zampini wrote: > > On Jul 22, 2018, at 11:47 AM, Mark Lohry wrote: > > Thanks Stefano. > > If the filter is part got your residual evaluation (your R), then you >> should do it inside your RHS function itself. > > > I've tried this and it works okay for explicit, but with implicit it seems > to totally tank the krylov convergence. > > > What do you mean by ?tank?? more iterations? larger time to solution? > Also, which kind of filter is this? Probably you are changing the sparsity > of the Jacobian. > > > Instead, if the filter applies to y(t+dt), you should do it in >> PostEvaluate. Note that PostStep is equivalent to PostEvaluate if you don?t >> have TSEvents set. > > > And it's okay to call a TSSetSolution here without any side effects? > > > There?s no need to call TSSetSolution inside the PostEvaluate routine. > Just call TSGetSolution(ts,&U) and apply your filter on U. You are allowed > to change U inside the post evaluate routine. > > The filter is only applied to the time step direction, not y(t+dt) itself > (i.e. if R=0 then y(t+dt) should equal y(t) without any filter effects), so > I assume I'll have to store the previous time step and manually do the > arithmetic here. > > On Sun, Jul 22, 2018 at 10:06 AM, Stefano Zampini < > stefano.zampini at gmail.com> wrote: > >> If the filter is part got your residual evaluation (your R), then you >> should do it inside your RHS function itself. >> >> Instead, if the filter applies to y(t+dt), you should do it in >> PostEvaluate. Note that PostStep is equivalent to PostEvaluate if you don?t >> have TSEvents set. >> >> > On Jul 22, 2018, at 11:13 AM, Mark Lohry wrote: >> > >> > For the time iteration >> > >> > y(t+dt) = y(t) + dt * R(y,t,...) >> > >> > I need to apply a spectral filter to R prior to moving to the next >> step, e.g. so not use exactly the step computed by TS. >> > >> > Where is the appropriate place to do this? SNES provides >> SNESLineSearchSetPostCheck where you can modify the newton step; is there a >> TS equivalent? >> > >> > Or do I need to internally maintain a copy of y(t) to re-compute R and >> then call TSSetSolution with a modified vector? >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zakaryah at gmail.com Sun Jul 22 15:31:47 2018 From: zakaryah at gmail.com (zakaryah) Date: Sun, 22 Jul 2018 16:31:47 -0400 Subject: [petsc-users] Fwd: Implementing a homotopy solver In-Reply-To: References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> Message-ID: OK, thanks, I understand now. FormJacobian() has two matrices as arguments, the Jacobian Amat and the preconditioner Pmat, which may be the same. My FormJacobian() routine sets the values of the Jacobian in Pmat. So, to calculate the effective nullspace of the submatrix, I want to solve Pmat u = b. To do this within FormJacobian(), can I assemble Pmat, call SNESGetKSP(snes,&ksp), and then KSPSolve(ksp,b,u)? Is it safe to assume that the KSP matrix is Pmat? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jed at jedbrown.org Sun Jul 22 15:38:41 2018 From: jed at jedbrown.org (Jed Brown) Date: Sun, 22 Jul 2018 14:38:41 -0600 Subject: [petsc-users] AGU Session: DI002: Advances in Computational Geosciences Message-ID: <87a7qj57la.fsf@jedbrown.org> If you are thinking about attending the American Geophysical Union Fall Meeting (Dec 10-14 in Washington, DC), please consider submitting an abstract to this interdisciplinary session. Abstracts are due August 1. DI002: Advances in Computational Geosciences This session highlights advances in the theory and practice of computational geoscience, from improvements in numerical methods to their application to outstanding problems in the Earth sciences. Common issues include robust and efficient solvers, multiscale discretizations, design of benchmark problems and standards for comparison. Increasing data and computational power necessitates open source scientific libraries and workflow automation for model setup, 3D feature connectivity, and data assimilation, and automation in uncertainty representation and propagation, optimal design of field studies, risk quantification, and testing the predictive power of numerical simulations. By bringing these crosscutting computational activities together in one session, we hope to sharpen our collective understanding of fundamental challenges, level of rigor, and opportunities for reusable implementations. Contributions from all areas are welcome, including, but not limited to, fault modeling, tectonics, subduction, seismology, magma dynamics, mantle convection, the core, as well as surface processes, hydrology, and cryosphere. Conveners: Juliane Dannberg, Marc Spiegelman, Jed Brown, Dave May Confirmed invited presenters: Jacky Austermann, Donna Calhoun https://agu.confex.com/agu/fm18/prelim.cgi/Session/52127 From bsmith at mcs.anl.gov Sun Jul 22 18:19:42 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Sun, 22 Jul 2018 23:19:42 +0000 Subject: [petsc-users] Fwd: Implementing a homotopy solver In-Reply-To: References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> Message-ID: <29B68A54-9D29-4881-AD80-98A5E510FD82@anl.gov> > On Jul 22, 2018, at 4:31 PM, zakaryah wrote: > > OK, thanks, I understand now. > > FormJacobian() has two matrices as arguments, the Jacobian Amat and the preconditioner Pmat, which may be the same. My FormJacobian() routine sets the values of the Jacobian in Pmat. So, to calculate the effective nullspace of the submatrix, What "submatrix" are you referring to? Are you calling Pmat a submatrix?, if so why? Is b then here the zero vector? > I want to solve Pmat u = b. To do this within FormJacobian(), can I assemble Pmat, call SNESGetKSP(snes,&ksp), and then KSPSolve(ksp,b,u)? Is it safe to assume that the KSP matrix is Pmat? > > The KSPSolve used by SNES solves Amat delta u = -F(u) building the preconditioner from the matrix Pmat. > From zakaryah at gmail.com Sun Jul 22 20:09:57 2018 From: zakaryah at gmail.com (zakaryah) Date: Sun, 22 Jul 2018 21:09:57 -0400 Subject: [petsc-users] Fwd: Implementing a homotopy solver In-Reply-To: <29B68A54-9D29-4881-AD80-98A5E510FD82@anl.gov> References: <6377AF62-D548-4276-A2A6-158EE4513593@anl.gov> <00D16613-4B28-4801-96EA-7CE2EF8BF8F7@imperial.ac.uk> <29B68A54-9D29-4881-AD80-98A5E510FD82@anl.gov> Message-ID: ?Thanks Matt and Barry, Matt - if I do the calculation in FormJacobian(), which makes by far the most sense and is as per your suggestion, do I need to set the operators of the SNES's KSP back to whatever they were before I set them? The linear system I want to solve within FormJacobian() involves the Jacobian matrix itself, and I want to remove the "nullspace" from that same matrix within FormFunction(). Barry - I'm trying to implement a homotopy solver. In short, I have a system of n nonlinear equations in n variables, F(x), which is hard to solve because the Jacobian tends to become singular using standard methods?. I want to add an auxiliary variable, lambda, to create a homotopy: H(lambda,x) = lambda*F(x) + (1-lambda)G(x), where G is "easy to solve", and the idea is that the Jacobian of the n+1 variable system will not become singular along the curve H(lambda,x) = 0. The method involves adding an equation to H so that the Jacobian H' is square. The "submatrix" refers to the n x (n+1) matrix which represents the Jacobian without the added equation, whereas my FormJacobian() forms the entire (n+1) x (n+1) matrix H'. I only refer to the submatrix because it has a nullspace, and I want to find it by solving a linear system designed for this purpose, H' u = b, where b is not the zero vector. H' has no nullspace, but I want to remove the projection of u from my SNES solution vector, as u IS in the nullspace of the submatrix. The RHS vector b can be calculated outside the SNES solve. I guess my FormJacobian() should look like this: FormJacobian(SNES snes, Vec x, Mat Amat, Mat Pmat, void *ctx) { KSP ksp; MatNullSpace unull; user_struct *user = (user_struct*)ctx; calculate Amat assemble Amat if (Pmat != Amat) { assemble Amat } SNESGetKSP(snes,&ksp); KSPSetOperators(ksp,Amat,Pmat); KSPSolve(ksp,user->b,user->u); MatNullSpaceCreate(PetscObjectComm((PetscObject)Amat), PETSC_FALSE, 1, &(user->u),&unull); MatSetNullSpace(Amat,unull); MatNullSpaceDestroy(&unull); } Does this look right? -------------- next part -------------- An HTML attachment was scrubbed... URL: From 328937290 at qq.com Mon Jul 23 03:26:24 2018 From: 328937290 at qq.com (=?gb18030?B?vfBkZWdhbmc=?=) Date: Mon, 23 Jul 2018 16:26:24 +0800 Subject: [petsc-users] MatCreateMPIAIJWithArrays Message-ID: Hello, I am a beginner user. I meet a problem. I have a very big matrix. In shaping the matrix, every nodes produce some rows of it. So it is very easy to store it with files at every node. In the solve Ax=b, I hope every node to read the file and construct the big matrix in parallel. Every file's is a sub matrix which is row block. So I use MatCreateMPIAIJWithArrays to Create the matrix. For example: -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 --------------------------------------------------------------- 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 --------------------------------------------------------------- 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 --------------------------------------------------------------- 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 --------------------------------------------------------------- 0 0 0 0 0 0 0 0 -1 2 0 0 0 0 0 0 0 0 0 -1 Node 1 0-1 row block Node 2 2-3 row block Node 3 4-5 row block Node 4 6-7 row block Node 5 8-9 row block use MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node1 MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node2 MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node3 MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node4 MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node5 but there are error . sum of cols of five nodes is not equal 10 (global column). How to solve this problem, Hope to get your help! thanks Degang Jin -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Jul 23 03:37:50 2018 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 23 Jul 2018 04:37:50 -0400 Subject: [petsc-users] MatCreateMPIAIJWithArrays In-Reply-To: References: Message-ID: On Mon, Jul 23, 2018 at 4:26 AM ?degang <328937290 at qq.com> wrote: > Hello, > I am a beginner user. I meet a problem. I have a very big matrix. > In shaping the matrix, every nodes produce some rows of it. So it is very > easy to store it with files at every node. In the solve Ax=b, I hope every > node to read the file and construct the big matrix in parallel. Every > file's is a sub matrix which is row block. So I > use MatCreateMPIAIJWithArrays to Create the matrix. > 1) Just give PETSC_DETERMINE for the number of local columns 2) I would caution you about this design. I do not think it will accomplish what you want: a) Modern machines are not scalable with respect to file I/O. Thus reading for a bunch of files onto a bunch of processes will not scale well. You just want to put it in a single file and distribute from proc 0. If you use PETSc binary or HDF5, it will do this. b) Using separate files prescribes the parallelism, which is inflexible. Done the other way, you can launch on any number of processes. Thanks, Matt > For example: > -1 2 -1 0 0 0 0 0 0 0 > 0 -1 2 -1 0 0 0 0 0 0 > --------------------------------------------------------------- > 0 0 -1 2 -1 0 0 0 0 0 > 0 0 0 -1 0 0 0 0 0 0 > --------------------------------------------------------------- > 0 0 0 0 -1 2 -1 0 0 0 > 0 0 0 0 0 -1 2 -1 0 0 > --------------------------------------------------------------- > 0 0 0 0 0 0 -1 2 -1 0 > 0 0 0 0 0 0 0 -1 2 -1 > --------------------------------------------------------------- > 0 0 0 0 0 0 0 0 -1 2 > 0 0 0 0 0 0 0 0 0 -1 > > Node 1 0-1 row block > Node 2 2-3 row block > Node 3 4-5 row block > Node 4 6-7 row block > Node 5 8-9 row block > > use > > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node1 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node2 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node3 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node4 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node5 > > but there are error . sum of cols of five nodes is not equal 10 (global > column). > > How to solve this problem, Hope to get your help! > > thanks > > Degang Jin > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierpaolo.minelli at cnr.it Mon Jul 23 05:51:53 2018 From: pierpaolo.minelli at cnr.it (Pierpaolo Minelli) Date: Mon, 23 Jul 2018 12:51:53 +0200 Subject: [petsc-users] Solving Linear Systems with Scalar Real and Complex In-Reply-To: References: Message-ID: <405250E7-D339-4F7A-BD0D-B008D6B3FC8D@cnr.it> > Il giorno 20 lug 2018, alle ore 19:58, Smith, Barry F. ha scritto: > > > >> On Jul 20, 2018, at 7:01 AM, Pierpaolo Minelli wrote: >> >> Hi, >> >> in my code I have to solve both a system in the field of real numbers and in the field of complex numbers. >> My approach has been as follows. >> First I configured PETSc with the --with-scalar-type=complex option. >> Using this option I have unfortunately lost the possibility to use the two preconditioners ML and Hypre. > > You should still be able to use the PETSc PCGAMG algebraic multigrid solver. Have you tried that? If there are issues let us know because we would like to continue to improve the performance of PCGAMG to get it to be closer to as good as ML and hypre. > > Barry > I will try to convert, as suggested by Matthew, my complex system in a system twice as large in real numbers. When i finish, i will try to use ML, Hypre and GAMG and i let you know if there are any performance differences. Thanks Pierpaolo >> I later created two subspaces of Krylov and tried to solve the two systems as I used to when solving the only equation in the real numbers field. >> In order to correctly solve the system in the field of real numbers I had to transform the coefficients from real to complex with an imaginary part equal to zero. >> >> Is there a possibility to use a different and better approach to solve my problem? >> >> Perhaps an approach where you can continue to use ML and Hypre for system solving in the real numbers field or where you don't need to use complex numbers when real numbers would actually suffice? >> >> Thanks in advance >> >> Pierpaolo >> > From mfadams at lbl.gov Mon Jul 23 08:43:01 2018 From: mfadams at lbl.gov (Mark Adams) Date: Mon, 23 Jul 2018 09:43:01 -0400 Subject: [petsc-users] Solving Linear Systems with Scalar Real and Complex In-Reply-To: <405250E7-D339-4F7A-BD0D-B008D6B3FC8D@cnr.it> References: <405250E7-D339-4F7A-BD0D-B008D6B3FC8D@cnr.it> Message-ID: Note, as Barry said, GAMG works with native complex numbers. You can start with your original complex build and use '-pc_type gamg'. Mark On Mon, Jul 23, 2018 at 6:52 AM Pierpaolo Minelli wrote: > > > > Il giorno 20 lug 2018, alle ore 19:58, Smith, Barry F. < > bsmith at mcs.anl.gov> ha scritto: > > > > > > > >> On Jul 20, 2018, at 7:01 AM, Pierpaolo Minelli < > pierpaolo.minelli at cnr.it> wrote: > >> > >> Hi, > >> > >> in my code I have to solve both a system in the field of real numbers > and in the field of complex numbers. > >> My approach has been as follows. > >> First I configured PETSc with the --with-scalar-type=complex option. > >> Using this option I have unfortunately lost the possibility to use the > two preconditioners ML and Hypre. > > > > You should still be able to use the PETSc PCGAMG algebraic multigrid > solver. Have you tried that? If there are issues let us know because we > would like to continue to improve the performance of PCGAMG to get it to be > closer to as good as ML and hypre. > > > > Barry > > > > I will try to convert, as suggested by Matthew, my complex system in a > system twice as large in real numbers. When i finish, i will try to use ML, > Hypre and GAMG and i let you know if there are any performance differences. > > Thanks > > Pierpaolo > > > >> I later created two subspaces of Krylov and tried to solve the two > systems as I used to when solving the only equation in the real numbers > field. > >> In order to correctly solve the system in the field of real numbers I > had to transform the coefficients from real to complex with an imaginary > part equal to zero. > >> > >> Is there a possibility to use a different and better approach to solve > my problem? > >> > >> Perhaps an approach where you can continue to use ML and Hypre for > system solving in the real numbers field or where you don't need to use > complex numbers when real numbers would actually suffice? > >> > >> Thanks in advance > >> > >> Pierpaolo > >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Mon Jul 23 10:18:15 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Mon, 23 Jul 2018 15:18:15 +0000 Subject: [petsc-users] MatCreateMPIAIJWithArrays In-Reply-To: References: Message-ID: <6C8E1235-62DF-4B62-92BC-CC3FF706D341@anl.gov> MatCreateMPIAIJWithArrays(PETSC_COMM_WORLD, 2, 2, 10,10, i,j,a); for node1 ^^^^^^^^ ^^^^ > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node1 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node2 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node3 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node4 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node5 > On Jul 23, 2018, at 4:26 AM, ?degang <328937290 at qq.com> wrote: > > Hello, > I am a beginner user. I meet a problem. I have a very big matrix. In shaping the matrix, every nodes produce some rows of it. So it is very easy to store it with files at every node. In the solve Ax=b, I hope every node to read the file and construct the big matrix in parallel. Every file's is a sub matrix which is row block. So I use MatCreateMPIAIJWithArrays to Create the matrix. > > For example: > -1 2 -1 0 0 0 0 0 0 0 > 0 -1 2 -1 0 0 0 0 0 0 > --------------------------------------------------------------- > 0 0 -1 2 -1 0 0 0 0 0 > 0 0 0 -1 0 0 0 0 0 0 > --------------------------------------------------------------- > 0 0 0 0 -1 2 -1 0 0 0 > 0 0 0 0 0 -1 2 -1 0 0 > --------------------------------------------------------------- > 0 0 0 0 0 0 -1 2 -1 0 > 0 0 0 0 0 0 0 -1 2 -1 > --------------------------------------------------------------- > 0 0 0 0 0 0 0 0 -1 2 > 0 0 0 0 0 0 0 0 0 -1 > > Node 1 0-1 row block > Node 2 2-3 row block > Node 3 4-5 row block > Node 4 6-7 row block > Node 5 8-9 row block > > use > > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node1 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node2 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node3 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node4 > MatCreateMPIAIJWithArrays(PETSC_COMM_SELF, 2, 10, 10,10, i,j,a); for node5 > > but there are error . sum of cols of five nodes is not equal 10 (global column). > > How to solve this problem, Hope to get your help! > > thanks > > Degang Jin From dnpham at wpi.edu Mon Jul 23 10:58:01 2018 From: dnpham at wpi.edu (Pham, Dung Ngoc) Date: Mon, 23 Jul 2018 15:58:01 +0000 Subject: [petsc-users] MPI_Testall errors Message-ID: Hello, I am constructing a large matrices in a generalized eigen value problem of order ~ 700,000*700,000 in MPIAIJ format across multiple nodes. The matrix construction goes smoothly when I have smaller dimensional matrices or using less number of cores. However when I use more number of cores (~ 180 or more) I am getting these following error. [169]PETSC ERROR: #1 PetscCommBuildTwoSidedFReq_Ibarrier() line 418 in /petsc/petsc-3.9.3/src/sys/utils/mpits.c [169]PETSC ERROR: #2 PetscCommBuildTwoSidedFReq() line 570 in /petsc/petsc-3.9.3/src/sys/utils/mpits.c [169]PETSC ERROR: #3 MatStashScatterBegin_BTS() line 933 in /petsc/petsc-3.9.3/src/mat/utils/matstash.c [169]PETSC ERROR: #4 MatStashScatterBegin_Private() line 461 in /petsc/petsc-3.9.3/src/mat/utils/matstash.c [169]PETSC ERROR: #5 MatAssemblyBegin_MPIAIJ() line 683 in /petsc/petsc-3.9.3/src/mat/impls/aij/mpi/mpiaij.c [169]PETSC ERROR: #6 MatAssemblyBegin() line 5158 in /petsc/petsc-3.9.3/src/mat/interface/matrix.c I understand that the errors are in assembling the matrix in particular in subroutine "MPI_Testall" where it test the completion of test requests. What might be the cause for such errors? Any thoughts on resolution is appreciated. I have attached the configure.log as well. Thanks, D. N. Pham -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.log Type: text/x-log Size: 7667765 bytes Desc: configure.log URL: From jed at jedbrown.org Mon Jul 23 11:32:53 2018 From: jed at jedbrown.org (Jed Brown) Date: Mon, 23 Jul 2018 10:32:53 -0600 Subject: [petsc-users] MPI_Testall errors In-Reply-To: References: Message-ID: <871sbt3oay.fsf@jedbrown.org> Do you have a reproducible test case you could give us? Does the problem go away if you run with -matstash_legacy? "Pham, Dung Ngoc" writes: > Hello, > > > > I am constructing a large matrices in a generalized eigen value problem of order ~ 700,000*700,000 in MPIAIJ format across multiple nodes. The matrix construction goes smoothly when I have smaller dimensional matrices or using less number of cores. However when I use more number of cores (~ 180 or more) I am getting these following error. > > > [169]PETSC ERROR: #1 PetscCommBuildTwoSidedFReq_Ibarrier() line 418 in /petsc/petsc-3.9.3/src/sys/utils/mpits.c > [169]PETSC ERROR: #2 PetscCommBuildTwoSidedFReq() line 570 in /petsc/petsc-3.9.3/src/sys/utils/mpits.c > [169]PETSC ERROR: #3 MatStashScatterBegin_BTS() line 933 in /petsc/petsc-3.9.3/src/mat/utils/matstash.c > [169]PETSC ERROR: #4 MatStashScatterBegin_Private() line 461 in /petsc/petsc-3.9.3/src/mat/utils/matstash.c > [169]PETSC ERROR: #5 MatAssemblyBegin_MPIAIJ() line 683 in /petsc/petsc-3.9.3/src/mat/impls/aij/mpi/mpiaij.c > [169]PETSC ERROR: #6 MatAssemblyBegin() line 5158 in /petsc/petsc-3.9.3/src/mat/interface/matrix.c > > I understand that the errors are in assembling the matrix in particular in subroutine "MPI_Testall" where it test the completion of test requests. What might be the cause for such errors? Any thoughts on resolution is appreciated. I have attached the configure.log as well. From mfadams at lbl.gov Mon Jul 23 14:47:12 2018 From: mfadams at lbl.gov (Mark Adams) Date: Mon, 23 Jul 2018 15:47:12 -0400 Subject: [petsc-users] configure error Message-ID: This is on Edison, Cray XC30. This has build before and I've had problems with hypre before but this seem to be an MPI problem or at least something new... Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.log Type: application/octet-stream Size: 1815024 bytes Desc: not available URL: From bsmith at mcs.anl.gov Mon Jul 23 15:20:34 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Mon, 23 Jul 2018 20:20:34 +0000 Subject: [petsc-users] configure error In-Reply-To: References: Message-ID: <8D23A48C-A2F4-46A8-B2F9-A9289D66CBCE@anl.gov> delete $PETSC_ARCH and /global/homes/m/madams/petsc_install/petsc-xc30-opt-intel and run again. You may have run with some different options before; it thinks hypre is installed but when checked found it is not. Barry > On Jul 23, 2018, at 3:47 PM, Mark Adams wrote: > > This is on Edison, Cray XC30. This has build before and I've had problems with hypre before but this seem to be an MPI problem or at least something new... > Thanks, > Mark > From mfadams at lbl.gov Mon Jul 23 15:22:23 2018 From: mfadams at lbl.gov (Mark Adams) Date: Mon, 23 Jul 2018 16:22:23 -0400 Subject: [petsc-users] configure error In-Reply-To: <8D23A48C-A2F4-46A8-B2F9-A9289D66CBCE@anl.gov> References: <8D23A48C-A2F4-46A8-B2F9-A9289D66CBCE@anl.gov> Message-ID: Yea, I have done this twice, once with just the git.hypre directory. I will try again. On Mon, Jul 23, 2018 at 4:20 PM Smith, Barry F. wrote: > > delete $PETSC_ARCH and > /global/homes/m/madams/petsc_install/petsc-xc30-opt-intel and run again. > > You may have run with some different options before; it thinks hypre is > installed but when checked found it is not. > > Barry > > > > On Jul 23, 2018, at 3:47 PM, Mark Adams wrote: > > > > This is on Edison, Cray XC30. This has build before and I've had > problems with hypre before but this seem to be an MPI problem or at least > something new... > > Thanks, > > Mark > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfadams at lbl.gov Mon Jul 23 16:06:55 2018 From: mfadams at lbl.gov (Mark Adams) Date: Mon, 23 Jul 2018 17:06:55 -0400 Subject: [petsc-users] configure error In-Reply-To: References: <8D23A48C-A2F4-46A8-B2F9-A9289D66CBCE@anl.gov> Message-ID: Ok, nuking worked, thanks On Mon, Jul 23, 2018 at 4:22 PM Mark Adams wrote: > Yea, I have done this twice, once with just the git.hypre directory. I > will try again. > > > > On Mon, Jul 23, 2018 at 4:20 PM Smith, Barry F. > wrote: > >> >> delete $PETSC_ARCH and >> /global/homes/m/madams/petsc_install/petsc-xc30-opt-intel and run again. >> >> You may have run with some different options before; it thinks hypre is >> installed but when checked found it is not. >> >> Barry >> >> >> > On Jul 23, 2018, at 3:47 PM, Mark Adams wrote: >> > >> > This is on Edison, Cray XC30. This has build before and I've had >> problems with hypre before but this seem to be an MPI problem or at least >> something new... >> > Thanks, >> > Mark >> > >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From olk548 at mail.usask.ca Mon Jul 23 20:27:59 2018 From: olk548 at mail.usask.ca (Oleksandr Koshkarov) Date: Mon, 23 Jul 2018 19:27:59 -0600 Subject: [petsc-users] find eigenvalues in serial for small matrix Message-ID: Dear All, In my large parallel simulation, I need to precompute eigenvalues (or at least the largest one) of smallish simple matrix (from 4x4 up to maybe 50x50, tridiagonal and symmetric). Computation time here is not important and I thought to do it for each processor independently in serial. I thought to use petsc for this as I already use petsc for everything else. However, simple solution seems not to work: ? Mat M; ? MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&M); ... insering some values ? MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY); ? MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY); ? KSP ksp; ? KSPCreate(PETSC_COMM_WORLD,&ksp); ? KSPSetOperators(ksp,M,M); ? PetscReal r[n], c[n]; ? KSPComputeEigenvaluesExplicitly(ksp,n,r,c); which produces the error: [0]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [0]PETSC ERROR: Null argument, when expecting valid pointer [0]PETSC ERROR: Null Object: Parameter # 1 [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]PETSC ERROR: Petsc Release Version 3.9.2, May, 20, 2018 [0]PETSC ERROR: ./eigtest on a arch-linux2-c-debug named koshlaptop by kosh Mon Jul 23 19:25:29 2018 [0]PETSC ERROR: Configure options --with-hdf5-dir=/home/kosh/.local/hdf5 [0]PETSC ERROR: #1 VecDuplicate() line 372 in /home/kosh/.local/petsc-3.9.2/src/vec/vec/interface/vector.c [0]PETSC ERROR: #2 KSPComputeExplicitOperator() line 47 in /home/kosh/.local/petsc-3.9.2/src/ksp/ksp/interface/eige.c [0]PETSC ERROR: #3 KSPComputeEigenvaluesExplicitly() line 140 in /home/kosh/.local/petsc-3.9.2/src/ksp/ksp/interface/eige.c Is it possible to use petsc for this simple task? or KSP will not work with dense serial matrix? Thank you in advance and best regards, Alex. From knepley at gmail.com Mon Jul 23 20:32:46 2018 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 23 Jul 2018 21:32:46 -0400 Subject: [petsc-users] find eigenvalues in serial for small matrix In-Reply-To: References: Message-ID: On Mon, Jul 23, 2018 at 9:28 PM Oleksandr Koshkarov wrote: > Dear All, > > In my large parallel simulation, I need to precompute eigenvalues (or at > least the largest one) of smallish simple matrix (from 4x4 up to maybe > 50x50, tridiagonal and symmetric). Computation time here is not > important and I thought to do it for each processor independently in > serial. I thought to use petsc for this as I already use petsc for > everything else. However, simple solution seems not to work: > > Mat M; > MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&M); > > ... insering some values > > MatAssemblyBegin(M,MAT_FINAL_ASSEMBLY); > MatAssemblyEnd(M,MAT_FINAL_ASSEMBLY); > > KSP ksp; > KSPCreate(PETSC_COMM_WORLD,&ksp); > KSPSetOperators(ksp,M,M); > > PetscReal r[n], c[n]; > KSPComputeEigenvaluesExplicitly(ksp,n,r,c); > > which produces the error: > [0]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [0]PETSC ERROR: Null argument, when expecting valid pointer > [0]PETSC ERROR: Null Object: Parameter # 1 > [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html > for trouble shooting. > [0]PETSC ERROR: Petsc Release Version 3.9.2, May, 20, 2018 > [0]PETSC ERROR: ./eigtest on a arch-linux2-c-debug named koshlaptop by > kosh Mon Jul 23 19:25:29 2018 > [0]PETSC ERROR: Configure options --with-hdf5-dir=/home/kosh/.local/hdf5 > [0]PETSC ERROR: #1 VecDuplicate() line 372 in > /home/kosh/.local/petsc-3.9.2/src/vec/vec/interface/vector.c > [0]PETSC ERROR: #2 KSPComputeExplicitOperator() line 47 in > /home/kosh/.local/petsc-3.9.2/src/ksp/ksp/interface/eige.c > [0]PETSC ERROR: #3 KSPComputeEigenvaluesExplicitly() line 140 in > /home/kosh/.local/petsc-3.9.2/src/ksp/ksp/interface/eige.c > > Is it possible to use petsc for this simple task? or KSP will not work > with dense serial matrix? > What that does is compute the eigenvalues of the Krylov matrix. If you want the eigenvalues of an explicit dense matrix, just call the LAPACK function directly (dgeev). Matt > Thank you in advance and best regards, > Alex. > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Mark.Olesen at esi-group.com Tue Jul 24 05:52:35 2018 From: Mark.Olesen at esi-group.com (Mark Olesen) Date: Tue, 24 Jul 2018 12:52:35 +0200 Subject: [petsc-users] Beginner questions : MatCreateMPIAIJWithSeqAIJ, MatCreateMPIAIJWithSplitArrays Message-ID: I'm still at the beginning phase of looking at PETSc and accordingly have some beginner questions. My apologies if these are FAQs, but I didn't find much to address these specific questions. My simulation matrices are sparse, and will generally (but not always) be generated in parallel. There is currently no conventional internal storage format (something like a COO variant), but lets just assume that I have CSR format for the moment. I would like the usual combination of convenience and high efficiency, but efficiency (speed, memory) is the main criterion. For serial, MatCreateSeqAIJWithArrays() looks like the thing to be using. It would provide a very thin wrapper around my CSR matrix without much additional allocation. The only extra allocation appears to be a precompute column range size per row (ilen) instead of doing it on-the-fly. If my matrix is actually to be considered symmetric, then use MatCreateSeqSBAIJWithArrays() instead. This all seems pretty clear. For parallel, MatCreateMPIAIJWithSplitArrays() appears to be the equivalent for efficiency, but I also read the note discouraging its use, which I fully appreciate. It also leads neatly into my question. I obviously will have fairly ready access to my on-processor portions of the matrix, but collecting the information for the off-processor portions is required. What would a normal or recommended approach look like? For example, ==== Mat A = MatCreateSeqAIJWithArrays() to wrap the local CSR. Mat B = MatCreateSeqAIJ(). Do some preallocation for num non-zeroes, use MatSetValues() to fill in. Need extra garray[] as linear lookup for the global column numbers of B. Or as an alternative, calculate the off-diagonal as a CSR by hand and use Mat B = MatCreateSeqAIJWithArrays() to wrap it. Finally, Use MatCreateMPIAIJWithSeqAIJ() to produce the full matrix. Assuming that I used MatCreateSeqAIJWithArrays() to create both the A and B matrices, then they both hold a shallow copy of my own storage. In MatCreateSeqAIJWithArrays(), I can't really tell what happens to the A matrix. For the B matrix, it appears that its column entries are changed to be those of the global columns and its data values are handed off to another MatCreateSeqAIJ() as the off-diagonal bits. The original B matrix is tagged up to avoid any deletion, and the shallow copied part is tagged to be deleted. If I follow this properly, this implies that if I was managing the storage of the original B matrix myself, I now have double deletion? I would have expected something like this instead (around line 3431 of mpiaij.c in master): /* Retain original memory management */ bnew->singlemalloc = b->singlemalloc; bnew->free_a = b->free_a; bnew->free_ij = b->free_ij; /* B arrays are shared by Bnew */ b->singlemalloc = PETSC_FALSE; b->free_a = PETSC_FALSE; b->free_ij = PETSC_FALSE; ierr = MatDestroy(&B);CHKERRQ(ierr); Have I gone off in completely the wrong direction here? Is there a better method of approaching this? Cheers, /mark From adener at anl.gov Tue Jul 24 10:06:25 2018 From: adener at anl.gov (Dener, Alp) Date: Tue, 24 Jul 2018 15:06:25 +0000 Subject: [petsc-users] Tao's user-defined Monitor crashes In-Reply-To: References: Message-ID: Hi Shu, The fix for this bug is now in the PETSc master branch. Best, ________________________________ Alp Dener Argonne National Laboratory mcs.anl.gov/person/alp-dener On July 20, 2018 at 8:58:49 PM, Dener, Alp (adener at anl.gov) wrote: Hi Shu, I can confirm that I?m getting the same error on my end as well. I checked the eptorsion2f test and I don?t see anything immediately wrong with it. I think something may be bugged about the Fortran interface for TaoSetMonitor, or alternatively the internal fortran function pointer mapping for monitors, monitor contexts and monitor destroy functions. I will take a closer look at this over the weekend and we will get a fix for this tested and merged to master as soon as possible. Thanks! ________________________________ Alp Dener Argonne National Laboratory mcs.anl.gov/person/alp-dener On July 20, 2018 at 8:19:12 PM, Shu Wang (shuwang12 at unm.edu) wrote: Hi all, I ran into a error with user-defined tao's monitor with TaoSetMonitor in Fortran. When I ran the example eptorsion2f in $PETSC_DIR/src/tao/unconstrained/examples/tutorials/ with '-testmonitor', there split the following error, [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors [0]PETSC ERROR: likely location of problem given in stack below [0]PETSC ERROR: --------------------- Stack Frames ------------------------------------ [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available, [0]PETSC ERROR: INSTEAD the line number of the start of the function [0]PETSC ERROR: is given. [0]PETSC ERROR: [0] TaoCancelMonitors line 1444 /home/ws/Softwares/petsc-3.9.3/src/tao/interface/taosolver.c [0]PETSC ERROR: [0] TaoDestroy line 276 /home/ws/Softwares/petsc-3.9.3/src/tao/interface/taosolver.c [0]PETSC ERROR: --------------------- Error Message ------------------------------------------------------------- My configuration for petsc-3.9.3 is as follows: --with-metis-dir=/usr/local/ --with-parmetis-dir=/usr/local/ --download-hdf5 -with-debugging=1 --with-mpi-dir=/usr/local/openmpi --download-fblaslapack --with-fortran-datatypes. and the compiler is gcc-4.7.4 with openmpi/2.0.1. Is there any bug associate with tao's destroy routine with user-defined monitor is invoked? Any comments are welcomed. Yours sincerely, Shu Wang Electrical and Computer Engineering Department of University of New Mexico Albuquerque, NM -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Tue Jul 24 11:02:49 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Tue, 24 Jul 2018 16:02:49 +0000 Subject: [petsc-users] Beginner questions : MatCreateMPIAIJWithSeqAIJ, MatCreateMPIAIJWithSplitArrays In-Reply-To: References: Message-ID: Mark, I think you are over-optimizing your matrix assembly leading to complicated, fragile code. Better just to create the matrix and use MatSetValues() to set values into the matrix and not to work directly with the various sparse matrix data structures. If you wish to work directly with the sparse matrix data structures then you are largely on your own and need to figure out yourself how to use them. Plus you will only get a small benefit time wise in going the much more complicated route. Barry > On Jul 24, 2018, at 6:52 AM, Mark Olesen wrote: > > I'm still at the beginning phase of looking at PETSc and accordingly have some beginner questions. My apologies if these are FAQs, but I didn't find much to address these specific questions. > > My simulation matrices are sparse, and will generally (but not always) be generated in parallel. There is currently no conventional internal storage format (something like a COO variant), but lets just assume that I have CSR format for the moment. > > I would like the usual combination of convenience and high efficiency, but efficiency (speed, memory) is the main criterion. > > For serial, MatCreateSeqAIJWithArrays() looks like the thing to be using. It would provide a very thin wrapper around my CSR matrix without much additional allocation. The only extra allocation appears to be a precompute column range size per row (ilen) instead of doing it on-the-fly. If my matrix is actually to be considered symmetric, then use MatCreateSeqSBAIJWithArrays() instead. > This all seems pretty clear. > > > For parallel, MatCreateMPIAIJWithSplitArrays() appears to be the equivalent for efficiency, but I also read the note discouraging its use, which I fully appreciate. It also leads neatly into my question. I obviously will have fairly ready access to my on-processor portions of the matrix, but collecting the information for the off-processor portions is required. What would a normal or recommended approach look like? > > For example, > ==== > Mat A = MatCreateSeqAIJWithArrays() to wrap the local CSR. > > Mat B = MatCreateSeqAIJ(). Do some preallocation for num non-zeroes, use MatSetValues() to fill in. Need extra garray[] as linear lookup for the global column numbers of B. > > Or as an alternative, calculate the off-diagonal as a CSR by hand and use Mat B = MatCreateSeqAIJWithArrays() to wrap it. > > Finally, > Use MatCreateMPIAIJWithSeqAIJ() to produce the full matrix. > > Assuming that I used MatCreateSeqAIJWithArrays() to create both the A and B matrices, then they both hold a shallow copy of my own storage. > In MatCreateSeqAIJWithArrays(), I can't really tell what happens to the A matrix. For the B matrix, it appears that its column entries are changed to be those of the global columns and its data values are handed off to another MatCreateSeqAIJ() as the off-diagonal bits. The original B matrix is tagged up to avoid any deletion, and the shallow copied part is tagged to be deleted. If I follow this properly, this implies that if I was managing the storage of the original B matrix myself, I now have double deletion? > > I would have expected something like this instead (around line 3431 of mpiaij.c in master): > > /* Retain original memory management */ > bnew->singlemalloc = b->singlemalloc; > bnew->free_a = b->free_a; > bnew->free_ij = b->free_ij; > > /* B arrays are shared by Bnew */ > b->singlemalloc = PETSC_FALSE; > b->free_a = PETSC_FALSE; > b->free_ij = PETSC_FALSE; > ierr = MatDestroy(&B);CHKERRQ(ierr); > > > Have I gone off in completely the wrong direction here? > Is there a better method of approaching this? > > Cheers, > /mark From hbuesing at eonerc.rwth-aachen.de Wed Jul 25 03:23:53 2018 From: hbuesing at eonerc.rwth-aachen.de (Buesing, Henrik) Date: Wed, 25 Jul 2018 08:23:53 +0000 Subject: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement Message-ID: Dear all, I would like to improve the iterative solver [1]. As I understand it I would need to improve the preconditioner for the Schur complement. How would I do that? Thank you for your help! Henrik [1] -ksp_max_it 100 -ksp_rtol 1e-6 -ksp_atol 1e-50 -ksp_type fgmres -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_precondition a11 -fieldsplit_p_w_ksp_type preonly -fieldsplit_S_n_ksp_type gmres -fieldsplit_p_w_pc_type hypre -fieldsplit_p_w_pc_hypre_type boomeramg -fieldsplit_S_n_pc_type hypre -fieldsplit_S_n_pc_hypre_type boomeramg -fieldsplit_S_n_ksp_max_it 100 fieldsplit_S_n_ksp_rtol 1e-2 -- Dipl.-Math. Henrik B?sing Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University Mathieustr. 10 | Tel +49 (0)241 80 49907 52074 Aachen, Germany | Fax +49 (0)241 80 49889 http://www.eonerc.rwth-aachen.de/GGE hbuesing at eonerc.rwth-aachen.de From knepley at gmail.com Wed Jul 25 03:48:23 2018 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 25 Jul 2018 04:48:23 -0400 Subject: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement In-Reply-To: References: Message-ID: On Wed, Jul 25, 2018 at 4:24 AM Buesing, Henrik < hbuesing at eonerc.rwth-aachen.de> wrote: > Dear all, > > I would like to improve the iterative solver [1]. As I understand it I > would need to improve the preconditioner for the Schur complement. > > How would I do that? > 1) I always start from the exact thing (full Schur factorization with exact solves and back off parts until I am happy) 2) Is the a11 block a good preconditioner for your Schur complement? If not, I would start by replacing that matrix with something better. Thanks, Matt > Thank you for your help! > Henrik > > > > [1] > -ksp_max_it 100 -ksp_rtol 1e-6 -ksp_atol 1e-50 -ksp_type fgmres -pc_type > fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_precondition a11 > -fieldsplit_p_w_ksp_type preonly -fieldsplit_S_n_ksp_type gmres > -fieldsplit_p_w_pc_type hypre -fieldsplit_p_w_pc_hypre_type boomeramg > -fieldsplit_S_n_pc_type hypre -fieldsplit_S_n_pc_hypre_type boomeramg > -fieldsplit_S_n_ksp_max_it 100 fieldsplit_S_n_ksp_rtol 1e-2 > > > -- > Dipl.-Math. Henrik B?sing > Institute for Applied Geophysics and Geothermal Energy > E.ON Energy Research Center > RWTH Aachen University > > Mathieustr. 10 | Tel +49 (0)241 80 49907 > 52074 Aachen, Germany | Fax +49 (0)241 80 49889 > > http://www.eonerc.rwth-aachen.de/GGE > hbuesing at eonerc.rwth-aachen.de > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.mayhem23 at gmail.com Wed Jul 25 04:13:36 2018 From: dave.mayhem23 at gmail.com (Dave May) Date: Wed, 25 Jul 2018 10:13:36 +0100 Subject: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement In-Reply-To: References: Message-ID: On 25 July 2018 at 09:48, Matthew Knepley wrote: > On Wed, Jul 25, 2018 at 4:24 AM Buesing, Henrik < > hbuesing at eonerc.rwth-aachen.de> wrote: > >> Dear all, >> >> I would like to improve the iterative solver [1]. As I understand it I >> would need to improve the preconditioner for the Schur complement. >> >> How would I do that? >> > > 1) I always start from the exact thing (full Schur factorization with > exact solves and back off parts until I am happy) > > 2) Is the a11 block a good preconditioner for your Schur complement? If > not, I would start by replacing that matrix > with something better. > Some additional info. If you want to pursue option 2, you need to do call PCFieldSplitSetSchurPre() http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/ PCFieldSplitSetSchurPre.html#PCFieldSplitSetSchurPre with PC_FIELDSPLIT_SCHUR_PRE_USER (second arg) and your user defined schur complement preconditioner (last arg). Thanks, Dave > > Thanks, > > Matt > > >> Thank you for your help! >> Henrik >> >> >> >> [1] >> -ksp_max_it 100 -ksp_rtol 1e-6 -ksp_atol 1e-50 -ksp_type fgmres -pc_type >> fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_precondition >> a11 -fieldsplit_p_w_ksp_type preonly -fieldsplit_S_n_ksp_type gmres >> -fieldsplit_p_w_pc_type hypre -fieldsplit_p_w_pc_hypre_type boomeramg >> -fieldsplit_S_n_pc_type hypre -fieldsplit_S_n_pc_hypre_type boomeramg >> -fieldsplit_S_n_ksp_max_it 100 fieldsplit_S_n_ksp_rtol 1e-2 >> >> >> -- >> Dipl.-Math. Henrik B?sing >> Institute for Applied Geophysics and Geothermal Energy >> E.ON Energy Research Center >> RWTH Aachen University >> >> Mathieustr. 10 >> >> | Tel +49 (0)241 80 49907 >> 52074 Aachen, Germany | Fax +49 (0)241 80 49889 >> >> http://www.eonerc.rwth-aachen.de/GGE >> hbuesing at eonerc.rwth-aachen.de >> >> > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hbuesing at eonerc.rwth-aachen.de Wed Jul 25 04:34:15 2018 From: hbuesing at eonerc.rwth-aachen.de (Buesing, Henrik) Date: Wed, 25 Jul 2018 09:34:15 +0000 Subject: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement In-Reply-To: References: Message-ID: Dear Matt! Dear Dave! Thank you for your messages! I pursued your option 1) and the solver I sent is what I ended up with. Thus, I would like to pursue option 2): Find a better preconditioner than the a11 block. From a technical viewpoint I understand how I would build a matrix that is used as a preconditioner for the Schur complement. But, from a mathematical viewpoint I do not know what to assemble. How do I find a good preconditioner for my problem? How would I tackle such a problem? Thank you! Henrik -- Dipl.-Math. Henrik B?sing Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University Mathieustr. 10 | Tel +49 (0)241 80 49907 52074 Aachen, Germany | Fax +49 (0)241 80 49889 http://www.eonerc.rwth-aachen.de/GGE hbuesing at eonerc.rwth-aachen.de Von: Dave May Gesendet: Mittwoch, 25. Juli 2018 11:14 An: Matthew Knepley Cc: Buesing, Henrik ; PETSc Betreff: Re: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement On 25 July 2018 at 09:48, Matthew Knepley > wrote: On Wed, Jul 25, 2018 at 4:24 AM Buesing, Henrik > wrote: Dear all, I would like to improve the iterative solver [1]. As I understand it I would need to improve the preconditioner for the Schur complement. How would I do that? 1) I always start from the exact thing (full Schur factorization with exact solves and back off parts until I am happy) 2) Is the a11 block a good preconditioner for your Schur complement? If not, I would start by replacing that matrix with something better. Some additional info. If you want to pursue option 2, you need to do call PCFieldSplitSetSchurPre() http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitSetSchurPre.html#PCFieldSplitSetSchurPre with PC_FIELDSPLIT_SCHUR_PRE_USER (second arg) and your user defined schur complement preconditioner (last arg). Thanks, Dave Thanks, Matt Thank you for your help! Henrik [1] -ksp_max_it 100 -ksp_rtol 1e-6 -ksp_atol 1e-50 -ksp_type fgmres -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_precondition a11 -fieldsplit_p_w_ksp_type preonly -fieldsplit_S_n_ksp_type gmres -fieldsplit_p_w_pc_type hypre -fieldsplit_p_w_pc_hypre_type boomeramg -fieldsplit_S_n_pc_type hypre -fieldsplit_S_n_pc_hypre_type boomeramg -fieldsplit_S_n_ksp_max_it 100 fieldsplit_S_n_ksp_rtol 1e-2 -- Dipl.-Math. Henrik B?sing Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University Mathieustr. 10 | Tel +49 (0)241 80 49907 52074 Aachen, Germany | Fax +49 (0)241 80 49889 http://www.eonerc.rwth-aachen.de/GGE hbuesing at eonerc.rwth-aachen.de -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.mayhem23 at gmail.com Wed Jul 25 04:37:01 2018 From: dave.mayhem23 at gmail.com (Dave May) Date: Wed, 25 Jul 2018 10:37:01 +0100 Subject: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement In-Reply-To: References: Message-ID: On 25 July 2018 at 10:34, Buesing, Henrik wrote: > Dear Matt! Dear Dave! > > > > Thank you for your messages! I pursued your option 1) and the solver I > sent is what I ended up with. Thus, I would like to pursue option 2): Find > a better preconditioner than the a11 block. > > > From a technical viewpoint I understand how I would build a matrix that is > used as a preconditioner for the Schur complement. > But, from a mathematical viewpoint I do not know what to assemble. How do > I find a good preconditioner for my problem? How would I tackle such a > problem? > Where does your discrete saddle point system come from? Stokes? Navier Stokes? Something else? Maybe someone on the list can advise you. > > Thank you! > Henrik > > > > > > -- > > Dipl.-Math. Henrik B?sing > > Institute for Applied Geophysics and Geothermal Energy > > E.ON Energy Research Center > > RWTH Aachen University > > > > Mathieustr. 10 > | > Tel +49 (0)241 80 49907 > > 52074 Aachen, Germany | Fax +49 (0)241 80 49889 > > > > http://www.eonerc.rwth-aachen.de/GGE > > hbuesing at eonerc.rwth-aachen.de > > > > *Von:* Dave May > *Gesendet:* Mittwoch, 25. Juli 2018 11:14 > *An:* Matthew Knepley > *Cc:* Buesing, Henrik ; PETSc < > petsc-users at mcs.anl.gov> > *Betreff:* Re: [petsc-users] Fieldsplit - Schur Complement Reduction - > Efficient Preconditioner for Schur Complement > > > > > > > > On 25 July 2018 at 09:48, Matthew Knepley wrote: > > On Wed, Jul 25, 2018 at 4:24 AM Buesing, Henrik < > hbuesing at eonerc.rwth-aachen.de> wrote: > > Dear all, > > I would like to improve the iterative solver [1]. As I understand it I > would need to improve the preconditioner for the Schur complement. > > How would I do that? > > > > 1) I always start from the exact thing (full Schur factorization with > exact solves and back off parts until I am happy) > > > > 2) Is the a11 block a good preconditioner for your Schur complement? If > not, I would start by replacing that matrix > > with something better. > > > > Some additional info. If you want to pursue option 2, you need to do call > > > > PCFieldSplitSetSchurPre() > > > > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/ > PCFieldSplitSetSchurPre.html#PCFieldSplitSetSchurPre > > > > with PC_FIELDSPLIT_SCHUR_PRE_USER > > (second arg) and your user defined schur complement preconditioner (last > arg). > > > > Thanks, > > Dave > > > > > > Thanks, > > > > Matt > > > > Thank you for your help! > Henrik > > > > [1] > -ksp_max_it 100 -ksp_rtol 1e-6 -ksp_atol 1e-50 -ksp_type fgmres -pc_type > fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_precondition > a11 -fieldsplit_p_w_ksp_type preonly -fieldsplit_S_n_ksp_type gmres > -fieldsplit_p_w_pc_type hypre -fieldsplit_p_w_pc_hypre_type boomeramg > -fieldsplit_S_n_pc_type hypre -fieldsplit_S_n_pc_hypre_type boomeramg > -fieldsplit_S_n_ksp_max_it 100 fieldsplit_S_n_ksp_rtol 1e-2 > > > -- > Dipl.-Math. Henrik B?sing > Institute for Applied Geophysics and Geothermal Energy > E.ON Energy Research Center > RWTH Aachen University > > Mathieustr. 10 > | > Tel +49 (0)241 80 49907 > 52074 Aachen, Germany | Fax +49 (0)241 80 49889 > > http://www.eonerc.rwth-aachen.de/GGE > hbuesing at eonerc.rwth-aachen.de > > > > > -- > > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > > > https://www.cse.buffalo.edu/~knepley/ > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hbuesing at eonerc.rwth-aachen.de Wed Jul 25 05:24:03 2018 From: hbuesing at eonerc.rwth-aachen.de (Buesing, Henrik) Date: Wed, 25 Jul 2018 10:24:03 +0000 Subject: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement In-Reply-To: References: Message-ID: The problem is from two-phase flow in porous media. I have written down the equations and the operators from the 2x2 block Jacobian (see attachment). The J11 block of the Jacobian is made elliptic. Maybe someone could tell me how to go on from there to build a good preconditioner? Thank you! Henrik -- Dipl.-Math. Henrik B?sing Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University Mathieustr. 10 | Tel +49 (0)241 80 49907 52074 Aachen, Germany | Fax +49 (0)241 80 49889 http://www.eonerc.rwth-aachen.de/GGE hbuesing at eonerc.rwth-aachen.de Von: Dave May Gesendet: Mittwoch, 25. Juli 2018 11:37 An: Buesing, Henrik Cc: Matthew Knepley ; PETSc Betreff: Re: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement On 25 July 2018 at 10:34, Buesing, Henrik > wrote: Dear Matt! Dear Dave! Thank you for your messages! I pursued your option 1) and the solver I sent is what I ended up with. Thus, I would like to pursue option 2): Find a better preconditioner than the a11 block. From a technical viewpoint I understand how I would build a matrix that is used as a preconditioner for the Schur complement. But, from a mathematical viewpoint I do not know what to assemble. How do I find a good preconditioner for my problem? How would I tackle such a problem? Where does your discrete saddle point system come from? Stokes? Navier Stokes? Something else? Maybe someone on the list can advise you. Thank you! Henrik -- Dipl.-Math. Henrik B?sing Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University Mathieustr. 10 | Tel +49 (0)241 80 49907 52074 Aachen, Germany | Fax +49 (0)241 80 49889 http://www.eonerc.rwth-aachen.de/GGE hbuesing at eonerc.rwth-aachen.de Von: Dave May > Gesendet: Mittwoch, 25. Juli 2018 11:14 An: Matthew Knepley > Cc: Buesing, Henrik >; PETSc > Betreff: Re: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement On 25 July 2018 at 09:48, Matthew Knepley > wrote: On Wed, Jul 25, 2018 at 4:24 AM Buesing, Henrik > wrote: Dear all, I would like to improve the iterative solver [1]. As I understand it I would need to improve the preconditioner for the Schur complement. How would I do that? 1) I always start from the exact thing (full Schur factorization with exact solves and back off parts until I am happy) 2) Is the a11 block a good preconditioner for your Schur complement? If not, I would start by replacing that matrix with something better. Some additional info. If you want to pursue option 2, you need to do call PCFieldSplitSetSchurPre() http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitSetSchurPre.html#PCFieldSplitSetSchurPre with PC_FIELDSPLIT_SCHUR_PRE_USER (second arg) and your user defined schur complement preconditioner (last arg). Thanks, Dave Thanks, Matt Thank you for your help! Henrik [1] -ksp_max_it 100 -ksp_rtol 1e-6 -ksp_atol 1e-50 -ksp_type fgmres -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_precondition a11 -fieldsplit_p_w_ksp_type preonly -fieldsplit_S_n_ksp_type gmres -fieldsplit_p_w_pc_type hypre -fieldsplit_p_w_pc_hypre_type boomeramg -fieldsplit_S_n_pc_type hypre -fieldsplit_S_n_pc_hypre_type boomeramg -fieldsplit_S_n_ksp_max_it 100 fieldsplit_S_n_ksp_rtol 1e-2 -- Dipl.-Math. Henrik B?sing Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University Mathieustr. 10 | Tel +49 (0)241 80 49907 52074 Aachen, Germany | Fax +49 (0)241 80 49889 http://www.eonerc.rwth-aachen.de/GGE hbuesing at eonerc.rwth-aachen.de -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fieldsplit.pdf Type: application/pdf Size: 115991 bytes Desc: Fieldsplit.pdf URL: From hbuesing at eonerc.rwth-aachen.de Thu Jul 26 10:31:34 2018 From: hbuesing at eonerc.rwth-aachen.de (Buesing, Henrik) Date: Thu, 26 Jul 2018 15:31:34 +0000 Subject: [petsc-users] Efficient and scalable preconditioner for advection-dominated problems Message-ID: Dear all, What is your favourite efficient and scalable preconditioner for advection-dominated (hyperbolic) problems? Thank you! Henrik PS: Maybe my question regarding two-phase flow is too specific. Thus, I rephrase it in this way. -- Dipl.-Math. Henrik B?sing Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University Mathieustr. 10 | Tel +49 (0)241 80 49907 52074 Aachen, Germany | Fax +49 (0)241 80 49889 http://www.eonerc.rwth-aachen.de/GGE hbuesing at eonerc.rwth-aachen.de From epscodes at gmail.com Thu Jul 26 10:34:17 2018 From: epscodes at gmail.com (Xiangdong) Date: Thu, 26 Jul 2018 11:34:17 -0400 Subject: [petsc-users] get sub matrix from MPIBAIJ with MatCreateSubMatrix Message-ID: Hello everyone, I have a question about get the sub matrix Aodd from a MPIBAIJ matrix A. For example, if the bs=2 and the matrix size is 10x10. How can I get the 5x5 submatrix corresponding to the odd rows and odd columns only? I tried to use the MatCreateSubMatrix, but get the error messages "Index set does not match blocks". It seems that MatCreateSubMatrix can only provide the whole block, instead of just a specific component of that block. Can you give me some suggestions on extracting the submatrix corresponding to a specific component? Thank you. Best, Xiangdong -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Thu Jul 26 10:48:21 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Thu, 26 Jul 2018 15:48:21 +0000 Subject: [petsc-users] get sub matrix from MPIBAIJ with MatCreateSubMatrix In-Reply-To: References: Message-ID: <35046D42-A53C-4F2C-95D9-8B075E31BD57@anl.gov> > On Jul 26, 2018, at 10:34 AM, Xiangdong wrote: > > Hello everyone, > > I have a question about get the sub matrix Aodd from a MPIBAIJ matrix A. For example, if the bs=2 and the matrix size is 10x10. How can I get the 5x5 submatrix corresponding to the odd rows and odd columns only? > > I tried to use the MatCreateSubMatrix, but get the error messages "Index set does not match blocks". It seems that MatCreateSubMatrix can only provide the whole block, instead of just a specific component of that block. > > Can you give me some suggestions on extracting the submatrix corresponding to a specific component? Either create a AIJ matrix originally or use MatConvert to convert from BAIJ to AIJ and then use MatCreateSubMatrix(). Note that AIJ provides a great deal more flexibility with the utilities and solvers than BAIJ. Barry > > Thank you. > > Best, > Xiangdong From epscodes at gmail.com Thu Jul 26 12:23:07 2018 From: epscodes at gmail.com (Xiangdong) Date: Thu, 26 Jul 2018 13:23:07 -0400 Subject: [petsc-users] get sub matrix from MPIBAIJ with MatCreateSubMatrix In-Reply-To: <35046D42-A53C-4F2C-95D9-8B075E31BD57@anl.gov> References: <35046D42-A53C-4F2C-95D9-8B075E31BD57@anl.gov> Message-ID: On Thu, Jul 26, 2018 at 11:48 AM, Smith, Barry F. wrote: > > > > On Jul 26, 2018, at 10:34 AM, Xiangdong wrote: > > > > Hello everyone, > > > > I have a question about get the sub matrix Aodd from a MPIBAIJ matrix A. > For example, if the bs=2 and the matrix size is 10x10. How can I get the > 5x5 submatrix corresponding to the odd rows and odd columns only? > > > > I tried to use the MatCreateSubMatrix, but get the error messages "Index > set does not match blocks". It seems that MatCreateSubMatrix can only > provide the whole block, instead of just a specific component of that block. > > > > Can you give me some suggestions on extracting the submatrix > corresponding to a specific component? > > Either create a AIJ matrix originally or use MatConvert to convert from > BAIJ to AIJ and then use MatCreateSubMatrix(). Note that AIJ provides a > great deal more flexibility with the utilities and solvers than BAIJ. > > I chose BAIJ because the BAIJ format will perform better than the AIJ in the Matrix-Vec multiplication. It seems that MatConvert needs additional memory space to store the converted matrix (i.e. two copies of A in different format). I may try using MatGetRow on A and MatSetValues on Aodd to create the submatrix to see how it performs. Thanks. Xiangdong > Barry > > > > > Thank you. > > > > Best, > > Xiangdong > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From huq2090 at gmail.com Thu Jul 26 15:18:29 2018 From: huq2090 at gmail.com (Fazlul Huq) Date: Thu, 26 Jul 2018 15:18:29 -0500 Subject: [petsc-users] Solving problems using multigrid Message-ID: Hello All, I am a new user of petsc and I am wondering, is it possible to solve both linear and non-linear problems using multigrid in petsc? Thanking you. Sincerely, Huq -------------- next part -------------- An HTML attachment was scrubbed... URL: From jed at jedbrown.org Thu Jul 26 15:31:16 2018 From: jed at jedbrown.org (Jed Brown) Date: Thu, 26 Jul 2018 14:31:16 -0600 Subject: [petsc-users] Solving problems using multigrid In-Reply-To: References: Message-ID: <874lglpwmj.fsf@jedbrown.org> Fazlul Huq writes: > Hello All, > > I am a new user of petsc and I am wondering, is it possible to solve both > linear and non-linear problems using multigrid in petsc? Yes, for nonlinear problems you can use a Newton method with multigrid preconditioning (the default and a good place to start) or more exotic options including full approximation scheme (FAS) nonlinear multigrid. From jed at jedbrown.org Thu Jul 26 15:49:55 2018 From: jed at jedbrown.org (Jed Brown) Date: Thu, 26 Jul 2018 14:49:55 -0600 Subject: [petsc-users] Solving problems using multigrid In-Reply-To: References: <874lglpwmj.fsf@jedbrown.org> Message-ID: <87va91oh70.fsf@jedbrown.org> Please always use "reply-all" so that your messages go to the list. This is standard mailing list etiquette. It is important to preserve threading for people who find this discussion later and so that we do not waste our time re-answering the same questions that have already been answered in private side-conversations. You'll likely get an answer faster that way too. Fazlul Huq writes: > Thanks! > > I got some examples in ksp folder that includes multigrid. > I am wondering if multigrid and ksp are same method or different method? No, KSP is a linear solver (preconditioned Krylov and related methods). SNES is the nonlinear solver. From Mark.Olesen at esi-group.com Fri Jul 27 03:26:07 2018 From: Mark.Olesen at esi-group.com (Mark Olesen) Date: Fri, 27 Jul 2018 10:26:07 +0200 Subject: [petsc-users] Beginner questions : MatCreateMPIAIJWithSeqAIJ, MatCreateMPIAIJWithSplitArrays In-Reply-To: References: Message-ID: <9ccb158f-b78a-9db9-1228-046b8069838e@esi-group.com> Hi Barry, Thanks for the information. One of the major takeaways from talking to various people at the workshop in June was about the imperative for proper pre-allocation sizing. As I started looking into how the matrices are being assembled, it is quickly apparently that I need to go off and determine the number of non-zeroes everywhere. After which I would use this information for petsc for provide good preallocation values and use the matrix set routines to set/copy the values. The hurdle, from there, to just sending off the appropriate CSR chunks for on-diagonal and off-diagonal doesn't seem so much higher. Unfortunately it appears that I'll need to approach it more indirectly. Thanks, /mark On 07/24/18 18:02, Smith, Barry F. wrote: > > Mark, > > I think you are over-optimizing your matrix assembly leading to complicated, fragile code. Better just to create the matrix and use MatSetValues() to set values into the matrix and not to work directly with the various sparse matrix data structures. If you wish to work directly with the sparse matrix data structures then you are largely on your own and need to figure out yourself how to use them. Plus you will only get a small benefit time wise in going the much more complicated route. > > Barry > > >> On Jul 24, 2018, at 6:52 AM, Mark Olesen wrote: >> >> I'm still at the beginning phase of looking at PETSc and accordingly have some beginner questions. My apologies if these are FAQs, but I didn't find much to address these specific questions. >> >> My simulation matrices are sparse, and will generally (but not always) be generated in parallel. There is currently no conventional internal storage format (something like a COO variant), but lets just assume that I have CSR format for the moment. >> >> I would like the usual combination of convenience and high efficiency, but efficiency (speed, memory) is the main criterion. >> >> For serial, MatCreateSeqAIJWithArrays() looks like the thing to be using. It would provide a very thin wrapper around my CSR matrix without much additional allocation. The only extra allocation appears to be a precompute column range size per row (ilen) instead of doing it on-the-fly. If my matrix is actually to be considered symmetric, then use MatCreateSeqSBAIJWithArrays() instead. >> This all seems pretty clear. >> >> >> For parallel, MatCreateMPIAIJWithSplitArrays() appears to be the equivalent for efficiency, but I also read the note discouraging its use, which I fully appreciate. It also leads neatly into my question. I obviously will have fairly ready access to my on-processor portions of the matrix, but collecting the information for the off-processor portions is required. What would a normal or recommended approach look like? >> >> For example, >> ==== >> Mat A = MatCreateSeqAIJWithArrays() to wrap the local CSR. >> >> Mat B = MatCreateSeqAIJ(). Do some preallocation for num non-zeroes, use MatSetValues() to fill in. Need extra garray[] as linear lookup for the global column numbers of B. >> >> Or as an alternative, calculate the off-diagonal as a CSR by hand and use Mat B = MatCreateSeqAIJWithArrays() to wrap it. >> >> Finally, >> Use MatCreateMPIAIJWithSeqAIJ() to produce the full matrix. >> >> Assuming that I used MatCreateSeqAIJWithArrays() to create both the A and B matrices, then they both hold a shallow copy of my own storage. >> In MatCreateSeqAIJWithArrays(), I can't really tell what happens to the A matrix. For the B matrix, it appears that its column entries are changed to be those of the global columns and its data values are handed off to another MatCreateSeqAIJ() as the off-diagonal bits. The original B matrix is tagged up to avoid any deletion, and the shallow copied part is tagged to be deleted. If I follow this properly, this implies that if I was managing the storage of the original B matrix myself, I now have double deletion? >> >> I would have expected something like this instead (around line 3431 of mpiaij.c in master): >> >> /* Retain original memory management */ >> bnew->singlemalloc = b->singlemalloc; >> bnew->free_a = b->free_a; >> bnew->free_ij = b->free_ij; >> >> /* B arrays are shared by Bnew */ >> b->singlemalloc = PETSC_FALSE; >> b->free_a = PETSC_FALSE; >> b->free_ij = PETSC_FALSE; >> ierr = MatDestroy(&B);CHKERRQ(ierr); >> >> >> Have I gone off in completely the wrong direction here? >> Is there a better method of approaching this? >> >> Cheers, >> /mark > -- Dr Mark OLESEN Principal Engineer, ESI-OpenCFD ESI GmbH | Einsteinring 24 | 85609 Munich | GERMANY Mob. +49 171 9710 149 www.openfoam.com | www.esi-group.com | mark.olesen at esi-group.com From pierpaolo.minelli at cnr.it Fri Jul 27 03:26:07 2018 From: pierpaolo.minelli at cnr.it (Pierpaolo Minelli) Date: Fri, 27 Jul 2018 10:26:07 +0200 Subject: [petsc-users] Solving Linear Systems with Scalar Real and Complex In-Reply-To: References: <405250E7-D339-4F7A-BD0D-B008D6B3FC8D@cnr.it> Message-ID: <3B4B622A-EBCE-4E61-9039-CA8C34F730A4@cnr.it> Hi, I tried to follow Matthew's suggestion by dividing the system in the complex field into two systems in the real numbers field. In practice I used three subspaces of Krylov, one for the first system in the real number field and two for the system in the complex number field. Using real numbers, I was able to use the ML and Hypre preconditioners again. I have performed the following tests using the following default options and using the PETSc version configured with "--with-scalar-type=real (default value)": (1) -pc_type gamg -pc_gamg_agg_nsmooths 1 -pc_gamg_reuse_interpolation true -pc_gamg_square_graph 1 -pc_gamg_threshold 0. -ksp_rtol 1.e-7 (2) -ksp_type preonly -pc_type lu -pc_factor_mat_solver_type mumps (3) -ksp_type preonly -pc_type lu -pc_factor_mat_solver_type superlu_dist 4) -pc_type ml -ksp_monitor -ksp_rtol 1.e-7 (5) -pc_type hypre -ksp_rtol 1.e-7 All methods resolve both systems correctly, but iterative methods (1,4,5) are faster. Among iterative methods using Hypre or ML PCs, I get better performance (solve time) than GAMG. Previously configuring PETSc with --with-scalar-type=complex I had only been able to perform the tests (1,2,3) and in that case the resolution times were roughly the same and comparable to the resolution time of case 1) when using only real numbers. Finally, I have a question. In my simulation I solve the two systems at each step of the calculation, and it was my habit to use the following option after the first resolution and before solving the system in the second time step: call KSPSetInitialGuessNonzero(ksp,PETSC_TRUE,ierr) Since this option was incompatible with the use of MUMPS or SuperLU_Dist, I commented on it and noticed, to my surprise, that iterative methods were not affected by this comment, rather they were slightly faster. Is this normal? Or do I use this command incorrectly? Thanks Pierpaolo > Il giorno 23 lug 2018, alle ore 15:43, Mark Adams ha scritto: > > Note, as Barry said, GAMG works with native complex numbers. You can start with your original complex build and use '-pc_type gamg'. > Mark > > On Mon, Jul 23, 2018 at 6:52 AM Pierpaolo Minelli > wrote: > > > > Il giorno 20 lug 2018, alle ore 19:58, Smith, Barry F. > ha scritto: > > > > > > > >> On Jul 20, 2018, at 7:01 AM, Pierpaolo Minelli > wrote: > >> > >> Hi, > >> > >> in my code I have to solve both a system in the field of real numbers and in the field of complex numbers. > >> My approach has been as follows. > >> First I configured PETSc with the --with-scalar-type=complex option. > >> Using this option I have unfortunately lost the possibility to use the two preconditioners ML and Hypre. > > > > You should still be able to use the PETSc PCGAMG algebraic multigrid solver. Have you tried that? If there are issues let us know because we would like to continue to improve the performance of PCGAMG to get it to be closer to as good as ML and hypre. > > > > Barry > > > > I will try to convert, as suggested by Matthew, my complex system in a system twice as large in real numbers. When i finish, i will try to use ML, Hypre and GAMG and i let you know if there are any performance differences. > > Thanks > > Pierpaolo > > > >> I later created two subspaces of Krylov and tried to solve the two systems as I used to when solving the only equation in the real numbers field. > >> In order to correctly solve the system in the field of real numbers I had to transform the coefficients from real to complex with an imaginary part equal to zero. > >> > >> Is there a possibility to use a different and better approach to solve my problem? > >> > >> Perhaps an approach where you can continue to use ML and Hypre for system solving in the real numbers field or where you don't need to use complex numbers when real numbers would actually suffice? > >> > >> Thanks in advance > >> > >> Pierpaolo > >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.mayhem23 at gmail.com Fri Jul 27 08:09:27 2018 From: dave.mayhem23 at gmail.com (Dave May) Date: Fri, 27 Jul 2018 15:09:27 +0200 Subject: [petsc-users] Fieldsplit - Schur Complement Reduction - Efficient Preconditioner for Schur Complement In-Reply-To: References: Message-ID: On Wed, 25 Jul 2018 at 12:24, Buesing, Henrik < hbuesing at eonerc.rwth-aachen.de> wrote: > The problem is from two-phase flow in porous media. I have written down > the equations and the operators from the 2x2 block Jacobian (see > attachment). > Have you just tried plain old multiplicative firldplit with LU as the preconditioned for the diagonal blocks? What are the iteration counts like? I think that choice should not be terrible for this system. I'd try this first before looking at Schur complements. The J11 block of the Jacobian is made elliptic. > > > > Maybe someone could tell me how to go on from there to build a good > preconditioner? > > Thank you! > Henrik > > > > > > -- > > Dipl.-Math. Henrik B?sing > > Institute for Applied Geophysics and Geothermal Energy > > E.ON Energy Research Center > > RWTH Aachen University > > > > Mathieustr. 10 | Tel +49 (0)241 80 49907 > > 52074 Aachen, Germany | Fax +49 (0)241 80 49889 > > > > http://www.eonerc.rwth-aachen.de/GGE > > hbuesing at eonerc.rwth-aachen.de > > > > *Von:* Dave May > *Gesendet:* Mittwoch, 25. Juli 2018 11:37 > *An:* Buesing, Henrik > *Cc:* Matthew Knepley ; PETSc > > > *Betreff:* Re: [petsc-users] Fieldsplit - Schur Complement Reduction - > Efficient Preconditioner for Schur Complement > > > > > > > > On 25 July 2018 at 10:34, Buesing, Henrik > wrote: > > Dear Matt! Dear Dave! > > > > Thank you for your messages! I pursued your option 1) and the solver I > sent is what I ended up with. Thus, I would like to pursue option 2): Find > a better preconditioner than the a11 block. > > > From a technical viewpoint I understand how I would build a matrix that is > used as a preconditioner for the Schur complement. > But, from a mathematical viewpoint I do not know what to assemble. How do > I find a good preconditioner for my problem? How would I tackle such a > problem? > > > > Where does your discrete saddle point system come from? > > Stokes? Navier Stokes? Something else? > > Maybe someone on the list can advise you. > > > > > Thank you! > Henrik > > > > > > -- > > Dipl.-Math. Henrik B?sing > > Institute for Applied Geophysics and Geothermal Energy > > E.ON Energy Research Center > > RWTH Aachen University > > > > Mathieustr. 10 > | > Tel +49 (0)241 80 49907 > > 52074 Aachen, Germany | Fax +49 (0)241 80 49889 > > > > http://www.eonerc.rwth-aachen.de/GGE > > hbuesing at eonerc.rwth-aachen.de > > > > *Von:* Dave May > *Gesendet:* Mittwoch, 25. Juli 2018 11:14 > *An:* Matthew Knepley > *Cc:* Buesing, Henrik ; PETSc < > petsc-users at mcs.anl.gov> > *Betreff:* Re: [petsc-users] Fieldsplit - Schur Complement Reduction - > Efficient Preconditioner for Schur Complement > > > > > > > > On 25 July 2018 at 09:48, Matthew Knepley wrote: > > On Wed, Jul 25, 2018 at 4:24 AM Buesing, Henrik < > hbuesing at eonerc.rwth-aachen.de> wrote: > > Dear all, > > I would like to improve the iterative solver [1]. As I understand it I > would need to improve the preconditioner for the Schur complement. > > How would I do that? > > > > 1) I always start from the exact thing (full Schur factorization with > exact solves and back off parts until I am happy) > > > > 2) Is the a11 block a good preconditioner for your Schur complement? If > not, I would start by replacing that matrix > > with something better. > > > > Some additional info. If you want to pursue option 2, you need to do call > > > > PCFieldSplitSetSchurPre() > > > > > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitSetSchurPre.html#PCFieldSplitSetSchurPre > > > > with PC_FIELDSPLIT_SCHUR_PRE_USER > > (second arg) and your user defined schur complement preconditioner (last > arg). > > > > Thanks, > > Dave > > > > > > Thanks, > > > > Matt > > > > Thank you for your help! > Henrik > > > > [1] > -ksp_max_it 100 -ksp_rtol 1e-6 -ksp_atol 1e-50 -ksp_type fgmres -pc_type > fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_precondition a11 > -fieldsplit_p_w_ksp_type preonly -fieldsplit_S_n_ksp_type gmres > -fieldsplit_p_w_pc_type hypre -fieldsplit_p_w_pc_hypre_type boomeramg > -fieldsplit_S_n_pc_type hypre -fieldsplit_S_n_pc_hypre_type boomeramg > -fieldsplit_S_n_ksp_max_it 100 fieldsplit_S_n_ksp_rtol 1e-2 > > > -- > Dipl.-Math. Henrik B?sing > Institute for Applied Geophysics and Geothermal Energy > E.ON Energy Research Center > RWTH Aachen University > > Mathieustr. 10 > | > Tel +49 (0)241 80 49907 > 52074 Aachen, Germany | Fax +49 (0)241 80 49889 > > http://www.eonerc.rwth-aachen.de/GGE > hbuesing at eonerc.rwth-aachen.de > > > > > -- > > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > > > https://www.cse.buffalo.edu/~knepley/ > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Fri Jul 27 11:32:15 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Fri, 27 Jul 2018 16:32:15 +0000 Subject: [petsc-users] Solving Linear Systems with Scalar Real and Complex In-Reply-To: <3B4B622A-EBCE-4E61-9039-CA8C34F730A4@cnr.it> References: <405250E7-D339-4F7A-BD0D-B008D6B3FC8D@cnr.it> <3B4B622A-EBCE-4E61-9039-CA8C34F730A4@cnr.it> Message-ID: <0ECD0720-31CA-443F-A44C-6703063B26B5@anl.gov> > On Jul 27, 2018, at 3:26 AM, Pierpaolo Minelli wrote: > > > Finally, I have a question. In my simulation I solve the two systems at each step of the calculation, and it was my habit to use the following option after the first resolution and before solving the system in the second time step: > > call KSPSetInitialGuessNonzero(ksp,PETSC_TRUE,ierr) > > Since this option was incompatible with the use of MUMPS or SuperLU_Dist, I commented on it and noticed, to my surprise, that iterative methods were not affected by this comment, rather they were slightly faster. Is this normal? Or do I use this command incorrectly? Presuming this is a linear problem? You should run with -ksp_monitor_true_residual and compare the final residual norms (at linear system convergence). Since KSP uses a relative decrease in the residual norm to declare convergence what you have told us isn't enough to determine if one is converging "faster" to the solution then the other. Barry > > Thanks > > Pierpaolo > >> Il giorno 23 lug 2018, alle ore 15:43, Mark Adams ha scritto: >> >> Note, as Barry said, GAMG works with native complex numbers. You can start with your original complex build and use '-pc_type gamg'. >> Mark >> >> On Mon, Jul 23, 2018 at 6:52 AM Pierpaolo Minelli wrote: >> >> >> > Il giorno 20 lug 2018, alle ore 19:58, Smith, Barry F. ha scritto: >> > >> > >> > >> >> On Jul 20, 2018, at 7:01 AM, Pierpaolo Minelli wrote: >> >> >> >> Hi, >> >> >> >> in my code I have to solve both a system in the field of real numbers and in the field of complex numbers. >> >> My approach has been as follows. >> >> First I configured PETSc with the --with-scalar-type=complex option. >> >> Using this option I have unfortunately lost the possibility to use the two preconditioners ML and Hypre. >> > >> > You should still be able to use the PETSc PCGAMG algebraic multigrid solver. Have you tried that? If there are issues let us know because we would like to continue to improve the performance of PCGAMG to get it to be closer to as good as ML and hypre. >> > >> > Barry >> > >> >> I will try to convert, as suggested by Matthew, my complex system in a system twice as large in real numbers. When i finish, i will try to use ML, Hypre and GAMG and i let you know if there are any performance differences. >> >> Thanks >> >> Pierpaolo >> >> >> >> I later created two subspaces of Krylov and tried to solve the two systems as I used to when solving the only equation in the real numbers field. >> >> In order to correctly solve the system in the field of real numbers I had to transform the coefficients from real to complex with an imaginary part equal to zero. >> >> >> >> Is there a possibility to use a different and better approach to solve my problem? >> >> >> >> Perhaps an approach where you can continue to use ML and Hypre for system solving in the real numbers field or where you don't need to use complex numbers when real numbers would actually suffice? >> >> >> >> Thanks in advance >> >> >> >> Pierpaolo >> >> >> > >> > From huq2090 at gmail.com Fri Jul 27 13:47:34 2018 From: huq2090 at gmail.com (Fazlul Huq) Date: Fri, 27 Jul 2018 13:47:34 -0500 Subject: [petsc-users] Saving output and execution time In-Reply-To: References: Message-ID: Thanks Matthew. By the way, how can I find the execution time of the processor? On Thu, Jul 19, 2018 at 7:34 PM, Matthew Knepley wrote: > On Thu, Jul 19, 2018 at 1:44 PM Fazlul Huq wrote: > >> Hello all, >> >> I can run the following code with this command showing output on the >> console: ./poisson_m -ksp_view_solution >> > > What is the question? To put that ASCII output in a file, use > > -ksp_view_solution :sol.txt > > There is a chapter in the manual on viewing. > > Thanks, > > Matt > > >> The code is: >> static char help[] = "Solves a tridiagonal linear system.\n\n"; >> >> /*T >> Concepts: KSP^basic parallel example; >> Processors: n >> T*/ >> >> /* >> Include "petscksp.h" so that we can use KSP solvers. Note that this >> file >> automatically includes: >> petscsys.h - base PETSc routines petscvec.h - vectors >> petscmat.h - matrices >> petscis.h - index sets petscksp.h - Krylov subspace >> methods >> petscviewer.h - viewers petscpc.h - preconditioners >> >> Note: The corresponding uniprocessor example is ex1.c >> */ >> #include >> >> int main(int argc,char **args) >> { >> Vec x, b, u; /* approx solution, RHS, exact >> solution */ >> Mat A; /* linear system matrix */ >> KSP ksp; /* linear solver context */ >> PC pc; /* preconditioner context */ >> PetscReal norm,tol=1000.*PETSC_MACHINE_EPSILON; /* norm of >> solution error */ >> PetscErrorCode ierr; >> PetscInt i,n = 99,col[3],its,rstart,rend,nlocal; >> PetscScalar one = 1.0,hundredth = 0.001,leftbc = 10.001,rightbc = >> 15.001,value[3]; >> >> ierr = PetscInitialize(&argc,&args,(char*)0,help);if (ierr) return >> ierr; >> ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr); >> >> /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> Compute the matrix and right-hand-side vector that define >> the linear system, Ax = b. >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> */ >> >> /* >> Create vectors. Note that we form 1 vector from scratch and >> then duplicate as needed. For this simple case let PETSc decide how >> many elements of the vector are stored on each processor. The second >> argument to VecSetSizes() below causes PETSc to decide. >> */ >> ierr = VecCreate(PETSC_COMM_WORLD,&x);CHKERRQ(ierr); >> ierr = VecSetSizes(x,PETSC_DECIDE,n);CHKERRQ(ierr); >> ierr = VecSetFromOptions(x);CHKERRQ(ierr); >> ierr = VecDuplicate(x,&b);CHKERRQ(ierr); >> ierr = VecDuplicate(x,&u);CHKERRQ(ierr); >> >> /* Identify the starting and ending mesh points on each >> processor for the interior part of the mesh. We let PETSc decide >> above. */ >> >> ierr = VecGetOwnershipRange(x,&rstart,&rend);CHKERRQ(ierr); >> ierr = VecGetLocalSize(x,&nlocal);CHKERRQ(ierr); >> >> /* >> Create matrix. When using MatCreate(), the matrix format can >> be specified at runtime. >> >> Performance tuning note: For problems of substantial size, >> preallocation of matrix memory is crucial for attaining good >> performance. See the matrix chapter of the users manual for details. >> >> We pass in nlocal as the "local" size of the matrix to force it >> to have the same parallel layout as the vector created above. >> */ >> ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); >> ierr = MatSetSizes(A,nlocal,nlocal,n,n);CHKERRQ(ierr); >> ierr = MatSetFromOptions(A);CHKERRQ(ierr); >> ierr = MatSetUp(A);CHKERRQ(ierr); >> >> /* >> Assemble matrix. >> The linear system is distributed across the processors by >> chunks of contiguous rows, which correspond to contiguous >> sections of the mesh on which the problem is discretized. >> For matrix assembly, each processor contributes entries for >> the part that it owns locally. >> */ >> >> >> if (!rstart) { >> rstart = 1; >> i = 0; col[0] = 0; col[1] = 1; value[0] = 2.0; value[1] = -1.0; >> ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ( >> ierr); >> } >> if (rend == n) { >> rend = n-1; >> i = n-1; col[0] = n-2; col[1] = n-1; value[0] = -1.0; value[1] = >> 2.0; >> ierr = MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); >> } >> >> /* Set entries corresponding to the mesh interior */ >> value[0] = -1.0; value[1] = 2.0; value[2] = -1.0; >> for (i=rstart; i> col[0] = i-1; col[1] = i; col[2] = i+1; >> ierr = MatSetValues(A,1,&i,3,col,value,INSERT_VALUES);CHKERRQ( >> ierr); >> } >> >> /* Assemble the matrix */ >> ierr = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); >> ierr = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); >> >> /* >> Set exact solution; then compute right-hand-side vector. >> */ >> ierr = VecSet(u,one);CHKERRQ(ierr); >> >> i=0; >> ierr = VecSetValues(b, 1, &i, &leftbc, INSERT_VALUES);CHKERRQ(ierr); >> for (i=1; i> ierr = VecSetValues(b, 1, &i, &hundredth, >> INSERT_VALUES);CHKERRQ(ierr); >> } >> i=n-1; >> ierr = VecSetValues(b, 1, &i, &rightbc, INSERT_VALUES);CHKERRQ(ierr); >> ierr = VecAssemblyBegin(b);CHKERRQ(ierr); >> ierr = VecAssemblyEnd(b);CHKERRQ(ierr); >> >> // ierr = MatMult(A,u,b);CHKERRQ(ierr); >> >> /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> Create the linear solver and set various options >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> */ >> /* >> Create linear solver context >> */ >> ierr = KSPCreate(PETSC_COMM_WORLD,&ksp);CHKERRQ(ierr); >> >> /* >> Set operators. Here the matrix that defines the linear system >> also serves as the preconditioning matrix. >> */ >> ierr = KSPSetOperators(ksp,A,A);CHKERRQ(ierr); >> >> /* >> Set linear solver defaults for this problem (optional). >> - By extracting the KSP and PC contexts from the KSP context, >> we can then directly call any KSP and PC routines to set >> various options. >> - The following four statements are optional; all of these >> parameters could alternatively be specified at runtime via >> KSPSetFromOptions(); >> */ >> ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr); >> ierr = PCSetType(pc,PCJACOBI);CHKERRQ(ierr); >> ierr = KSPSetTolerances(ksp,1.e-7,PETSC_DEFAULT,PETSC_DEFAULT, >> PETSC_DEFAULT);CHKERRQ(ierr); >> >> /* >> Set runtime options, e.g., >> -ksp_type -pc_type -ksp_monitor -ksp_rtol >> These options will override those specified above as long as >> KSPSetFromOptions() is called _after_ any other customization >> routines. >> */ >> ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); >> >> /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> Solve the linear system >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> */ >> /* >> Solve linear system >> */ >> ierr = KSPSolve(ksp,b,x);CHKERRQ(ierr); >> >> /* >> View solver info; we could instead use the option -ksp_view to >> print this info to the screen at the conclusion of KSPSolve(). >> */ >> ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr); >> >> /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> Check solution and clean up >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> */ >> /* >> Check the error >> */ >> ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr); >> ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr); >> ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr); >> if (norm > tol) { >> ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, Iterations >> %D\n",(double)norm,its);CHKERRQ(ierr); >> } >> >> /* >> Free work space. All PETSc objects should be destroyed when they >> are no longer needed. >> */ >> ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = >> VecDestroy(&u);CHKERRQ(ierr); >> ierr = VecDestroy(&b);CHKERRQ(ierr); ierr = >> MatDestroy(&A);CHKERRQ(ierr); >> ierr = KSPDestroy(&ksp);CHKERRQ(ierr); >> >> /* >> Always call PetscFinalize() before exiting a program. This routine >> - finalizes the PETSc libraries as well as MPI >> - provides summary and diagnostic information if certain runtime >> options are chosen (e.g., -log_view). >> */ >> ierr = PetscFinalize(); >> return ierr; >> } >> >> >> Now I am trying to save this output in a file (say in a .csv file) at >> runtime along with execution time but I can't. >> >> Any suggestion please! >> >> Sincerely, >> Huq >> >> -- >> >> Fazlul Huq >> Graduate Research Assistant >> Department of Nuclear, Plasma & Radiological Engineering (NPRE) >> University of Illinois at Urbana-Champaign (UIUC) >> E-mail: huq2090 at gmail.com >> > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rupp at iue.tuwien.ac.at Fri Jul 27 14:09:36 2018 From: rupp at iue.tuwien.ac.at (Karl Rupp) Date: Fri, 27 Jul 2018 14:09:36 -0500 Subject: [petsc-users] Saving output and execution time In-Reply-To: References: Message-ID: Hi Fazlul, Pass the command line option -log_view to get a detailed breakdown of time spent in various code sections. For details, consult the manual. Best regards, Karli On 07/27/2018 01:47 PM, Fazlul Huq wrote: > Thanks Matthew. > > By the way, how can I find the execution time of the processor? > > > > On Thu, Jul 19, 2018 at 7:34 PM, Matthew Knepley > wrote: > > On Thu, Jul 19, 2018 at 1:44 PM Fazlul Huq > wrote: > > Hello all, > > I can run the following code with this command showing output on > the console: ./poisson_m -ksp_view_solution > > > What is the question? To put that ASCII output in a file, use > > -ksp_view_solution :sol.txt > > There is a chapter in the manual on viewing. > > ? Thanks, > > ? ? Matt > > The code is: > static char help[] = "Solves a tridiagonal linear system.\n\n"; > > /*T > ?? Concepts: KSP^basic parallel example; > ?? Processors: n > T*/ > > /* > ? Include "petscksp.h" so that we can use KSP solvers.? Note > that this file > ? automatically includes: > ???? petscsys.h?????? - base PETSc routines?? petscvec.h - vectors > ???? petscmat.h - matrices > ???? petscis.h???? - index sets??????????? petscksp.h - Krylov > subspace methods > ???? petscviewer.h - viewers?????????????? petscpc.h? - > preconditioners > > ? Note:? The corresponding uniprocessor example is ex1.c > */ > #include > > int main(int argc,char **args) > { > ? Vec??????????? x, b, u;????????? /* approx solution, RHS, > exact solution */ > ? Mat??????????? A;??????????????? /* linear system matrix */ > ? KSP??????????? ksp;????????????? /* linear solver context */ > ? PC???????????? pc;?????????????? /* preconditioner context */ > ? PetscReal????? norm,tol=1000.*PETSC_MACHINE_EPSILON;? /* norm > of solution error */ > ? PetscErrorCode ierr; > ? PetscInt?????? i,n = 99,col[3],its,rstart,rend,nlocal; > ? PetscScalar??? one = 1.0,hundredth = 0.001,leftbc = > 10.001,rightbc = 15.001,value[3]; > > ? ierr = PetscInitialize(&argc,&args,(char*)0,help);if (ierr) > return ierr; > ? ierr = PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL);CHKERRQ(ierr); > > ? /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > ???????? Compute the matrix and right-hand-side vector that define > ???????? the linear system, Ax = b. > ???? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - */ > > ? /* > ???? Create vectors.? Note that we form 1 vector from scratch and > ???? then duplicate as needed. For this simple case let PETSc > decide how > ???? many elements of the vector are stored on each processor. > The second > ???? argument to VecSetSizes() below causes PETSc to decide. > ? */ > ? ierr = VecCreate(PETSC_COMM_WORLD,&x);CHKERRQ(ierr); > ? ierr = VecSetSizes(x,PETSC_DECIDE,n);CHKERRQ(ierr); > ? ierr = VecSetFromOptions(x);CHKERRQ(ierr); > ? ierr = VecDuplicate(x,&b);CHKERRQ(ierr); > ? ierr = VecDuplicate(x,&u);CHKERRQ(ierr); > > ? /* Identify the starting and ending mesh points on each > ???? processor for the interior part of the mesh. We let PETSc > decide > ???? above. */ > > ? ierr = VecGetOwnershipRange(x,&rstart,&rend);CHKERRQ(ierr); > ? ierr = VecGetLocalSize(x,&nlocal);CHKERRQ(ierr); > > ? /* > ???? Create matrix.? When using MatCreate(), the matrix format can > ???? be specified at runtime. > > ???? Performance tuning note:? For problems of substantial size, > ???? preallocation of matrix memory is crucial for attaining good > ???? performance. See the matrix chapter of the users manual > for details. > > ???? We pass in nlocal as the "local" size of the matrix to > force it > ???? to have the same parallel layout as the vector created above. > ? */ > ? ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); > ? ierr = MatSetSizes(A,nlocal,nlocal,n,n);CHKERRQ(ierr); > ? ierr = MatSetFromOptions(A);CHKERRQ(ierr); > ? ierr = MatSetUp(A);CHKERRQ(ierr); > > ? /* > ???? Assemble matrix. > ???? The linear system is distributed across the processors by > ???? chunks of contiguous rows, which correspond to contiguous > ???? sections of the mesh on which the problem is discretized. > ???? For matrix assembly, each processor contributes entries for > ???? the part that it owns locally. > ? */ > > > ? if (!rstart) { > ??? rstart = 1; > ??? i????? = 0; col[0] = 0; col[1] = 1; value[0] = 2.0; > value[1] = -1.0; > ??? ierr?? = > MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); > ? } > ? if (rend == n) { > ??? rend = n-1; > ??? i??? = n-1; col[0] = n-2; col[1] = n-1; value[0] = -1.0; > value[1] = 2.0; > ??? ierr = > MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); > ? } > > ? /* Set entries corresponding to the mesh interior */ > ? value[0] = -1.0; value[1] = 2.0; value[2] = -1.0; > ? for (i=rstart; i ??? col[0] = i-1; col[1] = i; col[2] = i+1; > ??? ierr?? = > MatSetValues(A,1,&i,3,col,value,INSERT_VALUES);CHKERRQ(ierr); > ? } > > ? /* Assemble the matrix */ > ? ierr = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > ? ierr = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > ? /* > ???? Set exact solution; then compute right-hand-side vector. > ? */ > ? ierr = VecSet(u,one);CHKERRQ(ierr); > > ? i=0; > ??? ierr = VecSetValues(b, 1, &i, &leftbc, > INSERT_VALUES);CHKERRQ(ierr); > ? for (i=1; i ??? ierr = VecSetValues(b, 1, &i, &hundredth, > INSERT_VALUES);CHKERRQ(ierr); > ? } > ? i=n-1; > ??? ierr = VecSetValues(b, 1, &i, &rightbc, > INSERT_VALUES);CHKERRQ(ierr); > ??? ierr = VecAssemblyBegin(b);CHKERRQ(ierr); > ??? ierr = VecAssemblyEnd(b);CHKERRQ(ierr); > > ? // ierr = MatMult(A,u,b);CHKERRQ(ierr); > > ? /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > ??????????????? Create the linear solver and set various options > ???? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - */ > ? /* > ???? Create linear solver context > ? */ > ? ierr = KSPCreate(PETSC_COMM_WORLD,&ksp);CHKERRQ(ierr); > > ? /* > ???? Set operators. Here the matrix that defines the linear system > ???? also serves as the preconditioning matrix. > ? */ > ? ierr = KSPSetOperators(ksp,A,A);CHKERRQ(ierr); > > ? /* > ???? Set linear solver defaults for this problem (optional). > ???? - By extracting the KSP and PC contexts from the KSP context, > ?????? we can then directly call any KSP and PC routines to set > ?????? various options. > ???? - The following four statements are optional; all of these > ?????? parameters could alternatively be specified at runtime via > ?????? KSPSetFromOptions(); > ? */ > ? ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr); > ? ierr = PCSetType(pc,PCJACOBI);CHKERRQ(ierr); > ? ierr = > KSPSetTolerances(ksp,1.e-7,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr); > > ? /* > ??? Set runtime options, e.g., > ??????? -ksp_type -pc_type -ksp_monitor -ksp_rtol > > ??? These options will override those specified above as long as > ??? KSPSetFromOptions() is called _after_ any other customization > ??? routines. > ? */ > ? ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); > > ? /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > ????????????????????? Solve the linear system > ???? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - */ > ? /* > ???? Solve linear system > ? */ > ? ierr = KSPSolve(ksp,b,x);CHKERRQ(ierr); > > ? /* > ???? View solver info; we could instead use the option -ksp_view to > ???? print this info to the screen at the conclusion of KSPSolve(). > ? */ > ? ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr); > > ? /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > ????????????????????? Check solution and clean up > ???? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - */ > ? /* > ???? Check the error > ? */ > ? ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr); > ? ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr); > ? ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr); > ? if (norm > tol) { > ??? ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, > Iterations %D\n",(double)norm,its);CHKERRQ(ierr); > ? } > > ? /* > ???? Free work space.? All PETSc objects should be destroyed > when they > ???? are no longer needed. > ? */ > ? ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = > VecDestroy(&u);CHKERRQ(ierr); > ? ierr = VecDestroy(&b);CHKERRQ(ierr); ierr = > MatDestroy(&A);CHKERRQ(ierr); > ? ierr = KSPDestroy(&ksp);CHKERRQ(ierr); > > ? /* > ???? Always call PetscFinalize() before exiting a program. > This routine > ?????? - finalizes the PETSc libraries as well as MPI > ?????? - provides summary and diagnostic information if certain > runtime > ???????? options are chosen (e.g., -log_view). > ? */ > ? ierr = PetscFinalize(); > ? return ierr; > } > > > Now I am trying to save this output in a file (say in a .csv > file) at runtime along with execution time but I can't. > > Any suggestion please! > > Sincerely, > Huq > > -- > > Fazlul Huq > Graduate Research Assistant > Department of Nuclear, Plasma & Radiological Engineering (NPRE) > University of Illinois at Urbana-Champaign (UIUC) > E-mail: huq2090 at gmail.com > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which > their experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > > > From huq2090 at gmail.com Fri Jul 27 14:11:54 2018 From: huq2090 at gmail.com (Fazlul Huq) Date: Fri, 27 Jul 2018 14:11:54 -0500 Subject: [petsc-users] Saving output and execution time In-Reply-To: References: Message-ID: Thanks Karl! On Fri, Jul 27, 2018 at 2:09 PM, Karl Rupp wrote: > Hi Fazlul, > > Pass the command line option -log_view to get a detailed breakdown of time > spent in various code sections. For details, consult the manual. > > Best regards, > Karli > > On 07/27/2018 01:47 PM, Fazlul Huq wrote: > >> Thanks Matthew. >> >> By the way, how can I find the execution time of the processor? >> >> >> >> On Thu, Jul 19, 2018 at 7:34 PM, Matthew Knepley > > wrote: >> >> On Thu, Jul 19, 2018 at 1:44 PM Fazlul Huq > > wrote: >> >> Hello all, >> >> I can run the following code with this command showing output on >> the console: ./poisson_m -ksp_view_solution >> >> >> What is the question? To put that ASCII output in a file, use >> >> -ksp_view_solution :sol.txt >> >> There is a chapter in the manual on viewing. >> >> Thanks, >> >> Matt >> >> The code is: >> static char help[] = "Solves a tridiagonal linear system.\n\n"; >> >> /*T >> Concepts: KSP^basic parallel example; >> Processors: n >> T*/ >> >> /* >> Include "petscksp.h" so that we can use KSP solvers. Note >> that this file >> automatically includes: >> petscsys.h - base PETSc routines petscvec.h - >> vectors >> petscmat.h - matrices >> petscis.h - index sets petscksp.h - Krylov >> subspace methods >> petscviewer.h - viewers petscpc.h - >> preconditioners >> >> Note: The corresponding uniprocessor example is ex1.c >> */ >> #include >> >> int main(int argc,char **args) >> { >> Vec x, b, u; /* approx solution, RHS, >> exact solution */ >> Mat A; /* linear system matrix */ >> KSP ksp; /* linear solver context */ >> PC pc; /* preconditioner context */ >> PetscReal norm,tol=1000.*PETSC_MACHINE_EPSILON; /* norm >> of solution error */ >> PetscErrorCode ierr; >> PetscInt i,n = 99,col[3],its,rstart,rend,nlocal; >> PetscScalar one = 1.0,hundredth = 0.001,leftbc = >> 10.001,rightbc = 15.001,value[3]; >> >> ierr = PetscInitialize(&argc,&args,(char*)0,help);if (ierr) >> return ierr; >> ierr = PetscOptionsGetInt(NULL,NULL," >> -n",&n,NULL);CHKERRQ(ierr); >> >> /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - >> Compute the matrix and right-hand-side vector that >> define >> the linear system, Ax = b. >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - */ >> >> /* >> Create vectors. Note that we form 1 vector from scratch and >> then duplicate as needed. For this simple case let PETSc >> decide how >> many elements of the vector are stored on each processor. >> The second >> argument to VecSetSizes() below causes PETSc to decide. >> */ >> ierr = VecCreate(PETSC_COMM_WORLD,&x);CHKERRQ(ierr); >> ierr = VecSetSizes(x,PETSC_DECIDE,n);CHKERRQ(ierr); >> ierr = VecSetFromOptions(x);CHKERRQ(ierr); >> ierr = VecDuplicate(x,&b);CHKERRQ(ierr); >> ierr = VecDuplicate(x,&u);CHKERRQ(ierr); >> >> /* Identify the starting and ending mesh points on each >> processor for the interior part of the mesh. We let PETSc >> decide >> above. */ >> >> ierr = VecGetOwnershipRange(x,&rstart,&rend);CHKERRQ(ierr); >> ierr = VecGetLocalSize(x,&nlocal);CHKERRQ(ierr); >> >> /* >> Create matrix. When using MatCreate(), the matrix format >> can >> be specified at runtime. >> >> Performance tuning note: For problems of substantial size, >> preallocation of matrix memory is crucial for attaining good >> performance. See the matrix chapter of the users manual >> for details. >> >> We pass in nlocal as the "local" size of the matrix to >> force it >> to have the same parallel layout as the vector created >> above. >> */ >> ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); >> ierr = MatSetSizes(A,nlocal,nlocal,n,n);CHKERRQ(ierr); >> ierr = MatSetFromOptions(A);CHKERRQ(ierr); >> ierr = MatSetUp(A);CHKERRQ(ierr); >> >> /* >> Assemble matrix. >> The linear system is distributed across the processors by >> chunks of contiguous rows, which correspond to contiguous >> sections of the mesh on which the problem is discretized. >> For matrix assembly, each processor contributes entries for >> the part that it owns locally. >> */ >> >> >> if (!rstart) { >> rstart = 1; >> i = 0; col[0] = 0; col[1] = 1; value[0] = 2.0; >> value[1] = -1.0; >> ierr = >> MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); >> } >> if (rend == n) { >> rend = n-1; >> i = n-1; col[0] = n-2; col[1] = n-1; value[0] = -1.0; >> value[1] = 2.0; >> ierr = >> MatSetValues(A,1,&i,2,col,value,INSERT_VALUES);CHKERRQ(ierr); >> } >> >> /* Set entries corresponding to the mesh interior */ >> value[0] = -1.0; value[1] = 2.0; value[2] = -1.0; >> for (i=rstart; i> col[0] = i-1; col[1] = i; col[2] = i+1; >> ierr = >> MatSetValues(A,1,&i,3,col,value,INSERT_VALUES);CHKERRQ(ierr); >> } >> >> /* Assemble the matrix */ >> ierr = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); >> ierr = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); >> >> /* >> Set exact solution; then compute right-hand-side vector. >> */ >> ierr = VecSet(u,one);CHKERRQ(ierr); >> >> i=0; >> ierr = VecSetValues(b, 1, &i, &leftbc, >> INSERT_VALUES);CHKERRQ(ierr); >> for (i=1; i> ierr = VecSetValues(b, 1, &i, &hundredth, >> INSERT_VALUES);CHKERRQ(ierr); >> } >> i=n-1; >> ierr = VecSetValues(b, 1, &i, &rightbc, >> INSERT_VALUES);CHKERRQ(ierr); >> ierr = VecAssemblyBegin(b);CHKERRQ(ierr); >> ierr = VecAssemblyEnd(b);CHKERRQ(ierr); >> >> // ierr = MatMult(A,u,b);CHKERRQ(ierr); >> >> /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - >> Create the linear solver and set various options >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - */ >> /* >> Create linear solver context >> */ >> ierr = KSPCreate(PETSC_COMM_WORLD,&ksp);CHKERRQ(ierr); >> >> /* >> Set operators. Here the matrix that defines the linear >> system >> also serves as the preconditioning matrix. >> */ >> ierr = KSPSetOperators(ksp,A,A);CHKERRQ(ierr); >> >> /* >> Set linear solver defaults for this problem (optional). >> - By extracting the KSP and PC contexts from the KSP >> context, >> we can then directly call any KSP and PC routines to set >> various options. >> - The following four statements are optional; all of these >> parameters could alternatively be specified at runtime via >> KSPSetFromOptions(); >> */ >> ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr); >> ierr = PCSetType(pc,PCJACOBI);CHKERRQ(ierr); >> ierr = >> KSPSetTolerances(ksp,1.e-7,PETSC_DEFAULT,PETSC_DEFAULT,PETSC >> _DEFAULT);CHKERRQ(ierr); >> >> /* >> Set runtime options, e.g., >> -ksp_type -pc_type -ksp_monitor -ksp_rtol >> >> These options will override those specified above as long as >> KSPSetFromOptions() is called _after_ any other customization >> routines. >> */ >> ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr); >> >> /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - >> Solve the linear system >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - */ >> /* >> Solve linear system >> */ >> ierr = KSPSolve(ksp,b,x);CHKERRQ(ierr); >> >> /* >> View solver info; we could instead use the option -ksp_view >> to >> print this info to the screen at the conclusion of >> KSPSolve(). >> */ >> ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr); >> >> /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - >> Check solution and clean up >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - */ >> /* >> Check the error >> */ >> ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr); >> ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr); >> ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr); >> if (norm > tol) { >> ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, >> Iterations %D\n",(double)norm,its);CHKERRQ(ierr); >> } >> >> /* >> Free work space. All PETSc objects should be destroyed >> when they >> are no longer needed. >> */ >> ierr = VecDestroy(&x);CHKERRQ(ierr); ierr = >> VecDestroy(&u);CHKERRQ(ierr); >> ierr = VecDestroy(&b);CHKERRQ(ierr); ierr = >> MatDestroy(&A);CHKERRQ(ierr); >> ierr = KSPDestroy(&ksp);CHKERRQ(ierr); >> >> /* >> Always call PetscFinalize() before exiting a program. >> This routine >> - finalizes the PETSc libraries as well as MPI >> - provides summary and diagnostic information if certain >> runtime >> options are chosen (e.g., -log_view). >> */ >> ierr = PetscFinalize(); >> return ierr; >> } >> >> >> Now I am trying to save this output in a file (say in a .csv >> file) at runtime along with execution time but I can't. >> >> Any suggestion please! >> >> Sincerely, >> Huq >> >> -- >> Fazlul Huq >> Graduate Research Assistant >> Department of Nuclear, Plasma & Radiological Engineering (NPRE) >> University of Illinois at Urbana-Champaign (UIUC) >> E-mail: huq2090 at gmail.com >> >> >> >> -- What most experimenters take for granted before they begin >> their >> experiments is infinitely more interesting than any results to which >> their experiments lead. >> -- Norbert Wiener >> >> https://www.cse.buffalo.edu/~knepley/ >> >> >> >> -- Fazlul Huq Graduate Research Assistant Department of Nuclear, Plasma & Radiological Engineering (NPRE) University of Illinois at Urbana-Champaign (UIUC) E-mail: huq2090 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Fri Jul 27 18:00:55 2018 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 27 Jul 2018 19:00:55 -0400 Subject: [petsc-users] Beginner questions : MatCreateMPIAIJWithSeqAIJ, MatCreateMPIAIJWithSplitArrays In-Reply-To: <9ccb158f-b78a-9db9-1228-046b8069838e@esi-group.com> References: <9ccb158f-b78a-9db9-1228-046b8069838e@esi-group.com> Message-ID: On Fri, Jul 27, 2018 at 4:25 AM Mark Olesen wrote: > Hi Barry, > > Thanks for the information. One of the major takeaways from talking to > various people at the workshop in June was about the imperative for > proper pre-allocation sizing. > As I started looking into how the matrices are being assembled, it is > quickly apparently that I need to go off and determine the number of > non-zeroes everywhere. After which I would use this information for > petsc for provide good preallocation values and use the matrix set > routines to set/copy the values. The hurdle, from there, to just sending > off the appropriate CSR chunks for on-diagonal and off-diagonal doesn't > seem so much higher. Unfortunately it appears that I'll need to approach > it more indirectly. > While its true that proper preallocation is essential, I want to point out that computing the nonzero pattern usually has a negligible cost. If you just run through your assembly routine twice, the first time leaving out the value computation, its the easiest route. Also, Lisandro has now given us really nice hash table support. I use this to calculate the nonzero pattern in several places in PETSc. Thanks, Matt > Thanks, > /mark > > > > On 07/24/18 18:02, Smith, Barry F. wrote: > > > > Mark, > > > > I think you are over-optimizing your matrix assembly leading to > complicated, fragile code. Better just to create the matrix and use > MatSetValues() to set values into the matrix and not to work directly with > the various sparse matrix data structures. If you wish to work directly > with the sparse matrix data structures then you are largely on your own and > need to figure out yourself how to use them. Plus you will only get a small > benefit time wise in going the much more complicated route. > > > > Barry > > > > > >> On Jul 24, 2018, at 6:52 AM, Mark Olesen > wrote: > >> > >> I'm still at the beginning phase of looking at PETSc and accordingly > have some beginner questions. My apologies if these are FAQs, but I didn't > find much to address these specific questions. > >> > >> My simulation matrices are sparse, and will generally (but not always) > be generated in parallel. There is currently no conventional internal > storage format (something like a COO variant), but lets just assume that I > have CSR format for the moment. > >> > >> I would like the usual combination of convenience and high efficiency, > but efficiency (speed, memory) is the main criterion. > >> > >> For serial, MatCreateSeqAIJWithArrays() looks like the thing to be > using. It would provide a very thin wrapper around my CSR matrix without > much additional allocation. The only extra allocation appears to be a > precompute column range size per row (ilen) instead of doing it on-the-fly. > If my matrix is actually to be considered symmetric, then use > MatCreateSeqSBAIJWithArrays() instead. > >> This all seems pretty clear. > >> > >> > >> For parallel, MatCreateMPIAIJWithSplitArrays() appears to be the > equivalent for efficiency, but I also read the note discouraging its use, > which I fully appreciate. It also leads neatly into my question. I > obviously will have fairly ready access to my on-processor portions of the > matrix, but collecting the information for the off-processor portions is > required. What would a normal or recommended approach look like? > >> > >> For example, > >> ==== > >> Mat A = MatCreateSeqAIJWithArrays() to wrap the local CSR. > >> > >> Mat B = MatCreateSeqAIJ(). Do some preallocation for num non-zeroes, > use MatSetValues() to fill in. Need extra garray[] as linear lookup for > the global column numbers of B. > >> > >> Or as an alternative, calculate the off-diagonal as a CSR by hand and > use Mat B = MatCreateSeqAIJWithArrays() to wrap it. > >> > >> Finally, > >> Use MatCreateMPIAIJWithSeqAIJ() to produce the full matrix. > >> > >> Assuming that I used MatCreateSeqAIJWithArrays() to create both the A > and B matrices, then they both hold a shallow copy of my own storage. > >> In MatCreateSeqAIJWithArrays(), I can't really tell what happens to the > A matrix. For the B matrix, it appears that its column entries are changed > to be those of the global columns and its data values are handed off to > another MatCreateSeqAIJ() as the off-diagonal bits. The original B matrix > is tagged up to avoid any deletion, and the shallow copied part is tagged > to be deleted. If I follow this properly, this implies that if I was > managing the storage of the original B matrix myself, I now have double > deletion? > >> > >> I would have expected something like this instead (around line 3431 of > mpiaij.c in master): > >> > >> /* Retain original memory management */ > >> bnew->singlemalloc = b->singlemalloc; > >> bnew->free_a = b->free_a; > >> bnew->free_ij = b->free_ij; > >> > >> /* B arrays are shared by Bnew */ > >> b->singlemalloc = PETSC_FALSE; > >> b->free_a = PETSC_FALSE; > >> b->free_ij = PETSC_FALSE; > >> ierr = MatDestroy(&B);CHKERRQ(ierr); > >> > >> > >> Have I gone off in completely the wrong direction here? > >> Is there a better method of approaching this? > >> > >> Cheers, > >> /mark > > > > -- > Dr Mark OLESEN > Principal Engineer, ESI-OpenCFD > ESI GmbH | Einsteinring 24 | 85609 Munich | GERMANY > Mob. +49 171 9710 149 > www.openfoam.com | www.esi-group.com | mark.olesen at esi-group.com > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From youjunhu at gmail.com Sun Jul 29 23:35:31 2018 From: youjunhu at gmail.com (Youjun Hu) Date: Sun, 29 Jul 2018 22:35:31 -0600 Subject: [petsc-users] How_to_get_other_processor's_portion_of_a_vector Message-ID: Hi all, The man-page for VecGetValues subroutine states that: "VecGetValues gets values from certain locations of a vector. Currently can only get values on the same processor ". I am wondering whether there is a subroutine that can be used to get values from any portion of a vector, rather than limited to the current processor's portion of the vector? It seems natural to expect that PETSc provides this kind of capability, which is already there for some subroutines, e.g., VecSetValues. When using VecSetValues to set the values of a vector, one processor can set other processors' portion of the vector. The communication is handled by PETSc when VecAssembly is called. Am I missing something obvious? Cheers, Youjun -------------- next part -------------- An HTML attachment was scrubbed... URL: From jed at jedbrown.org Sun Jul 29 23:36:37 2018 From: jed at jedbrown.org (Jed Brown) Date: Sun, 29 Jul 2018 22:36:37 -0600 Subject: [petsc-users] How_to_get_other_processor's_portion_of_a_vector In-Reply-To: References: Message-ID: <877eld8hm2.fsf@jedbrown.org> See VecScatter. Youjun Hu writes: > Hi all, > > The man-page for VecGetValues subroutine states that: > "VecGetValues gets values from certain locations of a vector. Currently can > only get values on the same processor ". > > I am wondering whether there is a subroutine that can be used to get values > from any portion of a vector, rather than limited to the current > processor's portion of the vector? > > It seems natural to expect that PETSc provides this kind of capability, > which is already there for some subroutines, e.g., VecSetValues. > > When using VecSetValues to set the values of a vector, one processor can > set other processors' portion of the vector. The communication is handled > by PETSc when VecAssembly is called. > > Am I missing something obvious? > Cheers, > Youjun From youjunhu at gmail.com Sun Jul 29 23:54:07 2018 From: youjunhu at gmail.com (Youjun Hu) Date: Sun, 29 Jul 2018 22:54:07 -0600 Subject: [petsc-users] How_to_get_other_processor's_portion_of_a_vector In-Reply-To: <877eld8hm2.fsf@jedbrown.org> References: <877eld8hm2.fsf@jedbrown.org> Message-ID: Thank Jed for your instant response. VectScatter seems as complicated as my manually handling the MPI communication when fetching a remote portion of a vector. Hope there is a simple way provided by PETSc to achieve this. Cheers, Youjun On Sun, Jul 29, 2018 at 10:36 PM, Jed Brown wrote: > See VecScatter. > > Youjun Hu writes: > > > Hi all, > > > > The man-page for VecGetValues subroutine states that: > > "VecGetValues gets values from certain locations of a vector. Currently > can > > only get values on the same processor ". > > > > I am wondering whether there is a subroutine that can be used to get > values > > from any portion of a vector, rather than limited to the current > > processor's portion of the vector? > > > > It seems natural to expect that PETSc provides this kind of capability, > > which is already there for some subroutines, e.g., VecSetValues. > > > > When using VecSetValues to set the values of a vector, one processor can > > set other processors' portion of the vector. The communication is handled > > by PETSc when VecAssembly is called. > > > > Am I missing something obvious? > > Cheers, > > Youjun > -------------- next part -------------- An HTML attachment was scrubbed... URL: From youjunhu at gmail.com Mon Jul 30 00:42:28 2018 From: youjunhu at gmail.com (Youjun Hu) Date: Sun, 29 Jul 2018 23:42:28 -0600 Subject: [petsc-users] How_to_get_other_processor's_portion_of_a_vector In-Reply-To: <877eld8hm2.fsf@jedbrown.org> References: <877eld8hm2.fsf@jedbrown.org> Message-ID: After doing some research, I am convinced that VecScatter is the proper subroutine to use in getting off-process values of a vector. Thank Jed. Youjun On Sun, Jul 29, 2018 at 10:36 PM, Jed Brown wrote: > See VecScatter. > > Youjun Hu writes: > > > Hi all, > > > > The man-page for VecGetValues subroutine states that: > > "VecGetValues gets values from certain locations of a vector. Currently > can > > only get values on the same processor ". > > > > I am wondering whether there is a subroutine that can be used to get > values > > from any portion of a vector, rather than limited to the current > > processor's portion of the vector? > > > > It seems natural to expect that PETSc provides this kind of capability, > > which is already there for some subroutines, e.g., VecSetValues. > > > > When using VecSetValues to set the values of a vector, one processor can > > set other processors' portion of the vector. The communication is handled > > by PETSc when VecAssembly is called. > > > > Am I missing something obvious? > > Cheers, > > Youjun > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastian.loehrer at tu-dresden.de Mon Jul 30 04:48:19 2018 From: bastian.loehrer at tu-dresden.de (=?UTF-8?Q?Bastian_L=c3=b6hrer?=) Date: Mon, 30 Jul 2018 11:48:19 +0200 Subject: [petsc-users] Is there a way of having PETSc compile hypre with provided intel/mkl? Message-ID: <9446a516-0987-6a5f-d6a4-c73a33a0e2b8@tu-dresden.de> Dear PETSc users, im configuring PETSc to use an intel stack including intel/mkl: ./configure PETSC_ARCH=$PETSC_ARCH \ --with-gnu-compilers=0 --with-vendor-compilers=intel??????????????????????????????????? \ --with-large-file-io=1 \ --CFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ --CXXFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include -lmpi -lmpicxx" \ --FFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ --LDFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include -lmpi"?????????? \ --with-blas-lapack-dir="${MKLROOT}/lib/intel64" \ --download-hypre \ --with-debugging=yes * two questions:* * 1)* the blas-lapack-dir option is not passed down to the compilation of hypre according to $PETSC_DIR/$PETSC_ARCH/conf/hypre *Is there a way of having PETSc compile hypre with my intel/mkl?* * 2)* *Should I omit or include any option?* I have come across a few options in previous configuration calls used at my department which I have removed from my configuration call because a) I had the impression that they were of no additional use: * --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --with-mpi=1 * --with-pic, because --with-pic=1 is the default anyway since 2.3.1, is it not? (https://www.mcs.anl.gov/petsc/documentation/changes/231.html) * --with-mpiexec=mpirun * --with-mpi-compilers=1 * --known-mpi-shared=1 * --with-mpi-dir=... * COPTFLAGS="-g" CXXOPTFLAGS="-g" FOPTFLAGS="-g" because --with-debugging=yes adds them anyway b) because I couldn't figure out what they were actually for: * --configModules=PETSc.Configure * --optionsModule=PETSc.compilerOptions c) others: * --known-64-bit-blas-indices I guess it wouldn't hurt anyway so I guess I'll include this option the next time I configure petsc (http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscBLASInt.html) Looking forward to your advice Kind regards, Bastian -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Jul 30 06:28:18 2018 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 30 Jul 2018 07:28:18 -0400 Subject: [petsc-users] Is there a way of having PETSc compile hypre with provided intel/mkl? In-Reply-To: <9446a516-0987-6a5f-d6a4-c73a33a0e2b8@tu-dresden.de> References: <9446a516-0987-6a5f-d6a4-c73a33a0e2b8@tu-dresden.de> Message-ID: On Mon, Jul 30, 2018 at 5:48 AM Bastian L?hrer < bastian.loehrer at tu-dresden.de> wrote: > Dear PETSc users, > > im configuring PETSc to use an intel stack including intel/mkl: > ./configure > PETSC_ARCH=$PETSC_ARCH > \ > --with-gnu-compilers=0 > --with-vendor-compilers=intel \ > --with-large-file-io=1 > \ > --CFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include > -lmpi" \ > --CXXFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include > -lmpi -lmpicxx" \ > --FFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include > -lmpi" \ > --LDFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include > -lmpi" \ > --with-blas-lapack-dir="${MKLROOT}/lib/intel64" > \ > --download-hypre > \ > --with-debugging=yes > > > * two questions:* > > > * 1)* the blas-lapack-dir option is not passed down to the compilation of > hypre according to $PETSC_DIR/$PETSC_ARCH/conf/hypre > *Is there a way of having PETSc compile hypre with my intel/mkl?* > This should happen. Please send configure.log so we can see what went on. > > * 2)* *Should I omit or include any option?* I have come across a few > options in previous configuration calls used at my department which I have > removed from my configuration call because > > a) I had the impression that they were of no additional use: > > - --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --with-mpi=1 > - --with-pic, because --with-pic=1 is the default anyway since 2.3.1, > is it not? > (https://www.mcs.anl.gov/petsc/documentation/changes/231.html) > - --with-mpiexec=mpirun > - --with-mpi-compilers=1 > - --known-mpi-shared=1 > - --with-mpi-dir=... > - COPTFLAGS="-g" CXXOPTFLAGS="-g" FOPTFLAGS="-g" because > --with-debugging=yes adds them anyway > > Yes, getting rid of all these is fine. > b) because I couldn't figure out what they were actually for: > > - --configModules=PETSc.Configure > - --optionsModule=PETSc.compilerOptions > > Those are added automatically. These are hooks so that you can completely change the system without getting rid of the low-level tests. > c) others: > > - --known-64-bit-blas-indices I guess it wouldn't hurt anyway so I > guess I'll include this option the next time I configure petsc > ( > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscBLASInt.html > ) > > We have a bunch of -known-* options. They are used for any test that has to execute. Batch environments cannot, and thus you need to specify all of them. You do not need it unless you are using --with-batch. Thanks, Matt > Looking forward to your advice > > Kind regards, > Bastian > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastian.loehrer at tu-dresden.de Mon Jul 30 08:24:12 2018 From: bastian.loehrer at tu-dresden.de (=?UTF-8?Q?Bastian_L=c3=b6hrer?=) Date: Mon, 30 Jul 2018 15:24:12 +0200 Subject: [petsc-users] Is there a way of having PETSc compile hypre with provided intel/mkl? In-Reply-To: References: <9446a516-0987-6a5f-d6a4-c73a33a0e2b8@tu-dresden.de> Message-ID: On 30.07.2018 13:28, Matthew Knepley wrote: > On Mon, Jul 30, 2018 at 5:48 AM Bastian L?hrer > > > wrote: > > Dear PETSc users, > > im configuring PETSc to use an intel stack including intel/mkl: > > ./configure PETSC_ARCH=$PETSC_ARCH \ > --with-gnu-compilers=0 --with-vendor-compilers=intel \ > --with-large-file-io=1 \ > --CFLAGS="-L${I_MPI_ROOT}/intel64/lib > -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ > --CXXFLAGS="-L${I_MPI_ROOT}/intel64/lib > -I${I_MPI_ROOT}/intel64/include -lmpi -lmpicxx" \ > --FFLAGS="-L${I_MPI_ROOT}/intel64/lib > -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ > --LDFLAGS="-L${I_MPI_ROOT}/intel64/lib > -I${I_MPI_ROOT}/intel64/include -lmpi"?????????? \ > --with-blas-lapack-dir="${MKLROOT}/lib/intel64" \ > --download-hypre \ > --with-debugging=yes > > * > two questions:* > > * > 1)* the blas-lapack-dir option is not passed down to the > compilation of hypre according to $PETSC_DIR/$PETSC_ARCH/conf/hypre > *Is there a way of having PETSc compile hypre with my intel/mkl?* > > > This should happen. Please send configure.log so we can see what went on. My initial guess was that the file $PETSC_DIR/$PETSC_ARCH/conf/hypre lists the parameters which are used for compiling hypre. As I said, this file does not mention mkl anywhere. I may be mistaken though, because having a second look I do realize that the mkl library is mentioned in the configure log file in line 86661 ff. (where hypre is being configured) and at the end of the log. Here is my configure.log: https://cloudstore.zih.tu-dresden.de/index.php/s/b6rT0WMAKEMsj8S/download Here is that hypre file: https://cloudstore.zih.tu-dresden.de/index.php/s/TSfXQ2pgDw5ALZm/download Thanks, Bastian > * > 2)* *Should I omit or include any option?* I have come across a > few options in previous configuration calls used at my department > which I have removed from my configuration call because > > a) I had the impression that they were of no additional use: > > * --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort > --with-mpi=1 > * --with-pic, because --with-pic=1 is the default anyway > since 2.3.1, is it not? > (https://www.mcs.anl.gov/petsc/documentation/changes/231.html) > * --with-mpiexec=mpirun > * --with-mpi-compilers=1 > * --known-mpi-shared=1 > * --with-mpi-dir=... > * COPTFLAGS="-g" CXXOPTFLAGS="-g" FOPTFLAGS="-g" because > --with-debugging=yes adds them anyway > > Yes, getting rid of all these is fine. > > b) because I couldn't figure out what they were actually for: > > * --configModules=PETSc.Configure > * --optionsModule=PETSc.compilerOptions > > Those are added automatically. These are hooks so that you can > completely change the system without > getting rid of the low-level tests. > > c) others: > > * --known-64-bit-blas-indices I guess it wouldn't hurt > anyway so I guess I'll include this option the next time I > configure petsc > (http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscBLASInt.html) > > We have a bunch of -known-* options. They are used for any test that > has to execute. Batch environments cannot, > and thus you need to specify all of them. You do not need it unless > you are using --with-batch. Okay, fantastic, thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfadams at lbl.gov Mon Jul 30 08:42:56 2018 From: mfadams at lbl.gov (Mark Adams) Date: Mon, 30 Jul 2018 09:42:56 -0400 Subject: [petsc-users] Is there a way of having PETSc compile hypre with provided intel/mkl? In-Reply-To: References: <9446a516-0987-6a5f-d6a4-c73a33a0e2b8@tu-dresden.de> Message-ID: Hypre embedded LAPACK in their source so I doubt you can have hypre use MKL. Hypre supports OMP now, but I have been having a lot of numerical problems with hypre/OMP on KNL. On Mon, Jul 30, 2018 at 9:24 AM Bastian L?hrer < bastian.loehrer at tu-dresden.de> wrote: > On 30.07.2018 13:28, Matthew Knepley wrote: > > On Mon, Jul 30, 2018 at 5:48 AM Bastian L?hrer < > bastian.loehrer at tu-dresden.de> wrote: > >> Dear PETSc users, >> >> im configuring PETSc to use an intel stack including intel/mkl: >> ./configure >> PETSC_ARCH=$PETSC_ARCH >> \ >> --with-gnu-compilers=0 >> --with-vendor-compilers=intel \ >> --with-large-file-io=1 >> \ >> --CFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include >> -lmpi" \ >> --CXXFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include >> -lmpi -lmpicxx" \ >> --FFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include >> -lmpi" \ >> --LDFLAGS="-L${I_MPI_ROOT}/intel64/lib -I${I_MPI_ROOT}/intel64/include >> -lmpi" \ >> --with-blas-lapack-dir="${MKLROOT}/lib/intel64" >> \ >> --download-hypre >> \ >> --with-debugging=yes >> >> >> * two questions:* >> >> >> * 1)* the blas-lapack-dir option is not passed down to the compilation >> of hypre according to $PETSC_DIR/$PETSC_ARCH/conf/hypre >> *Is there a way of having PETSc compile hypre with my intel/mkl?* >> > > This should happen. Please send configure.log so we can see what went on. > > My initial guess was that the file $PETSC_DIR/$PETSC_ARCH/conf/hypre lists > the parameters which are used for compiling hypre. As I said, this file > does not mention mkl anywhere. > I may be mistaken though, because having a second look I do realize that > the mkl library is mentioned in the configure log file in line 86661 ff. > (where hypre is being configured) and at the end of the log. > > Here is my configure.log: > > https://cloudstore.zih.tu-dresden.de/index.php/s/b6rT0WMAKEMsj8S/download > > Here is that hypre file: > > https://cloudstore.zih.tu-dresden.de/index.php/s/TSfXQ2pgDw5ALZm/download > > Thanks, > Bastian > > > > >> * 2)* *Should I omit or include any option?* I have come across a few >> options in previous configuration calls used at my department which I have >> removed from my configuration call because >> >> a) I had the impression that they were of no additional use: >> >> - --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --with-mpi=1 >> - --with-pic, because --with-pic=1 is the default anyway since 2.3.1, >> is it not? >> (https://www.mcs.anl.gov/petsc/documentation/changes/231.html) >> - --with-mpiexec=mpirun >> - --with-mpi-compilers=1 >> - --known-mpi-shared=1 >> - --with-mpi-dir=... >> - COPTFLAGS="-g" CXXOPTFLAGS="-g" FOPTFLAGS="-g" because >> --with-debugging=yes adds them anyway >> >> Yes, getting rid of all these is fine. > >> b) because I couldn't figure out what they were actually for: >> >> - --configModules=PETSc.Configure >> - --optionsModule=PETSc.compilerOptions >> >> Those are added automatically. These are hooks so that you can completely > change the system without > getting rid of the low-level tests. > >> c) others: >> >> - --known-64-bit-blas-indices I guess it wouldn't hurt anyway so I >> guess I'll include this option the next time I configure petsc >> ( >> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscBLASInt.html >> ) >> >> We have a bunch of -known-* options. They are used for any test that has > to execute. Batch environments cannot, > and thus you need to specify all of them. You do not need it unless you > are using --with-batch. > > Okay, fantastic, thank you! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Mon Jul 30 09:11:01 2018 From: balay at mcs.anl.gov (Satish Balay) Date: Mon, 30 Jul 2018 09:11:01 -0500 Subject: [petsc-users] Is there a way of having PETSc compile hypre with provided intel/mkl? In-Reply-To: References: <9446a516-0987-6a5f-d6a4-c73a33a0e2b8@tu-dresden.de> Message-ID: On Mon, 30 Jul 2018, Bastian L?hrer wrote: > On 30.07.2018 13:28, Matthew Knepley wrote: > > On Mon, Jul 30, 2018 at 5:48 AM Bastian L?hrer > > > > > wrote: > > > > Dear PETSc users, > > > > im configuring PETSc to use an intel stack including intel/mkl: > > > > ./configure PETSC_ARCH=$PETSC_ARCH \ > > --with-gnu-compilers=0 --with-vendor-compilers=intel \ > > --with-large-file-io=1 \ > > --CFLAGS="-L${I_MPI_ROOT}/intel64/lib > > -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ > > --CXXFLAGS="-L${I_MPI_ROOT}/intel64/lib > > -I${I_MPI_ROOT}/intel64/include -lmpi -lmpicxx" \ > > --FFLAGS="-L${I_MPI_ROOT}/intel64/lib > > -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ > > --LDFLAGS="-L${I_MPI_ROOT}/intel64/lib > > -I${I_MPI_ROOT}/intel64/include -lmpi"?????????? \ > > --with-blas-lapack-dir="${MKLROOT}/lib/intel64" \ > > --download-hypre \ > > --with-debugging=yes > > > > * > > two questions:* > > > > * > > 1)* the blas-lapack-dir option is not passed down to the > > compilation of hypre according to $PETSC_DIR/$PETSC_ARCH/conf/hypre > > *Is there a way of having PETSc compile hypre with my intel/mkl?* > > > > > > This should happen. Please send configure.log so we can see what went on. > My initial guess was that the file $PETSC_DIR/$PETSC_ARCH/conf/hypre lists the > parameters which are used for compiling hypre. As I said, this file does not > mention mkl anywhere. > I may be mistaken though, because having a second look I do realize that the > mkl library is mentioned in the configure log file in line 86661 ff. (where > hypre is being configured) and at the end of the log. > > Here is my configure.log: > https://cloudstore.zih.tu-dresden.de/index.php/s/b6rT0WMAKEMsj8S/download > > Here is that hypre file: > https://cloudstore.zih.tu-dresden.de/index.php/s/TSfXQ2pgDw5ALZm/download Working directory: /lustre/ssd/prime/libraries/petsc-3.3-p6_29 This release is pretty old. Can you use the currently supported release - i.e 3.9? Satish > > Thanks, > Bastian > > > > * > > 2)* *Should I omit or include any option?* I have come across a > > few options in previous configuration calls used at my department > > which I have removed from my configuration call because > > > > a) I had the impression that they were of no additional use: > > > > * --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort > > --with-mpi=1 > > * --with-pic, because --with-pic=1 is the default anyway > > since 2.3.1, is it not? > > (https://www.mcs.anl.gov/petsc/documentation/changes/231.html) > > * --with-mpiexec=mpirun > > * --with-mpi-compilers=1 > > * --known-mpi-shared=1 > > * --with-mpi-dir=... > > * COPTFLAGS="-g" CXXOPTFLAGS="-g" FOPTFLAGS="-g" because > > --with-debugging=yes adds them anyway > > > > Yes, getting rid of all these is fine. > > > > b) because I couldn't figure out what they were actually for: > > > > * --configModules=PETSc.Configure > > * --optionsModule=PETSc.compilerOptions > > > > Those are added automatically. These are hooks so that you can completely > > change the system without > > getting rid of the low-level tests. > > > > c) others: > > > > * --known-64-bit-blas-indices I guess it wouldn't hurt > > anyway so I guess I'll include this option the next time I > > configure petsc > > (http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscBLASInt.html) > > > > We have a bunch of -known-* options. They are used for any test that has to > > execute. Batch environments cannot, > > and thus you need to specify all of them. You do not need it unless you are > > using --with-batch. > Okay, fantastic, thank you! > From youjunhu at gmail.com Mon Jul 30 10:46:47 2018 From: youjunhu at gmail.com (Youjun Hu) Date: Mon, 30 Jul 2018 09:46:47 -0600 Subject: [petsc-users] How_to_get_other_processor's_portion_of_a_vector In-Reply-To: References: <877eld8hm2.fsf@jedbrown.org> Message-ID: It turns out I asked a question that is on the FAQ page: How do I access the values of a parallel PETSc vector on a different process than owns them? - On each process create a local vector large enough to hold all the values it wishes to access - Create a VecScatter that scatters from the parallel vector into the local vectors - Use VecGetArray() to access the values in the local vector On Sun, Jul 29, 2018 at 11:42 PM, Youjun Hu wrote: > After doing some research, I am convinced that VecScatter is the proper > subroutine to use in getting off-process values of a vector. > Thank Jed. > Youjun > > On Sun, Jul 29, 2018 at 10:36 PM, Jed Brown wrote: > >> See VecScatter. >> >> Youjun Hu writes: >> >> > Hi all, >> > >> > The man-page for VecGetValues subroutine states that: >> > "VecGetValues gets values from certain locations of a vector. Currently >> can >> > only get values on the same processor ". >> > >> > I am wondering whether there is a subroutine that can be used to get >> values >> > from any portion of a vector, rather than limited to the current >> > processor's portion of the vector? >> > >> > It seems natural to expect that PETSc provides this kind of capability, >> > which is already there for some subroutines, e.g., VecSetValues. >> > >> > When using VecSetValues to set the values of a vector, one processor can >> > set other processors' portion of the vector. The communication is >> handled >> > by PETSc when VecAssembly is called. >> > >> > Am I missing something obvious? >> > Cheers, >> > Youjun >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastian.loehrer at tu-dresden.de Mon Jul 30 10:55:05 2018 From: bastian.loehrer at tu-dresden.de (=?UTF-8?Q?Bastian_L=c3=b6hrer?=) Date: Mon, 30 Jul 2018 17:55:05 +0200 Subject: [petsc-users] Is there a way of having PETSc compile hypre with provided intel/mkl? In-Reply-To: References: <9446a516-0987-6a5f-d6a4-c73a33a0e2b8@tu-dresden.de> Message-ID: On 30.07.2018 16:11, Satish Balay wrote: > On Mon, 30 Jul 2018, Bastian L?hrer wrote: > >> On 30.07.2018 13:28, Matthew Knepley wrote: >>> On Mon, Jul 30, 2018 at 5:48 AM Bastian L?hrer >>> > >>> wrote: >>> >>> Dear PETSc users, >>> >>> im configuring PETSc to use an intel stack including intel/mkl: >>> >>> ./configure PETSC_ARCH=$PETSC_ARCH \ >>> --with-gnu-compilers=0 --with-vendor-compilers=intel \ >>> --with-large-file-io=1 \ >>> --CFLAGS="-L${I_MPI_ROOT}/intel64/lib >>> -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ >>> --CXXFLAGS="-L${I_MPI_ROOT}/intel64/lib >>> -I${I_MPI_ROOT}/intel64/include -lmpi -lmpicxx" \ >>> --FFLAGS="-L${I_MPI_ROOT}/intel64/lib >>> -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ >>> --LDFLAGS="-L${I_MPI_ROOT}/intel64/lib >>> -I${I_MPI_ROOT}/intel64/include -lmpi"?????????? \ >>> --with-blas-lapack-dir="${MKLROOT}/lib/intel64" \ >>> --download-hypre \ >>> --with-debugging=yes >>> >>> * >>> two questions:* >>> >>> * >>> 1)* the blas-lapack-dir option is not passed down to the >>> compilation of hypre according to $PETSC_DIR/$PETSC_ARCH/conf/hypre >>> *Is there a way of having PETSc compile hypre with my intel/mkl?* >>> >>> >>> This should happen. Please send configure.log so we can see what went on. >> My initial guess was that the file $PETSC_DIR/$PETSC_ARCH/conf/hypre lists the >> parameters which are used for compiling hypre. As I said, this file does not >> mention mkl anywhere. >> I may be mistaken though, because having a second look I do realize that the >> mkl library is mentioned in the configure log file in line 86661 ff. (where >> hypre is being configured) and at the end of the log. >> >> Here is my configure.log: >> https://cloudstore.zih.tu-dresden.de/index.php/s/b6rT0WMAKEMsj8S/download >> >> Here is that hypre file: >> https://cloudstore.zih.tu-dresden.de/index.php/s/TSfXQ2pgDw5ALZm/download > Working directory: /lustre/ssd/prime/libraries/petsc-3.3-p6_29 > > > This release is pretty old. Can you use the currently supported release - i.e 3.9? > > Satish Yes, we are indeed currently updating our code to be compatible with 3.9, but we will need older versions of petsc too to be able to run old versions of our code. Bastian From repepo at gmail.com Mon Jul 30 10:58:24 2018 From: repepo at gmail.com (Santiago Andres Triana) Date: Mon, 30 Jul 2018 17:58:24 +0200 Subject: [petsc-users] problem with installation using quad precision Message-ID: Dear petsc-users, I am trying to install petsc with the option --with-precision=__float128. The ./configure goes fine, as well as the make all stage. However, the make check step to test the libraries fails with the following error: /usr/bin/ld: home/spin/petsc-3.9.3/arch-linux2-c-opt/lib/libpetsc.so: undefined reference to `dgemv_' this is the configure command I use: ./configure --with-scalar-type=complex --with-precision=__float128 --with-debugging=0 --with-fortran-kernels=1 COPTFLAGS='-O3 -march=native -mtune=native' CXXOPTFLAGS='-O3 -march=native -mtune=native' FOPTFLAGS='-O3 -march=native -mtune=native' --download-f2cblaslapack Any hints or suggestions are welcome. Thanks so much in advance! Santiago -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Mon Jul 30 11:00:47 2018 From: balay at mcs.anl.gov (Satish Balay) Date: Mon, 30 Jul 2018 11:00:47 -0500 Subject: [petsc-users] Is there a way of having PETSc compile hypre with provided intel/mkl? In-Reply-To: References: <9446a516-0987-6a5f-d6a4-c73a33a0e2b8@tu-dresden.de> Message-ID: On Mon, 30 Jul 2018, Bastian L?hrer wrote: > On 30.07.2018 16:11, Satish Balay wrote: > > On Mon, 30 Jul 2018, Bastian L?hrer wrote: > > > >> On 30.07.2018 13:28, Matthew Knepley wrote: > >>> On Mon, Jul 30, 2018 at 5:48 AM Bastian L?hrer > >>> > > >>> wrote: > >>> > >>> Dear PETSc users, > >>> > >>> im configuring PETSc to use an intel stack including intel/mkl: > >>> > >>> ./configure PETSC_ARCH=$PETSC_ARCH \ > >>> --with-gnu-compilers=0 --with-vendor-compilers=intel \ > >>> --with-large-file-io=1 \ > >>> --CFLAGS="-L${I_MPI_ROOT}/intel64/lib > >>> -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ > >>> --CXXFLAGS="-L${I_MPI_ROOT}/intel64/lib > >>> -I${I_MPI_ROOT}/intel64/include -lmpi -lmpicxx" \ > >>> --FFLAGS="-L${I_MPI_ROOT}/intel64/lib > >>> -I${I_MPI_ROOT}/intel64/include -lmpi"??????????? \ > >>> --LDFLAGS="-L${I_MPI_ROOT}/intel64/lib > >>> -I${I_MPI_ROOT}/intel64/include -lmpi"?????????? \ > >>> --with-blas-lapack-dir="${MKLROOT}/lib/intel64" \ > >>> --download-hypre \ > >>> --with-debugging=yes > >>> > >>> * > >>> two questions:* > >>> > >>> * > >>> 1)* the blas-lapack-dir option is not passed down to the > >>> compilation of hypre according to $PETSC_DIR/$PETSC_ARCH/conf/hypre > >>> *Is there a way of having PETSc compile hypre with my intel/mkl?* > >>> > >>> > >>> This should happen. Please send configure.log so we can see what went on. > >> My initial guess was that the file $PETSC_DIR/$PETSC_ARCH/conf/hypre lists > >> the > >> parameters which are used for compiling hypre. As I said, this file does > >> not > >> mention mkl anywhere. > >> I may be mistaken though, because having a second look I do realize that > >> the > >> mkl library is mentioned in the configure log file in line 86661 ff. (where > >> hypre is being configured) and at the end of the log. > >> > >> Here is my configure.log: > >> https://cloudstore.zih.tu-dresden.de/index.php/s/b6rT0WMAKEMsj8S/download > >> > >> Here is that hypre file: > >> https://cloudstore.zih.tu-dresden.de/index.php/s/TSfXQ2pgDw5ALZm/download > > Working directory: /lustre/ssd/prime/libraries/petsc-3.3-p6_29 > > > > > > This release is pretty old. Can you use the currently supported release - > > i.e 3.9? > > > > Satish > Yes, we are indeed currently updating our code to be compatible with 3.9, but > we will need older versions of petsc too to be able to run old versions of our > code. With older versions - your best bet is to port this patch over and see if that works. https://bitbucket.org/petsc/petsc/commits/77408d619c8 Or build hypre manually - using the additinal options enabled by this patch [or check and the hypre config from the hypre build that the current verison of PETSc builds and installs] Satish From jed at jedbrown.org Mon Jul 30 11:42:40 2018 From: jed at jedbrown.org (Jed Brown) Date: Mon, 30 Jul 2018 10:42:40 -0600 Subject: [petsc-users] problem with installation using quad precision In-Reply-To: References: Message-ID: <87pnz47jzz.fsf@jedbrown.org> Santiago Andres Triana writes: > Dear petsc-users, > > I am trying to install petsc with the option --with-precision=__float128. > The ./configure goes fine, as well as the make all stage. However, the make > check step to test the libraries fails with the following error: > > /usr/bin/ld: home/spin/petsc-3.9.3/arch-linux2-c-opt/lib/libpetsc.so: > undefined reference to `dgemv_' Please send complete configure.log and make.log. Possibly fighting between f2cblaslapack and Fortran kernels. > > this is the configure command I use: > > ./configure --with-scalar-type=complex --with-precision=__float128 > --with-debugging=0 --with-fortran-kernels=1 COPTFLAGS='-O3 -march=native > -mtune=native' CXXOPTFLAGS='-O3 -march=native -mtune=native' FOPTFLAGS='-O3 > -march=native -mtune=native' --download-f2cblaslapack Note that -mtune=native above is redundant -- you only need to specify it explicitly if you want to tune to a more restrictive class of processors. For example -march=sandybridge -mtune=skylake would not use AVX2/FMA instructions, but would optimize code on the assumption of an extra load/store unit (present in Haswell and Skylake; may mean more cycles waiting on load/store when run on Sandy Bridge). From rupp at iue.tuwien.ac.at Mon Jul 30 11:58:25 2018 From: rupp at iue.tuwien.ac.at (Karl Rupp) Date: Mon, 30 Jul 2018 11:58:25 -0500 Subject: [petsc-users] problem with installation using quad precision In-Reply-To: References: Message-ID: Hi Santiago, > I am trying to install petsc with the option > --with-precision=__float128. The ./configure goes fine, as well as the > make all stage. However, the make check step to test the libraries fails > with the following error: > > /usr/bin/ld: home/spin/petsc-3.9.3/arch-linux2-c-opt/lib/libpetsc.so: > undefined reference to `dgemv_' > > > this is the configure command I use: > > ./configure --with-scalar-type=complex --with-precision=__float128 > --with-debugging=0 --with-fortran-kernels=1 COPTFLAGS='-O3 -march=native > -mtune=native' CXXOPTFLAGS='-O3 -march=native -mtune=native' > FOPTFLAGS='-O3 -march=native -mtune=native' --download-f2cblaslapack > > > Any hints or suggestions are welcome. Thanks so much in advance! I just verified the following to work on my laptop: ./configure --with-scalar-type=complex --with-precision=__float128 --download-f2cblaslapack --download-mpich As Jed pointed out, --with-fortran-kernels=1 is probably clashing with --download-f2cblaslapack. Does the build succeed without --with-fortran-kernels=1? Best regards, Karli From repepo at gmail.com Mon Jul 30 12:10:38 2018 From: repepo at gmail.com (Santiago Andres Triana) Date: Mon, 30 Jul 2018 19:10:38 +0200 Subject: [petsc-users] problem with installation using quad precision In-Reply-To: References: Message-ID: Dear Karl, Jed: It was indeed the --with-fortran-kernels=1 option the culprit. Without it the make check steps succeeds :) Thanks so much for your prompt help! Santiago On Mon, Jul 30, 2018 at 6:58 PM, Karl Rupp wrote: > Hi Santiago, > > > I am trying to install petsc with the option --with-precision=__float128. >> The ./configure goes fine, as well as the make all stage. However, the make >> check step to test the libraries fails with the following error: >> >> /usr/bin/ld: home/spin/petsc-3.9.3/arch-linux2-c-opt/lib/libpetsc.so: >> undefined reference to `dgemv_' >> >> >> this is the configure command I use: >> >> ./configure --with-scalar-type=complex --with-precision=__float128 >> --with-debugging=0 --with-fortran-kernels=1 COPTFLAGS='-O3 -march=native >> -mtune=native' CXXOPTFLAGS='-O3 -march=native -mtune=native' FOPTFLAGS='-O3 >> -march=native -mtune=native' --download-f2cblaslapack >> >> >> Any hints or suggestions are welcome. Thanks so much in advance! >> > > I just verified the following to work on my laptop: > > ./configure --with-scalar-type=complex --with-precision=__float128 > --download-f2cblaslapack --download-mpich > > As Jed pointed out, --with-fortran-kernels=1 is probably clashing with > --download-f2cblaslapack. Does the build succeed without > --with-fortran-kernels=1? > > Best regards, > Karli > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Mon Jul 30 18:17:39 2018 From: bsmith at mcs.anl.gov (Smith, Barry F.) Date: Mon, 30 Jul 2018 23:17:39 +0000 Subject: [petsc-users] problem with installation using quad precision In-Reply-To: References: Message-ID: <824973F8-086C-468A-9C8F-562E55465DDB@anl.gov> the --with-fortran-kernels=1 option the culprit I have fixed this culprit and the fix will be in master soon > On Jul 30, 2018, at 12:10 PM, Santiago Andres Triana wrote: > > Dear Karl, Jed: > > It was indeed the --with-fortran-kernels=1 option the culprit. Without it the make check steps succeeds :) > > Thanks so much for your prompt help! > > Santiago > > > > On Mon, Jul 30, 2018 at 6:58 PM, Karl Rupp wrote: > Hi Santiago, > > > I am trying to install petsc with the option --with-precision=__float128. The ./configure goes fine, as well as the make all stage. However, the make check step to test the libraries fails with the following error: > > /usr/bin/ld: home/spin/petsc-3.9.3/arch-linux2-c-opt/lib/libpetsc.so: undefined reference to `dgemv_' > > > this is the configure command I use: > > ./configure --with-scalar-type=complex --with-precision=__float128 --with-debugging=0 --with-fortran-kernels=1 COPTFLAGS='-O3 -march=native -mtune=native' CXXOPTFLAGS='-O3 -march=native -mtune=native' FOPTFLAGS='-O3 -march=native -mtune=native' --download-f2cblaslapack > > > Any hints or suggestions are welcome. Thanks so much in advance! > > I just verified the following to work on my laptop: > > ./configure --with-scalar-type=complex --with-precision=__float128 --download-f2cblaslapack --download-mpich > > As Jed pointed out, --with-fortran-kernels=1 is probably clashing with --download-f2cblaslapack. Does the build succeed without --with-fortran-kernels=1? > > Best regards, > Karli >