[petsc-users] SNES Shell Problems

Jed Brown jedbrown at mcs.anl.gov
Mon Aug 27 21:34:11 CDT 2012


On Mon, Aug 27, 2012 at 7:31 PM, Gaetan Kenway <kenway at utias.utoronto.ca>wrote:

> 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.
>

You can use -start_in_debugger, then type "c" (for "continue") at the gdb
prompt.


>
> The petsc4py is initialized with:
> import petsc4py
> petsc4py.init(args=sys.argv)
>
> so other options are passed in just fine.
>
> I ran it with valgrind and got the following:
>
> ==15046== Jump to the invalid address stated on the next line
> ==15046==    at 0x0: ???
> ==15046==    by 0x95EF008: SNESSolve_Shell (snesshell.c:169)
> ==15046==    by 0x95DB2E7: SNESSolve (snes.c:3536)
> ==15046==    by 0x9619546: SNESSolve_NGMRES (snesngmres.c:259)
> ==15046==    by 0x95DB2E7: SNESSolve (snes.c:3536)
> ==15046==    by 0x95A8E72: snessolve_ (zsnesf.c:181)
> ==15046==    by 0x9AEA302: nksolver2_ (NKSolver2.F90:20)
> ==15046==    by 0x9A6A077: solvestate_ (solveState.F90:485)
> ==15046==    by 0x9A6A6D1: solversteady_ (solverSteady.f90:27)
> ==15046==    by 0x99BB1C1: f2py_rout_sumb_solver (in
> /tmp/tmpGQGZda/sumb.so)
> ==15046==    by 0x99B6484: fortran_call (in /tmp/tmpGQGZda/sumb.so)
> ==15046==    by 0x805FD69: PyObject_Call (in /usr/bin/python2.6)
> ==15046==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
>

This looks like SNESShellSetSolve() did not work. Are you sure that the
type was set (e.g. SNESSetType() or SNESSetFromOptions()) before you called
SNESShellSetSolve()?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120827/231443c5/attachment.html>


More information about the petsc-users mailing list