<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 26, 2010, at 3:53 PM, Barry Smith wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br> &nbsp;&nbsp;./configure an optimized version of PETSc (that is with the ./configure flag of --with-debugging=0)</div></blockquote><div><br></div><div><div>&nbsp;./configure --with -debugging=0</div><div>it says I should&nbsp;config/configure.py --with-mpi=0 --with-debugging=no --download-f-blas-lapack=1</div><div>so I did this.</div><div><br></div><div>When I compile my code again, I got:</div><div><br></div><div><div>gcc -Wall -Wwrite-strings -Wno-strict-aliasing -O &nbsp;-o pihm &nbsp;pihm.o f.o read_alloc.o initialize.o is_sm_et.o update.o print.o -Wl,-rpath,/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -L/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -lpetsc &nbsp; &nbsp;-lX11 -Wl,-rpath,/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -L/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -lflapack -lfblas -lm -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lgcc_s -lgfortran -lm -lm -ldl -lgcc_s -ldl&nbsp;</div><div>/usr/bin/ld: cannot find -lpetsc</div><div>collect2: ld returned 1 exit status</div><div><br></div></div><div><br></div></div><div><br></div><br><blockquote type="cite"><div> and run with -log_summary to get a summary of where it is spending the time.</div></blockquote><div><br></div><div><br></div><div><br></div><br><blockquote type="cite"><div> This will give you a better idea of why it is taking so long.<br><br> &nbsp;&nbsp;Barry<br><br>On Jul 26, 2010, at 2:49 PM, Xuan YU wrote:<br><br><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am using TS solving a nonlinear problem. I created an approximate data structure for Jacobian matrix to be used with matcoloring, my MatFDColoringView is like this:<br></blockquote><blockquote type="cite">&lt;Picture 1.png&gt;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">But the speed of code is too slow than what I expected. Only 10 time step costs 11seconds!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What's wrong with my code? How can I speed up?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is the ts_view result.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">TS Object:<br></blockquote><blockquote type="cite"> type: beuler<br></blockquote><blockquote type="cite"> maximum steps=100<br></blockquote><blockquote type="cite"> maximum time=10<br></blockquote><blockquote type="cite"> total number of nonlinear solver iterations=186<br></blockquote><blockquote type="cite"> total number of linear solver iterations=423<br></blockquote><blockquote type="cite"> SNES Object:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;type: ls<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;line search variant: SNESLineSearchCubic<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;alpha=0.0001, maxstep=1e+08, minlambda=1e-12<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;maximum iterations=50, maximum function evaluations=10000<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;tolerances: relative=1e-08, absolute=1e-50, solution=1e-08<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;total number of linear solver iterations=1<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;total number of function evaluations=19<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;KSP Object:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;type: gmres<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GMRES: happy breakdown tolerance 1e-30<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;maximum iterations=10000, initial guess is zero<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;tolerances: &nbsp;relative=1e-05, absolute=1e-50, divergence=10000<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;left preconditioning<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;using PRECONDITIONED norm type for convergence test<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;PC Object:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;type: ilu<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ILU: out-of-place factorization<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 levels of fill<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tolerance for zero pivot 1e-12<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;using diagonal shift to prevent zero pivot<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matrix ordering: natural<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;factor fill ratio given 1, needed 1<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Factored matrix follows:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Matrix Object:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type=seqaij, rows=1838, cols=1838<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;package used to perform factorization: petsc<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;total: nonzeros=8464, allocated nonzeros=8464<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;total number of mallocs used during MatSetValues calls =0<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;not using I-node routines<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;linear system matrix = precond matrix:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;Matrix Object:<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type=seqaij, rows=1838, cols=1838<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;total: nonzeros=8464, allocated nonzeros=9745<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;total number of mallocs used during MatSetValues calls =37<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;not using I-node routines<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Xuan YU<br></blockquote><blockquote type="cite"><a href="mailto:xxy113@psu.edu">xxy113@psu.edu</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br><br></div></blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Xuan YU (<span class="Apple-style-span" style="font-family: arial; font-size: 16px; white-space: pre; ">俞烜<span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; white-space: normal; ">)</span></span></div><div><a href="mailto:xxy113@psu.edu">xxy113@psu.edu</a></div><div><br></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"> </div><br></body></html>