On Sun, Jun 3, 2012 at 9:19 AM, Niceno Bojan <bojan.niceno at psi.ch> wrote:
> I use a command like this: > > MatSetValues(A, 1, &gi, 1, &gj, &M[i][j], INSERT_VALUES); > > Always inserting values, rather than adding. > > > > Did you use -ksp_view_binary and ksp ex10 to check that the system really > > is identical? Does ksp ex10 give the same output each time you run it? > > Not yet. I am not that prudent with PETSc, I am currently celebrating for > being able to see residual history :-) > Just go build that example, then run it with -f path/to/binaryoutput. It will load the matrix and vector from the file and solve. > > Can you send a few iterations of output from -ksp_monitor_true_residual? > > Yes, they look like: > > 0 KSP preconditioned resid norm 5.321355215818e+01 true resid norm > 1.650035042618e+01 ||r(i)||/||b|| 1.000000000000e+00 > 1 KSP preconditioned resid norm 2.013755144242e+01 true resid norm > 1.361285352452e+01 ||r(i)||/||b|| 8.250039043366e-01 > 2 KSP preconditioned resid norm 7.629376453731e+00 true resid norm > 3.184316336783e-01 ||r(i)||/||b|| 1.929847702951e-02 > 3 KSP preconditioned resid norm 3.869976235279e+00 true resid norm > 4.559806478792e-01 ||r(i)||/||b|| 2.763460387822e-02 > 4 KSP preconditioned resid norm 1.889666147602e+00 true resid norm > 1.422513113059e-01 ||r(i)||/||b|| 8.621108499622e-03 > 5 KSP preconditioned resid norm 9.253616017337e-01 true resid norm > 1.065191369186e-02 ||r(i)||/||b|| 6.455568164761e-04 > 6 KSP preconditioned resid norm 4.759923245260e-01 true resid norm > 2.662360840276e-02 ||r(i)||/||b|| 1.613517756600e-03 > 7 KSP preconditioned resid norm 2.492423883098e-01 true resid norm > 1.216652507263e-02 ||r(i)||/||b|| 7.373494961255e-04 > 8 KSP preconditioned resid norm 1.306776196573e-01 true resid norm > 1.933734977205e-03 ||r(i)||/||b|| 1.171935702734e-04 > 9 KSP preconditioned resid norm 7.267055499898e-02 true resid norm > 9.770926706361e-04 ||r(i)||/||b|| 5.921647997767e-05 > 10 KSP preconditioned resid norm 3.833602982459e-02 true resid norm > 9.695036607433e-04 ||r(i)||/||b|| 5.875654975214e-05 > velocity[0] took 10 iterations to reach residual 3.83360e-02 > Interesting that the true residual is dropping faster than preconditioned residual. Can you show the output from both runs? Are each individually reproducible? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120603/bbe4a81e/attachment.html>
