<div class="gmail_quote">On Mon, Aug 27, 2012 at 7:31 PM, Gaetan Kenway <span dir="ltr"><<a href="mailto:kenway@utias.utoronto.ca" target="_blank">kenway@utias.utoronto.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Unfortunately I can run backtraces since the code is running from python and the -on_error_attach_debugger option has no effect when you're running from python. </div></blockquote><div><br></div><div>You can use -start_in_debugger, then type "c" (for "continue") at the gdb prompt.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div><div>The petsc4py is initialized with:</div><div><div>import petsc4py</div><div>petsc4py.init(args=sys.argv)</div><div><br></div></div><div>so other options are passed in just fine. </div><div><br></div><div>
I ran it with valgrind and got the following:</div><div><div><br></div><div>==15046== Jump to the invalid address stated on the next line</div><div>==15046== at 0x0: ???</div><div>==15046== by 0x95EF008: SNESSolve_Shell (snesshell.c:169)</div>
<div>==15046== by 0x95DB2E7: SNESSolve (snes.c:3536)</div><div>==15046== by 0x9619546: SNESSolve_NGMRES (snesngmres.c:259)</div><div>==15046== by 0x95DB2E7: SNESSolve (snes.c:3536)</div><div>==15046== by 0x95A8E72: snessolve_ (zsnesf.c:181)</div>
<div>==15046== by 0x9AEA302: nksolver2_ (NKSolver2.F90:20)</div><div>==15046== by 0x9A6A077: solvestate_ (solveState.F90:485)</div><div>==15046== by 0x9A6A6D1: solversteady_ (solverSteady.f90:27)</div><div>==15046== by 0x99BB1C1: f2py_rout_sumb_solver (in /tmp/tmpGQGZda/sumb.so)</div>
<div>==15046== by 0x99B6484: fortran_call (in /tmp/tmpGQGZda/sumb.so)</div><div>==15046== by 0x805FD69: PyObject_Call (in /usr/bin/python2.6)</div><div>==15046== Address 0x0 is not stack'd, malloc'd or (recently) free'd</div>
</div></blockquote></div><br><div>This looks like SNESShellSetSolve() did not work. Are you sure that the type was set (e.g. SNESSetType() or SNESSetFromOptions()) before you called SNESShellSetSolve()?</div>