On Thu, Sep 3, 2009 at 7:34 AM, xiaoyin ji <span dir="ltr"><<a href="mailto:sapphire.jxy@gmail.com">sapphire.jxy@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
Here are the print outs<br>
<br>
for the very beginning, average time is about 0.8sec for the ksp solver<br>
KSP Object:<br>
type: bicg<br>
maximum iterations=10000, initial guess is zero<br>
tolerances: relative=1e-07, absolute=1e-50, divergence=10000<br>
left preconditioning<br>
PC Object:<br>
type: bjacobi<br>
block Jacobi: number of blocks = 16<br>
Local solve is same for all blocks, in the following KSP and PC objects:<br>
KSP Object:(sub_)<br>
type: preonly<br>
maximum iterations=10000, initial guess is zero<br>
tolerances: relative=1e-05, absolute=1e-50, divergence=10000<br>
left preconditioning<br>
PC Object:(sub_)<br>
type: ilu<br>
ILU: 0 levels of fill<br>
ILU: factor fill ratio allocated 1<br>
ILU: tolerance for zero pivot 1e-12<br>
ILU: using diagonal shift to prevent zero pivot<br>
ILU: using diagonal shift on blocks to prevent zero pivot<br>
out-of-place factorization<br>
matrix ordering: natural<br>
ILU: factor fill ratio needed 1<br>
Factored matrix follows<br>
Matrix Object:<br>
type=seqaij, rows=5672, cols=5672<br>
package used to perform factorization: petsc<br>
total: nonzeros=39090, allocated nonzeros=39704<br>
not using I-node routines<br>
linear system matrix = precond matrix:<br>
Matrix Object:<br>
type=seqaij, rows=5672, cols=5672<br>
total: nonzeros=39090, allocated nonzeros=39704<br>
not using I-node routines<br>
linear system matrix = precond matrix:<br>
Matrix Object:<br>
type=mpiaij, rows=90746, cols=90746<br>
total: nonzeros=636378, allocated nonzeros=1279114<br>
not using I-node (on process 0) routines<br>
Norm of error 48.144, Iterations 137<br>
<br>
After 4000 steps, solver takes 7.5sec<br>
<br>
KSP Object:<br>
type: bicg<br>
maximum iterations=10000, initial guess is zero<br>
tolerances: relative=1e-07, absolute=1e-50, divergence=10000<br>
left preconditioning<br>
PC Object:<br>
type: bjacobi<br>
block Jacobi: number of blocks = 16<br>
Local solve is same for all blocks, in the following KSP and PC objects:<br>
KSP Object:(sub_)<br>
type: preonly<br>
maximum iterations=10000, initial guess is zero<br>
tolerances: relative=1e-05, absolute=1e-50, divergence=10000<br>
left preconditioning<br>
PC Object:(sub_)<br>
type: ilu<br>
ILU: 0 levels of fill<br>
ILU: factor fill ratio allocated 1<br>
ILU: tolerance for zero pivot 1e-12<br>
ILU: using diagonal shift to prevent zero pivot<br>
ILU: using diagonal shift on blocks to prevent zero pivot<br>
out-of-place factorization<br>
matrix ordering: natural<br>
ILU: factor fill ratio needed 1<br>
Factored matrix follows<br>
Matrix Object:<br>
type=seqaij, rows=5672, cols=5672<br>
package used to perform factorization: petsc<br>
total: nonzeros=39090, allocated nonzeros=39704<br>
not using I-node routines<br>
linear system matrix = precond matrix:<br>
Matrix Object:<br>
type=seqaij, rows=5672, cols=5672<br>
total: nonzeros=39090, allocated nonzeros=39704<br>
not using I-node routines<br>
linear system matrix = precond matrix:<br>
Matrix Object:<br>
type=mpiaij, rows=90746, cols=90746<br>
total: nonzeros=636378, allocated nonzeros=1279114<br>
not using I-node (on process 0) routines<br>
Norm of error 48.7467, Iterations 132<br>
<br>
<br>
The iterations are similar, solving time is actually increasing<br>
exponentially, and the matrix should not be too complicated here as<br>
the PETSc in Fortran solved this in 1sec.<br></blockquote><div><br>You did not send the output of -log_summary. You will probably have to<br>segregate the solves into different stages in order to see the difference.<br> <br>
I suspect<br><br> a) You do not have something preallocated correctly<br><br> b) You are not freeing something (run with -malloc_dump) and thus clogging memory<br><br> c) something apart from PETSc is taking time<br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
By the way, will there be a way to set a PETSc vector directly into a<br>
preconditioner for the ksp solver?<br></blockquote><div><br>Do not know what you mean here.<br><br> Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks!<br>
<br>
Best,<br>
Xiaoyin Ji<br>
<br>
Department of Materials Science and Engineering<br>
North Carolina State University<br>
</blockquote></div><br><br clear="all"><br>-- <br>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<br>