Thanks Jed. One more thing: what does the three lines stand for then? I was thinking it was three Newton steps, but I understand it's not...
The output I sent was actually the output of one of your examples. The one from my own code is Testing hand-coded Jacobian, if the ratio is O(1.e-8), the hand-coded Jacobian is probably correct. Run with -snes_test_display to show difference of hand-coded and finite difference Jacobian. Norm of matrix ratio 9.17257e-08 difference 2.58876e-05 Norm of matrix ratio 1.45865e-06 difference 0.000430034 Norm of matrix ratio 1.47148e-06 difference 0.000429436 [0]PETSC ERROR: SNESSolve() line 2361 in src/snes/interface/snes.c [0]PETSC ERROR: main() line 71 in jactest.cpp application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0 [unset]: aborting job: application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0 so I guess I have to look for an error somewhere! Thanks again Gianluca On 18 March 2011 12:12, Jed Brown <jed at 59a2.org> wrote: > On Fri, Mar 18, 2011 at 12:07, Gianluca Meneghello <gianmail at gmail.com> > wrote: >> >> esting hand-coded Jacobian, if the ratio is >> O(1.e-8), the hand-coded Jacobian is probably correct. >> Run with -snes_test_display to show difference >> of hand-coded and finite difference Jacobian. >> Norm of matrix ratio 1.08967e-07 difference 2.43658e-07 >> Norm of matrix ratio 7.6194e-08 difference 3.4075e-07 >> Norm of matrix ratio 7.6211e-08 difference 3.40826e-07 > > Your Jacobian looks good so you don't need to use TEST. > >> >> [0]PETSC ERROR: SNESSolve() line 2360 in src/snes/interface/snes.c >> [0]PETSC ERROR: main() line 144 in src/snes/examples/tutorials/ex1.c >> application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0 >> [unset]: aborting job: >> application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0 > > This is intentional, the end of SNESSolve_Test() has > ? /* > ? ? ? ? ?Return error code cause Jacobian not good > ? */ > ? PetscFunctionReturn(PETSC_ERR_ARG_WRONGSTATE); > Perhaps it should be done differently, maybe even solve the Newton step and > continue, but that's not the current behavior. -- "[Je pense que] l'homme est un monde qui vaut des fois les mondes et que les plus ardentes ambitions sont celles qui ont eu l'orgueil de l'Anonymat" -- Non omnibus, sed mihi et tibi Amedeo Modigliani
