> ?You set yourself up for a very painful life. It is simply insane to have a > code that cannot run with tiny problems for debugging and understanding and > similarly run sequentially. Parallel computing with MPI is HARD and the only > way to make it at all manageable is to organize the code so that it is easy > to debug and understand. ?You may think it is silly to waste time making the > code run on small problems sequentially since you want to run big problems > but it is not silly, it is crucial. You would already have debugged and fixed > this problem if you could run the code sequentially on tiny problems. The > extra time in making the code debuggable is much much less than the extra > time wasted futzing around trying to find a bug with no tools to debug. > > ? ?The -snes_type test option has another option -snes_test_display which > will display the two Jacobians and the difference between them allowing one > to see which entries in the Jacobian (if not all of them) are wrong. ?If you > could run on a small problem sequentially you would run with these options, > see what Jacobian entries are wrong and look back at the code that generates > those entries and likely see the bug. > > ? Barry
You are perfectly right about using very small problems for debugging. But clearly, the discussion has diverged from the original topic. Coming therefore back to my very first email in this thread: I have properly converging non-trivial cases with the Newton solver using analytically derived Jacobian. I want to reproduce these results WITHOUT using my Jacobian at all with the secant method (i.e. F'(x) approximated with finite differences)). You say my Jacobian is wrong, and maybe you are right and maybe not. But it does not matter: I do not want to use my Jacobian anyway, hoping for the petsc's secant method to approximate it. Does petsc have a secant method and does -snes_mf_operator option enables it? Or it only works as a preconditioner, requiring the Jacobian in any case? Thanks, Dominik
