#14151: Update GMP-ECM to 6.4.4
-------------------------------------+-------------------------------------
Reporter: zimmerma | Owner: tbd
Type: enhancement | Status: closed
Priority: major | Milestone: sage-5.10
Component: packages: | Resolution: fixed
standard | Merged in: sage-5.10.beta0
Keywords: spkg | Reviewers: François Bissey, Paul
Authors: Jeroen Demeyer | Zimmermann
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by fbissey):
May be we should take the conversation to a new ticket. Anyway first
victim:
{{{
File "/usr/lib64/python2.7/site-packages/sage/rings/integer.pyx", line
3500, in sage.rings.integer.Integer.?
Failed example:
n.factor(algorithm='ecm')
Exception raised:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
line 499, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
line 861, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.rings.integer.Integer.?[18]>", line 1, in
<module>
n.factor(algorithm='ecm')
File "sage/rings/integer.pyx", line 3584, in
sage.rings.integer.Integer.factor (/scratch2/portage/sci-
mathematics/sage-9999/work/sage-9999/src-
python2_7/build/cythonized/sage/rings/integer.c:23897)
res = [(p, 1) for p in ecm.factor(n, proof=proof)]
File "/usr/lib64/python2.7/site-packages/sage/interfaces/ecm.py",
line 651, in factor
n_factorization = self.find_factor(n)
File "/usr/lib64/python2.7/site-packages/sage/interfaces/ecm.py",
line 555, in find_factor
factors = self._find_factor(n, factor_digits, B1, **kwds)
File "/usr/lib64/python2.7/site-packages/sage/interfaces/ecm.py",
line 505, in _find_factor
out = self._run_ecm(cmd, n)
File "/usr/lib64/python2.7/site-packages/sage/interfaces/ecm.py",
line 214, in _run_ecm
raise ValueError(err)
ValueError: Unknown option: -cofdec
}}}
with corresponding offending code in `sage/interfaces/ecm.py`
{{{
def _find_factor(self, n, factor_digits, B1, **kwds):
"""
Helper for :meth:`find_factor`.
INPUT:
See :meth:`find_factor`.
OUTPUT:
List of pairs ``(integer, bool)`` consisting of factors of the
ECM input and whether they are probable prime. Note that ECM
is not a good primality test and there is a sizeable chance
that a "probable prime" is actually composite.
EXAMPLES::
sage: f = ECM()
sage: n = 508021860739623467191080372196682785441177798407961
sage: f._find_factor(n, None, 2000)
[(79792266297612017, True),
(6366805760909027985741435139224233, True)]
"""
n = self._validate(n)
kwds.setdefault('c', 1000000000)
kwds.setdefault('I', 1)
if factor_digits is not None:
B1 = self.recommended_B1(factor_digits)
kwds['one'] = True
kwds['cofdec'] = True
cmd = self._make_cmd(B1, None, kwds)
out = self._run_ecm(cmd, n)
return self._parse_output(n, out)
}}}
Also mentioned at line 143
{{{
- ``cofdec`` -- boolean. Force cofactor output in decimal
(even if expressions are used )
}}}
the doctest for `sage/interface/ecm.py` hangs:
{{{
sage -t --long /usr/lib64/python2.7/site-packages/sage/interfaces/ecm.py
Trying (line 207): ecm._run_ecm(['cat'], 1234)
Expecting:
'1234'
ok [0.01 s]
Trying (line 209): sig_on_count() # check sig_on/off pairings (virtual
doctest)
Expecting:
0
ok [0.00 s]
Trying (line 231): print(ecm(3)) # random output
Expecting:
GMP-ECM 6.4.4 [configured with MPIR 2.6.0, --enable-asm-redc] [ECM]
Input number is 3 (1 digits)
********** Factor found in step 1: 3
Found input number N
}}}
strangely `ps ux` reports that `ecm 10` is running not `ecm 3` as you
would expect.
--
Ticket URL: <http://trac.sagemath.org/ticket/14151#comment:46>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.