ode demos fail with SIGSEGV
Issue #65
resolved
python petsc4py-master/demo/ode/orego.py
gives the following result:
Traceback (most recent call last):
File "petsc4py-master/demo/ode/orego.py", line 66, in <module>
ts.solve(x)
File "PETSc/TS.pyx", line 568, in petsc4py.PETSc.TS.solve (src/petsc4py.PETSc.c:183331)
petsc4py.PETSc.Error: error code 73
[0] TSSolve() line 3951 in /Users/travis/miniconda3/conda-bld/petsc_1489206134542/work/petsc-3.7.4/src/ts/interface/ts.c
[0] Object is in wrong state
[0] You must call TSSetExactFinalTime() or use -ts_exact_final_time <stepover,interpolate,matchstep> before calling TSSolve()
If instead I try python petsc4py-master/demo/ode/orego.py -ts_exact_final_time stepover
I get a SIGSEGV:
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[0]PETSC ERROR: to get more information on the crash.
application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=59
:
system msg for write_line failure : Bad file descriptor
ce.py
and rober.py
give similar results. Only heat.py
appears to run without error (but requires a -ts_exact_final_time
option to do so.
System config:
petsc4py * 3.7.0 py36_1 conda-forge
Python 3.6.0 :: Anaconda custom (x86_64)
MacOS 10.11.6, OS X El Capitan
Comments (6)
-
reporter -
-
reporter Those fixed rober.py and orego.py. ce.py is still broken. Same two problems (lack of setUp and setExactFinalTime calls).
-
Pushed a fix ac769fc. Please try again and confirm.
-
reporter Yup. That did it. Thanks.
-
reporter - changed status to resolved
- Log in to comment
The SEGV occurs on the first attempt to modify the Jacobian (for instance, line 25 in ce.py). It can be avoided by a setup call, for instance
J.setUp()
.