<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 22, 2016 at 10:50 PM, Jie Cheng <span dir="ltr"><<a href="mailto:chengj5@rpi.edu" target="_blank">chengj5@rpi.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Jed and Barry<div><br></div><div>Thanks for your help. After I reconfigured PETSc without debugging, it did become much faster. But still not fast enough. The problem remains: what could be the factor that slows the solver down? In this example, only 4662 nodes and 2920 elements are used. Typically I use 3D hexahedral element, the number of degrees of freedom in the mixed formulation I use is 3*4662+2920 = 16906. At this point, my code runs only in serial. I am planning to parallelize it and then work with much finer mesh in the future. If as Barry said, the number of degrees of freedom is too small for iterative solvers, then which direct solver do you recommend to use? </div></div></blockquote><div><br></div><div>SuperLU or MUMPS. Iterative solvers usually do not win until > 50K unknowns or maybe 100K depending on your system.</div><div><br></div><div>Also, the solver you showed last time made no sense. You had GMRES/ILU(0) preconditioning GMRES. You should remove</div><div>the outer solver, and use a better preconditioner since iLU(0) is quite weak.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Here is the log when I ran without debugging. It is not fast enough because this is only 1 step, and there are 99 more steps. </div><div><br></div><div>Thank you.</div><div>Jie</div><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>---------------------------------------------- PETSc Performance Summary: ----------------------------------------------</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>./main on a arch-darwin-c-opt named jiecheng.local with 1 processor, by Jie Fri Apr 22 22:36:38 2016</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Using Petsc Release Version 3.6.3, Dec, 03, 2015 </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Max Max/Min Avg Total </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Time (sec): 1.520e+02 1.00000 1.520e+02</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Objects: 6.800e+01 1.00000 6.800e+01</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Flops: 2.590e+11 1.00000 2.590e+11 2.590e+11</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Flops/sec: 1.704e+09 1.00000 1.704e+09 1.704e+09</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MPI Messages: 0.000e+00 0.00000 0.000e+00 0.000e+00</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MPI Message Lengths: 0.000e+00 0.00000 0.000e+00 0.000e+00</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MPI Reductions: 0.000e+00 0.00000</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Flop counting convention: 1 flop = 1 real number operation of type (multiply/divide/add/subtract)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> e.g., VecAXPY() for real vectors of length N --> 2N flops</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> and VecAXPY() for complex vectors of length N --> 8N flops</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Summary of Stages: ----- Time ------ ----- Flops ----- --- Messages --- -- Message Lengths -- -- Reductions --</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Avg %Total Avg %Total counts %Total Avg %Total counts %Total </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> 0: Main Stage: 1.5195e+02 100.0% 2.5896e+11 100.0% 0.000e+00 0.0% 0.000e+00 0.0% 0.000e+00 0.0% </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>------------------------------------------------------------------------------------------------------------------------</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>See the 'Profiling' chapter of the users' manual for details on interpreting output.</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Phase summary info:</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Count: number of times phase was executed</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Time and Flops: Max - maximum over all processors</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Ratio - ratio of maximum to minimum over all processors</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Mess: number of messages sent</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Avg. len: average message length (bytes)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Reduct: number of global reductions</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Global: entire computation</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Stage: stages of a computation. Set stages with PetscLogStagePush() and PetscLogStagePop().</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> %T - percent time in this phase %F - percent flops in this phase</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> %M - percent messages in this phase %L - percent message lengths in this phase</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> %R - percent reductions in this phase</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Total Mflop/s: 10e-6 * (sum of flops over all processors)/(max time over all processors)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>------------------------------------------------------------------------------------------------------------------------</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Event Count Time (sec) Flops --- Global --- --- Stage --- Total</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Max Ratio Max Ratio Max Ratio Mess Avg len Reduct %T %F %M %L %R %T %F %M %L %R Mflop/s</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>------------------------------------------------------------------------------------------------------------------------</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>--- Event Stage 0: Main Stage</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecMDot 49906 1.0 8.4904e+00 1.0 2.61e+10 1.0 0.0e+00 0.0e+00 0.0e+00 6 10 0 0 0 6 10 0 0 0 3074</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecNorm 51599 1.0 1.0644e+00 1.0 1.74e+09 1.0 0.0e+00 0.0e+00 0.0e+00 1 1 0 0 0 1 1 0 0 0 1639</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecScale 51587 1.0 4.5893e-01 1.0 8.72e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 1900</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecCopy 1682 1.0 2.9097e-02 1.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecSet 1781 1.0 1.9067e-02 1.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecAXPY 3324 1.0 5.8797e-02 1.0 1.12e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 1911</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecAYPX 12 1.0 3.0708e-04 1.0 4.06e+05 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 1321</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecMAXPY 51581 1.0 7.2805e+00 1.0 2.78e+10 1.0 0.0e+00 0.0e+00 0.0e+00 5 11 0 0 0 5 11 0 0 0 3817</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecAssemblyBegin 18 1.0 4.0531e-06 1.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecAssemblyEnd 18 1.0 0.0000e+00 0.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>VecNormalize 51581 1.0 1.5588e+00 1.0 2.62e+09 1.0 0.0e+00 0.0e+00 0.0e+00 1 1 0 0 0 1 1 0 0 0 1678</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MatMult 51555 1.0 6.2301e+01 1.0 1.01e+11 1.0 0.0e+00 0.0e+00 0.0e+00 41 39 0 0 0 41 39 0 0 0 1622</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MatSolve 51561 1.0 5.8966e+01 1.0 1.01e+11 1.0 0.0e+00 0.0e+00 0.0e+00 39 39 0 0 0 39 39 0 0 0 1714</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MatLUFactorNum 6 1.0 1.4240e-01 1.0 2.23e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 1569</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MatILUFactorSym 1 1.0 1.0796e-02 1.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MatAssemblyBegin 6 1.0 0.0000e+00 0.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MatAssemblyEnd 6 1.0 6.2988e-03 1.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MatGetRowIJ 1 1.0 5.9605e-06 1.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MatGetOrdering 1 1.0 5.3310e-04 1.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>MatZeroEntries 6 1.0 5.8441e-03 1.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>KSPGMRESOrthog 49906 1.0 1.5348e+01 1.0 5.22e+10 1.0 0.0e+00 0.0e+00 0.0e+00 10 20 0 0 0 10 20 0 0 0 3401</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>KSPSetUp 7 1.0 1.5509e-03 1.0 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</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>KSPSolve 6 1.0 1.3919e+02 1.0 2.59e+11 1.0 0.0e+00 0.0e+00 0.0e+00 92100 0 0 0 92100 0 0 0 1861</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>PCSetUp 6 1.0 1.5490e-01 1.0 2.23e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 1442</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>PCApply 20 1.0 1.3901e+02 1.0 2.59e+11 1.0 0.0e+00 0.0e+00 0.0e+00 91100 0 0 0 91100 0 0 0 1861</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>------------------------------------------------------------------------------------------------------------------------</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Memory usage is given in bytes:</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Object Type Creations Destructions Memory Descendants' Mem.</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Reports information only for process 0.</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>--- Event Stage 0: Main Stage</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Vector 56 56 7659456 0</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Matrix 2 2 24271340 0</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Krylov Solver 2 2 36720 0</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Preconditioner 2 2 1832 0</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Index Set 5 5 237080 0</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span> Viewer 1 0 0 0</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>========================================================================================================================</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Average time to get PetscTime(): 2.14577e-07</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>#PETSc Option Table entries:</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>-log_summary</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>#End of PETSc Option Table entries</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Compiled without FORTRAN kernels</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Compiled with full precision matrices (default)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>sizeof(short) 2 sizeof(int) 4 sizeof(long) 8 sizeof(void*) 8 sizeof(PetscScalar) 8 sizeof(PetscInt) 4</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>Configure options: --with-debugging=no</span></div></div><div><div><blockquote type="cite"><div>On Apr 22, 2016, at 6:30 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:</div><br><div><div>Allow me to call your attention to some fine print:<br><br> ##########################################################<br> # #<br> # WARNING!!! #<br> # #<br> # This code was compiled with a debugging option, #<br> # To get timing results run ./configure #<br> # using --with-debugging=no, the performance will #<br> # be generally two or three times faster. #<br> # #<br> ##########################################################<br><br><br>Please always use "reply-all" so that your messages go to the list.<br>This is standard mailing list etiquette. It is important to preserve<br>threading for people who find this discussion later and so that we do<br>not waste our time re-answering the same questions that have already<br>been answered in private side-conversations. You'll likely get an<br>answer faster that way too.<br><br>Jie Cheng <<a href="mailto:chengj5@rpi.edu" target="_blank">chengj5@rpi.edu</a>> writes:<br><br><blockquote type="cite">Hello Jed<br><br>Thanks for your reply. Here is the log: (the first a couple of lines are printed by my own code during a time step, “iteration” means the number of Newton’s iteration, “GMRES_iteration” denotes the number of GMRES iterations it takes in a particular Newton’s iteration, err1 and err2 are my criteria of convergence)<br><br><br>Number of nonzeros allocated: 988540<br>Step = 1, LoadFactor = 1.0000e-02<br>REASON: 2<br>Iteration = 1 GMRES_Iteration = 2 Err1 = 1.0000e+00, Err2 = 1.8375e-11<br>REASON: 2<br>Iteration = 2 GMRES_Iteration = 4 Err1 = 4.1151e-02, Err2 = 5.9467e-11<br>REASON: 2<br>Iteration = 3 GMRES_Iteration = 2 Err1 = 1.0265e-02, Err2 = 2.1268e-12<br>REASON: 2<br>Iteration = 4 GMRES_Iteration = 2 Err1 = 8.9824e-04, Err2 = 1.2622e-14<br>REASON: 2<br>Iteration = 5 GMRES_Iteration = 2 Err1 = 1.5741e-04, Err2 = 8.1248e-16<br>REASON: 2<br>Iteration = 6 GMRES_Iteration = 2 Err1 = 7.1515e-06, Err2 = 1.6605e-16<br>************************************************************************************************************************<br>*** WIDEN YOUR WINDOW TO 120 CHARACTERS. Use 'enscript -r -fCourier9' to print this document ***<br>************************************************************************************************************************<br><br>---------------------------------------------- PETSc Performance Summary: ----------------------------------------------<br><br>./main on a arch-darwin-c-debug named jiecheng.local with 1 processor, by Jie Fri Apr 22 18:06:33 2016<br>Using Petsc Release Version 3.6.3, Dec, 03, 2015 <br><br> Max Max/Min Avg Total <br>Time (sec): 4.119e+02 1.00000 4.119e+02<br>Objects: 6.800e+01 1.00000 6.800e+01<br>Flops: 2.590e+11 1.00000 2.590e+11 2.590e+11<br>Flops/sec: 6.287e+08 1.00000 6.287e+08 6.287e+08<br>Memory: 3.308e+07 1.00000 3.308e+07<br>MPI Messages: 0.000e+00 0.00000 0.000e+00 0.000e+00<br>MPI Message Lengths: 0.000e+00 0.00000 0.000e+00 0.000e+00<br>MPI Reductions: 0.000e+00 0.00000<br><br>Flop counting convention: 1 flop = 1 real number operation of type (multiply/divide/add/subtract)<br> e.g., VecAXPY() for real vectors of length N --> 2N flops<br> and VecAXPY() for complex vectors of length N --> 8N flops<br><br>Summary of Stages: ----- Time ------ ----- Flops ----- --- Messages --- -- Message Lengths -- -- Reductions --<br> Avg %Total Avg %Total counts %Total Avg %Total counts %Total <br> 0: Main Stage: 4.1191e+02 100.0% 2.5896e+11 100.0% 0.000e+00 0.0% 0.000e+00 0.0% 0.000e+00 0.0% <br><br>------------------------------------------------------------------------------------------------------------------------<br>See the 'Profiling' chapter of the users' manual for details on interpreting output.<br>Phase summary info:<br> Count: number of times phase was executed<br> Time and Flops: Max - maximum over all processors<br> Ratio - ratio of maximum to minimum over all processors<br> Mess: number of messages sent<br> Avg. len: average message length (bytes)<br> Reduct: number of global reductions<br> Global: entire computation<br> Stage: stages of a computation. Set stages with PetscLogStagePush() and PetscLogStagePop().<br> %T - percent time in this phase %F - percent flops in this phase<br> %M - percent messages in this phase %L - percent message lengths in this phase<br> %R - percent reductions in this phase<br> Total Mflop/s: 10e-6 * (sum of flops over all processors)/(max time over all processors)<br>------------------------------------------------------------------------------------------------------------------------<br><br><br> ##########################################################<br> # #<br> # WARNING!!! #<br> # #<br> # This code was compiled with a debugging option, #<br> # To get timing results run ./configure #<br> # using --with-debugging=no, the performance will #<br> # be generally two or three times faster. #<br> # #<br> ##########################################################<br><br><br>Event Count Time (sec) Flops --- Global --- --- Stage --- Total<br> Max Ratio Max Ratio Max Ratio Mess Avg len Reduct %T %F %M %L %R %T %F %M %L %R Mflop/s<br>------------------------------------------------------------------------------------------------------------------------<br><br>--- Event Stage 0: Main Stage<br><br>VecMDot 49906 1.0 2.1200e+01 1.0 2.61e+10 1.0 0.0e+00 0.0e+00 0.0e+00 5 10 0 0 0 5 10 0 0 0 1231<br>VecNorm 51599 1.0 1.5052e+00 1.0 1.74e+09 1.0 0.0e+00 0.0e+00 0.0e+00 0 1 0 0 0 0 1 0 0 0 1159<br>VecScale 51587 1.0 5.6397e+00 1.0 8.72e+08 1.0 0.0e+00 0.0e+00 0.0e+00 1 0 0 0 0 1 0 0 0 0 155<br>VecCopy 1682 1.0 5.0184e-02 1.0 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<br>VecSet 1781 1.0 3.5445e-02 1.0 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<br>VecAXPY 3324 1.0 4.0115e-01 1.0 1.12e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 280<br>VecAYPX 12 1.0 1.0931e-03 1.0 4.06e+05 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 371<br>VecMAXPY 51581 1.0 2.4876e+01 1.0 2.78e+10 1.0 0.0e+00 0.0e+00 0.0e+00 6 11 0 0 0 6 11 0 0 0 1117<br>VecAssemblyBegin 18 1.0 1.6809e-04 1.0 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<br>VecAssemblyEnd 18 1.0 1.2112e-04 1.0 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<br>VecNormalize 51581 1.0 8.1458e+00 1.0 2.62e+09 1.0 0.0e+00 0.0e+00 0.0e+00 2 1 0 0 0 2 1 0 0 0 321<br>MatMult 51555 1.0 1.5226e+02 1.0 1.01e+11 1.0 0.0e+00 0.0e+00 0.0e+00 37 39 0 0 0 37 39 0 0 0 664<br>MatSolve 51561 1.0 1.7415e+02 1.0 1.01e+11 1.0 0.0e+00 0.0e+00 0.0e+00 42 39 0 0 0 42 39 0 0 0 580<br>MatLUFactorNum 6 1.0 6.3280e-01 1.0 2.23e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 353<br>MatILUFactorSym 1 1.0 2.1535e-02 1.0 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<br>MatAssemblyBegin 6 1.0 3.2902e-05 1.0 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<br>MatAssemblyEnd 6 1.0 1.7512e-02 1.0 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<br>MatGetRowIJ 1 1.0 6.8307e-04 1.0 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<br>MatGetOrdering 1 1.0 1.3239e-02 1.0 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<br>MatZeroEntries 6 1.0 9.4421e-03 1.0 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<br>KSPGMRESOrthog 49906 1.0 4.6091e+01 1.0 5.22e+10 1.0 0.0e+00 0.0e+00 0.0e+00 11 20 0 0 0 11 20 0 0 0 1133<br>KSPSetUp 7 1.0 3.3112e-03 1.0 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<br>KSPSolve 6 1.0 3.8880e+02 1.0 2.59e+11 1.0 0.0e+00 0.0e+00 0.0e+00 94100 0 0 0 94100 0 0 0 666<br>PCSetUp 6 1.0 6.8447e-01 1.0 2.23e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 326<br>PCApply 20 1.0 3.8806e+02 1.0 2.59e+11 1.0 0.0e+00 0.0e+00 0.0e+00 94100 0 0 0 94100 0 0 0 667<br>------------------------------------------------------------------------------------------------------------------------<br><br>Memory usage is given in bytes:<br><br>Object Type Creations Destructions Memory Descendants' Mem.<br>Reports information only for process 0.<br><br>--- Event Stage 0: Main Stage<br><br> Vector 56 56 7659456 0<br> Matrix 2 2 24271340 0<br> Krylov Solver 2 2 36720 0<br> Preconditioner 2 2 1832 0<br> Index Set 5 5 237080 0<br> Viewer 1 0 0 0<br>========================================================================================================================<br>Average time to get PetscTime(): 9.53674e-08<br>#PETSc Option Table entries:<br>-log_summary<br>#End of PETSc Option Table entries<br>Compiled without FORTRAN kernels<br>Compiled with full precision matrices (default)<br>sizeof(short) 2 sizeof(int) 4 sizeof(long) 8 sizeof(void*) 8 sizeof(PetscScalar) 8 sizeof(PetscInt) 4<br>Configure options: --with-mpi-dir=/usr/local<br>-----------------------------------------<br>Libraries compiled on Tue Mar 22 14:05:36 2016 on <a href="http://calcium-68.dynamic2.rpi.edu" target="_blank">calcium-68.dynamic2.rpi.edu</a> <br>Machine characteristics: Darwin-15.4.0-x86_64-i386-64bit<br>Using PETSc directory: /usr/local/petsc/petsc-3.6.3<br>Using PETSc arch: arch-darwin-c-debug<br>-----------------------------------------<br><br>Using C compiler: /usr/local/bin/mpicc -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -O0 ${COPTFLAGS} ${CFLAGS}<br>Using Fortran compiler: /usr/local/bin/mpif90 -fPIC -Wall -Wno-unused-variable -ffree-line-length-0 -Wno-unused-dummy-argument -g -O0 ${FOPTFLAGS} ${FFLAGS} <br>-----------------------------------------<br><br>Using include paths: -I/usr/local/petsc/petsc-3.6.3/arch-darwin-c-debug/include -I/usr/local/petsc/petsc-3.6.3/include -I/usr/local/petsc/petsc-3.6.3/include -I/usr/local/petsc/petsc-3.6.3/arch-darwin-c-debug/include -I/usr/local/include<br>-----------------------------------------<br><br>Using C linker: /usr/local/bin/mpicc<br>Using Fortran linker: /usr/local/bin/mpif90<br>Using libraries: -Wl,-rpath,/usr/local/petsc/petsc-3.6.3/arch-darwin-c-debug/lib -L/usr/local/petsc/petsc-3.6.3/arch-darwin-c-debug/lib -lpetsc -llapack -lblas -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/7.3.0/lib/darwin -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/7.3.0/lib/darwin -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lgfortran -Wl,-rpath,/usr/local/gfortran/lib/gcc/x86_64-apple-darwin14/4.9.2 -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin14/4.9.2 -Wl,-rpath,/usr/local/gfortran/lib -L/usr/local/gfortran/lib -lgfortran -lgcc_ext.10.5 -lquadmath -lm -lclang_rt.osx -lmpi_cxx -lc++ -Wl,-rpath,/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin -lclang_rt.osx -Wl,-rpath,/usr/local/lib -L/usr/local/lib -ldl -lmpi -lSystem -Wl,-rpath,/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin -lclang_rt.osx -ldl <br>-----------------------------------------<br><br><blockquote type="cite">On Apr 22, 2016, at 5:12 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:<br><br>Always send the output with -log_summary when asking about performance.<br><br>Jie Cheng <<a href="mailto:chengj5@rpi.edu" target="_blank">chengj5@rpi.edu</a>> writes:<br><br><blockquote type="cite">Hi <br><br>I’m implementing finite element method on nonlinear solid mechanics. The main portion of my code that involves PETSc is that in each step, the tangent stiffness matrix A is formed and the increment of the nodal degrees of freedom is solved. Standard Newton’s iteration. The problem is: when I use Krylov methods to solve the linear system, the KSPsolve process takes too long, although only 2 or 3 iterations are needed. <br><br>The finite element formulation is the displacement/pressure mixed formulation, which I believe is symmetric and positive-definite. However if I pick conjugate gradient method with ICC preconditioned, PETSc gives me a -8 converged reason, which indicates a non-positive-definite matrix. After a couple of trials and errors, the only pair that works is GMRES plus PCKSP. But as I said, the KSPsolve function takes too much time.<br><br>A typical problem I’m trying has 16906 rows and 16906 cols. The message printed out by ksp_view is as following:<br><br>KSP Object: 1 MPI processes<br> type: gmres<br> GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br> GMRES: happy breakdown tolerance 1e-30<br> maximum iterations=10000, initial guess is zero<br> tolerances: relative=1e-05, absolute=1e-50, divergence=10000<br> left preconditioning<br> using PRECONDITIONED norm type for convergence test<br>PC Object: 1 MPI processes<br> type: ksp<br> KSP and PC on KSP preconditioner follow<br> ---------------------------------<br> KSP Object: (ksp_) 1 MPI processes<br> type: gmres<br> GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br> GMRES: happy breakdown tolerance 1e-30<br> maximum iterations=10000, initial guess is zero<br> tolerances: relative=1e-05, absolute=1e-50, divergence=10000<br> left preconditioning<br> using PRECONDITIONED norm type for convergence test<br> PC Object: (ksp_) 1 MPI processes<br> type: ilu<br> ILU: out-of-place factorization<br> 0 levels of fill<br> tolerance for zero pivot 2.22045e-14<br> matrix ordering: natural<br> factor fill ratio given 1, needed 1<br> Factored matrix follows:<br> Mat Object: 1 MPI processes<br> type: seqaij<br> rows=16906, cols=16906<br> package used to perform factorization: petsc<br> total: nonzeros=988540, allocated nonzeros=988540<br> total number of mallocs used during MatSetValues calls =0<br> using I-node routines: found 7582 nodes, limit used is 5<br> linear system matrix = precond matrix:<br> Mat Object: 1 MPI processes<br> type: seqaij<br> rows=16906, cols=16906<br> total: nonzeros=988540, allocated nonzeros=988540<br> total number of mallocs used during MatSetValues calls =0<br> using I-node routines: found 7582 nodes, limit used is 5<br> ---------------------------------<br> linear system matrix = precond matrix:<br> Mat Object: 1 MPI processes<br> type: seqaij<br> rows=16906, cols=16906<br> total: nonzeros=988540, allocated nonzeros=988540<br> total number of mallocs used during MatSetValues calls =0<br> using I-node routines: found 7582 nodes, limit used is 5<br><br>Could anyone give me any suggestion please?<br><br>Thanks<br>Jie Cheng<br></blockquote></blockquote></blockquote></div></div></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>