<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Jed and Barry<div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Thank you.</div><div class="">Jie</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">---------------------------------------------- PETSc Performance Summary: ----------------------------------------------</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">./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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Max Max/Min Avg Total </span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Objects: 6.800e+01 1.00000 6.800e+01</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Summary of Stages: ----- Time ------ ----- Flops ----- --- Messages --- -- Message Lengths -- -- Reductions --</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">------------------------------------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Phase summary info:</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Count: number of times phase was executed</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Time and Flops: Max - maximum over all processors</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Ratio - ratio of maximum to minimum over all processors</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Mess: number of messages sent</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Avg. len: average message length (bytes)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Reduct: number of global reductions</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Global: entire computation</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> %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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> %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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> %R - percent reductions in this phase</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">------------------------------------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Event Count Time (sec) Flops --- Global --- --- Stage --- Total</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">------------------------------------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">--- Event Stage 0: Main Stage</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">------------------------------------------------------------------------------------------------------------------------</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Memory usage is given in bytes:</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Object Type Creations Destructions Memory Descendants' Mem.</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Reports information only for process 0.</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">--- Event Stage 0: Main Stage</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Vector 56 56 7659456 0</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Matrix 2 2 24271340 0</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Krylov Solver 2 2 36720 0</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Preconditioner 2 2 1832 0</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Index Set 5 5 237080 0</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Viewer 1 0 0 0</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">========================================================================================================================</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Average time to get PetscTime(): 2.14577e-07</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">#PETSc Option Table entries:</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-log_summary</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">#End of PETSc Option Table entries</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Compiled without FORTRAN kernels</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Compiled with full precision matrices (default)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Configure options: --with-debugging=no</span></div></div><div class=""><div><blockquote type="cite" class=""><div class="">On Apr 22, 2016, at 6:30 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" class="">jed@jedbrown.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Allow me to call your attention to some fine print:<br class=""><br class=""> ##########################################################<br class=""> # #<br class=""> # WARNING!!! #<br class=""> # #<br class=""> # This code was compiled with a debugging option, #<br class=""> # To get timing results run ./configure #<br class=""> # using --with-debugging=no, the performance will #<br class=""> # be generally two or three times faster. #<br class=""> # #<br class=""> ##########################################################<br class=""><br class=""><br class="">Please always use "reply-all" so that your messages go to the list.<br class="">This is standard mailing list etiquette. It is important to preserve<br class="">threading for people who find this discussion later and so that we do<br class="">not waste our time re-answering the same questions that have already<br class="">been answered in private side-conversations. You'll likely get an<br class="">answer faster that way too.<br class=""><br class="">Jie Cheng <<a href="mailto:chengj5@rpi.edu" class="">chengj5@rpi.edu</a>> writes:<br class=""><br class=""><blockquote type="cite" class="">Hello Jed<br class=""><br class="">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 class=""><br class=""><br class="">Number of nonzeros allocated: 988540<br class="">Step = 1, LoadFactor = 1.0000e-02<br class="">REASON: 2<br class="">Iteration = 1 GMRES_Iteration = 2 Err1 = 1.0000e+00, Err2 = 1.8375e-11<br class="">REASON: 2<br class="">Iteration = 2 GMRES_Iteration = 4 Err1 = 4.1151e-02, Err2 = 5.9467e-11<br class="">REASON: 2<br class="">Iteration = 3 GMRES_Iteration = 2 Err1 = 1.0265e-02, Err2 = 2.1268e-12<br class="">REASON: 2<br class="">Iteration = 4 GMRES_Iteration = 2 Err1 = 8.9824e-04, Err2 = 1.2622e-14<br class="">REASON: 2<br class="">Iteration = 5 GMRES_Iteration = 2 Err1 = 1.5741e-04, Err2 = 8.1248e-16<br class="">REASON: 2<br class="">Iteration = 6 GMRES_Iteration = 2 Err1 = 7.1515e-06, Err2 = 1.6605e-16<br class="">************************************************************************************************************************<br class="">*** WIDEN YOUR WINDOW TO 120 CHARACTERS. Use 'enscript -r -fCourier9' to print this document ***<br class="">************************************************************************************************************************<br class=""><br class="">---------------------------------------------- PETSc Performance Summary: ----------------------------------------------<br class=""><br class="">./main on a arch-darwin-c-debug named jiecheng.local with 1 processor, by Jie Fri Apr 22 18:06:33 2016<br class="">Using Petsc Release Version 3.6.3, Dec, 03, 2015 <br class=""><br class=""> Max Max/Min Avg Total <br class="">Time (sec): 4.119e+02 1.00000 4.119e+02<br class="">Objects: 6.800e+01 1.00000 6.800e+01<br class="">Flops: 2.590e+11 1.00000 2.590e+11 2.590e+11<br class="">Flops/sec: 6.287e+08 1.00000 6.287e+08 6.287e+08<br class="">Memory: 3.308e+07 1.00000 3.308e+07<br class="">MPI Messages: 0.000e+00 0.00000 0.000e+00 0.000e+00<br class="">MPI Message Lengths: 0.000e+00 0.00000 0.000e+00 0.000e+00<br class="">MPI Reductions: 0.000e+00 0.00000<br class=""><br class="">Flop counting convention: 1 flop = 1 real number operation of type (multiply/divide/add/subtract)<br class=""> e.g., VecAXPY() for real vectors of length N --> 2N flops<br class=""> and VecAXPY() for complex vectors of length N --> 8N flops<br class=""><br class="">Summary of Stages: ----- Time ------ ----- Flops ----- --- Messages --- -- Message Lengths -- -- Reductions --<br class=""> Avg %Total Avg %Total counts %Total Avg %Total counts %Total <br class=""> 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 class=""><br class="">------------------------------------------------------------------------------------------------------------------------<br class="">See the 'Profiling' chapter of the users' manual for details on interpreting output.<br class="">Phase summary info:<br class=""> Count: number of times phase was executed<br class=""> Time and Flops: Max - maximum over all processors<br class=""> Ratio - ratio of maximum to minimum over all processors<br class=""> Mess: number of messages sent<br class=""> Avg. len: average message length (bytes)<br class=""> Reduct: number of global reductions<br class=""> Global: entire computation<br class=""> Stage: stages of a computation. Set stages with PetscLogStagePush() and PetscLogStagePop().<br class=""> %T - percent time in this phase %F - percent flops in this phase<br class=""> %M - percent messages in this phase %L - percent message lengths in this phase<br class=""> %R - percent reductions in this phase<br class=""> Total Mflop/s: 10e-6 * (sum of flops over all processors)/(max time over all processors)<br class="">------------------------------------------------------------------------------------------------------------------------<br class=""><br class=""><br class=""> ##########################################################<br class=""> # #<br class=""> # WARNING!!! #<br class=""> # #<br class=""> # This code was compiled with a debugging option, #<br class=""> # To get timing results run ./configure #<br class=""> # using --with-debugging=no, the performance will #<br class=""> # be generally two or three times faster. #<br class=""> # #<br class=""> ##########################################################<br class=""><br class=""><br class="">Event Count Time (sec) Flops --- Global --- --- Stage --- Total<br class=""> Max Ratio Max Ratio Max Ratio Mess Avg len Reduct %T %F %M %L %R %T %F %M %L %R Mflop/s<br class="">------------------------------------------------------------------------------------------------------------------------<br class=""><br class="">--- Event Stage 0: Main Stage<br class=""><br class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">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 class="">------------------------------------------------------------------------------------------------------------------------<br class=""><br class="">Memory usage is given in bytes:<br class=""><br class="">Object Type Creations Destructions Memory Descendants' Mem.<br class="">Reports information only for process 0.<br class=""><br class="">--- Event Stage 0: Main Stage<br class=""><br class=""> Vector 56 56 7659456 0<br class=""> Matrix 2 2 24271340 0<br class=""> Krylov Solver 2 2 36720 0<br class=""> Preconditioner 2 2 1832 0<br class=""> Index Set 5 5 237080 0<br class=""> Viewer 1 0 0 0<br class="">========================================================================================================================<br class="">Average time to get PetscTime(): 9.53674e-08<br class="">#PETSc Option Table entries:<br class="">-log_summary<br class="">#End of PETSc Option Table entries<br class="">Compiled without FORTRAN kernels<br class="">Compiled with full precision matrices (default)<br class="">sizeof(short) 2 sizeof(int) 4 sizeof(long) 8 sizeof(void*) 8 sizeof(PetscScalar) 8 sizeof(PetscInt) 4<br class="">Configure options: --with-mpi-dir=/usr/local<br class="">-----------------------------------------<br class="">Libraries compiled on Tue Mar 22 14:05:36 2016 on <a href="http://calcium-68.dynamic2.rpi.edu" class="">calcium-68.dynamic2.rpi.edu</a> <br class="">Machine characteristics: Darwin-15.4.0-x86_64-i386-64bit<br class="">Using PETSc directory: /usr/local/petsc/petsc-3.6.3<br class="">Using PETSc arch: arch-darwin-c-debug<br class="">-----------------------------------------<br class=""><br class="">Using C compiler: /usr/local/bin/mpicc -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -O0 ${COPTFLAGS} ${CFLAGS}<br class="">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 class="">-----------------------------------------<br class=""><br class="">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 class="">-----------------------------------------<br class=""><br class="">Using C linker: /usr/local/bin/mpicc<br class="">Using Fortran linker: /usr/local/bin/mpif90<br class="">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 class="">-----------------------------------------<br class=""><br class=""><blockquote type="cite" class="">On Apr 22, 2016, at 5:12 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" class="">jed@jedbrown.org</a>> wrote:<br class=""><br class="">Always send the output with -log_summary when asking about performance.<br class=""><br class="">Jie Cheng <<a href="mailto:chengj5@rpi.edu" class="">chengj5@rpi.edu</a>> writes:<br class=""><br class=""><blockquote type="cite" class="">Hi <br class=""><br class="">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 class=""><br class="">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 class=""><br class="">A typical problem I’m trying has 16906 rows and 16906 cols. The message printed out by ksp_view is as following:<br class=""><br class="">KSP Object: 1 MPI processes<br class=""> type: gmres<br class=""> GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br class=""> GMRES: happy breakdown tolerance 1e-30<br class=""> maximum iterations=10000, initial guess is zero<br class=""> tolerances: relative=1e-05, absolute=1e-50, divergence=10000<br class=""> left preconditioning<br class=""> using PRECONDITIONED norm type for convergence test<br class="">PC Object: 1 MPI processes<br class=""> type: ksp<br class=""> KSP and PC on KSP preconditioner follow<br class=""> ---------------------------------<br class=""> KSP Object: (ksp_) 1 MPI processes<br class=""> type: gmres<br class=""> GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br class=""> GMRES: happy breakdown tolerance 1e-30<br class=""> maximum iterations=10000, initial guess is zero<br class=""> tolerances: relative=1e-05, absolute=1e-50, divergence=10000<br class=""> left preconditioning<br class=""> using PRECONDITIONED norm type for convergence test<br class=""> PC Object: (ksp_) 1 MPI processes<br class=""> type: ilu<br class=""> ILU: out-of-place factorization<br class=""> 0 levels of fill<br class=""> tolerance for zero pivot 2.22045e-14<br class=""> matrix ordering: natural<br class=""> factor fill ratio given 1, needed 1<br class=""> Factored matrix follows:<br class=""> Mat Object: 1 MPI processes<br class=""> type: seqaij<br class=""> rows=16906, cols=16906<br class=""> package used to perform factorization: petsc<br class=""> total: nonzeros=988540, allocated nonzeros=988540<br class=""> total number of mallocs used during MatSetValues calls =0<br class=""> using I-node routines: found 7582 nodes, limit used is 5<br class=""> linear system matrix = precond matrix:<br class=""> Mat Object: 1 MPI processes<br class=""> type: seqaij<br class=""> rows=16906, cols=16906<br class=""> total: nonzeros=988540, allocated nonzeros=988540<br class=""> total number of mallocs used during MatSetValues calls =0<br class=""> using I-node routines: found 7582 nodes, limit used is 5<br class=""> ---------------------------------<br class=""> linear system matrix = precond matrix:<br class=""> Mat Object: 1 MPI processes<br class=""> type: seqaij<br class=""> rows=16906, cols=16906<br class=""> total: nonzeros=988540, allocated nonzeros=988540<br class=""> total number of mallocs used during MatSetValues calls =0<br class=""> using I-node routines: found 7582 nodes, limit used is 5<br class=""><br class="">Could anyone give me any suggestion please?<br class=""><br class="">Thanks<br class="">Jie Cheng<br class=""></blockquote></blockquote></blockquote></div></div></blockquote></div><br class=""></div></body></html>