#7794: PolynomialRing_integral_domain ignores Ctrl-C and segfaults
--------------------------+-------------------------------------------------
Reporter: SimonKing | Owner: AlexGhitza
Type: defect | Status: needs_work
Priority: critical | Milestone: sage-4.7.1
Component: algebra | Keywords: Polynomial Ring KeyboardInterrupt
Work_issues: | Upstream: N/A
Reviewer: Simon King | Author:
Merged: | Dependencies:
--------------------------+-------------------------------------------------
Comment(by SimonKing):
Since the problem seems to be related with get_cparent, I was first
looking into that. There was a bare "except:", where it should be catching
an attribute error. But that was not the problem.
Next, I looked into polynomial_template.pxi, where get_cparent is
frequently used. Too frequently, actually. In many methods it is called
several times. So, it would be better to assign its output to a cdef'd
variable -- that would actually boost the speed a lot!
Namely, working on other tickets, I know that the "harmless" method
`modulus()` takes the most time when doing arithmetic with polynomials
over finite fields. `modulus()` is called in get_cparent (actually, it is
called twice!), and get_cparent is called several times in both _pow_ and
_mul_ (as in polynomial_template.pxi).
So, one approach would be to remove the redundant calls - which makes
sense anyway. If that does not help with the segfault, one could still try
to wrap it into sig_on()/sig_off().
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7794#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.