SEGV in mpmath.findroot | Georgi Guninski | 10/1/12 7:19 AM | import mpmath
mpmath.mp.pretty=True mpmath.mp.dps=30 def F(x): return mpmath.zeta(x)+mpmath.zeta(x,derivative=1) r=mpmath.findroot(F,[0.1+mpmath.j],solver="muller") ==== Unhandled SIGSEGV: A segmentation fault occurred in Sage. This probably occurred because a *compiled* component of Sage has a bug in it and is not properly wrapped with sig_on(), sig_off(). You might want to run Sage under gdb with 'sage -gdb' to debug this. Sage will now terminate. ===== |

Re: [sage-support] SEGV in mpmath.findroot | D. S. McNeil | 10/1/12 7:36 AM | Hmm. My backtrace showed:
/home/mcneil/sagedev/sage-5.4.beta0/local/lib/libcsage.so(print_backtrace+0x3b)[0xb6bd7c49] /home/mcneil/sagedev/sage-5.4.beta0/local/lib/libcsage.so(sigdie+0x17)[0xb6bd7c89] /home/mcneil/sagedev/sage-5.4.beta0/local/lib/libcsage.so(sage_signal_handler+0x212)[0xb6bd778c] [0xb772c400] /home/mcneil/sagedev/sage-5.4.beta0/local/lib/libgmp.so.7(__gmpn_rshift+0x19c)[0xb6b897dc] and my standard Python version of mpmath, which I don't think is gmp-aware, produces /usr/local/lib/python2.7/dist-packages/mpmath/libmp/libelefun.pyc in exp_fixed(x, prec, ln2) 1410 return v << n 1411 else: -> 1412 return v >> (-n) 1413 1414 OverflowError: long int too large to convert to int Doug |

Re: [sage-support] SEGV in mpmath.findroot | Georgi Guninski | 10/1/12 7:58 AM | i get the same exception on standalone mpmath, don't know if it uses
gmp. |

Re: SEGV in mpmath.findroot | Fredrik Johansson | 10/2/12 2:50 AM | I have (hopefully) fixed the the crash in mpmath-git. You still have a problem with your code: the root finder doesn't seem to be converging, so the evaluation points ends up far out in the complex plane. If it doesn't crash, it's still fairly soon going to take extremely long time or run out of memory. I would add a line to F to raise an exception if x doesn't look sane. Fredrik |