libecm test failure in 4.2

8 views
Skip to first unread message

linuxgus

unread,
Oct 31, 2009, 2:35:55 PM10/31/09
to sage-support
Last night I updated to Sage 4.2 on my 64-bit openSuSE 11.1 with
2.6.28.2 kernel on a laptop with AMD Semptron, dual core.. Sage said
it updated successfully, but just for good measure, I ran a 'make
test' and went to sleep. Apparently, all the tests passed, except the
one(s) involving libecm (or does 'make test' crash and stop when it
encounters an error?). What does libecm do? Curiously, I did not see
any errors on a desktop at work, also running 64-bit openSuSE 11.1 but
with stock 2.6.27.whatever kernel on a dual-core Intel CPU.

For completeness, I am pasting the error output regarding libecm from
the log file. Thank you in advance for your time.


sage -t "devel/sage/sage/libs/libecm.pyx"
^[[?
1034h**********************************************************************
File "/usr/local/sage-3.3/devel/sage/sage/libs/libecm.pyx", line 14:
sage: import sage.libs.libecm
Exception raised:
Traceback (most recent call last):
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1231,
in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/usr/local/sage-3.3/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example,
filename, compileflags)
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1172,
in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_0[3]>", line 1, in <module>
from sage.libs.libecm import ecmfactor###line 15:
sage: from sage.libs.libecm import ecmfactor
ImportError: /usr/local/sage-3.3/local/lib/python/site-packages/
sage/libs/libecm.so: undefined symbol: __gmpn_add_nc
**********************************************************************
File "/usr/local/sage-3.3/devel/sage/sage/libs/libecm.pyx", line 16:
sage: result = ecmfactor(999, 0.00)
Exception raised:
Traceback (most recent call last):
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1231,
in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/usr/local/sage-3.3/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example,
filename, compileflags)
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1172,
in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_0[4]>", line 1, in <module>
result = ecmfactor(Integer(999), RealNumber('0.00'))###line
16:
sage: result = ecmfactor(999, 0.00)
NameError: name 'ecmfactor' is not defined
**********************************************************************
File "/usr/local/sage-3.3/devel/sage/sage/libs/libecm.pyx", line 17:
sage: result in [(True, 27), (True, 37), (True, 999)]
Exception raised:
Traceback (most recent call last):
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1231,
in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/usr/local/sage-3.3/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example,
filename, compileflags)
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1172,
in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_0[5]>", line 1, in <module>
result in [(True, Integer(27)), (True, Integer(37)), (True,
Integer(999))]###line 17:
sage: result in [(True, 27), (True, 37), (True, 999)]
NameError: name 'result' is not defined
**********************************************************************
File "/usr/local/sage-3.3/devel/sage/sage/libs/libecm.pyx", line 19:
sage: result = ecmfactor(999, 0.00, verbose=True)
Exception raised:
Traceback (most recent call last):
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1231,
in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/usr/local/sage-3.3/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example,
filename, compileflags)
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1172,
in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_0[6]>", line 1, in <module>
result = ecmfactor(Integer(999), RealNumber('0.00'),
verbose=True)###line 19:
sage: result = ecmfactor(999, 0.00, verbose=True)
NameError: name 'ecmfactor' is not defined
**********************************************************************
File "/usr/local/sage-3.3/devel/sage/sage/libs/libecm.pyx", line 22:
sage: result in [(True, 27), (True, 37), (True, 999)]
Exception raised:
Traceback (most recent call last):
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1231,
in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/usr/local/sage-3.3/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example,
filename, compileflags)
File "/usr/local/sage-3.3/local/bin/ncadoctest.py", line 1172,
in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_0[7]>", line 1, in <module>
result in [(True, Integer(27)), (True, Integer(37)), (True,
Integer(999))]###line 22:
sage: result in [(True, 27), (True, 37), (True, 999)]
NameError: name 'result' is not defined
**********************************************************************
1 items had failures:
6 of 8 in __main__.example_0
***Test Failed*** 6 failures.
For whitespace errors, see the file /root/.sage//
tmp/.doctest_libecm.py


William Stein

unread,
Oct 31, 2009, 2:45:55 PM10/31/09
to sage-s...@googlegroups.com
On Sat, Oct 31, 2009 at 11:35 AM, linuxgus <ka8...@amsat.org> wrote:
>
> Last night I updated to Sage 4.2 on my 64-bit openSuSE 11.1 with
> 2.6.28.2 kernel on a laptop with AMD Semptron, dual core..  Sage said
> it updated successfully, but just for good measure, I ran a 'make
> test' and went to sleep.  Apparently, all the tests passed, except the
> one(s) involving libecm (or does 'make test' crash and stop when it
> encounters an error?).

No, it runs all files no matter what. Each test of a file runs in a
separate subprocess, so crashes at most impact *one file*.

> What does libecm do?

It is specialized code used for factoring large integers. If you
don't know what it does, you probably never used it. If you're not
trying to crack cryptosystems or factor large integers, you probably
haven't used it.

http://ecm.gforge.inria.fr/
--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

linuxgus

unread,
Oct 31, 2009, 8:02:54 PM10/31/09
to sage-support
Thank you, William.

Just to correct myself (although it hardly matters), the AMD Semptron
at home is SINGLE core, not dual, as I erroneously stated in the
original posting.

Concerning inria.fr, isn't it the same institution that offers
scilab? Just curious.

Paul Zimmermann

unread,
Nov 1, 2009, 4:29:16 PM11/1/09
to sage-s...@googlegroups.com
Hi,

about the problem reported in
http://groups.google.com/group/sage-support/t/24944e5521b9e498?hl=en,
it seems the GMP function __gmpn_add_nc is not found:

> sage/libs/libecm.so: undefined symbol: __gmpn_add_nc

This function is used in the file mpmod.c from GMP-ECM:

#ifdef HAVE___GMPN_ADD_NC
cy = __gmpn_add_nc (rp, tp + n, xp + n, n,
(mp_limb_t) ((xp[n - 1] | tp[n - 1]) ? 1 : 0));
#else
cy = mpn_add_n (rp, tp + n, xp + n, n);
cy += mpn_add_1 (rp, rp, n, (mp_limb_t) ((xp[n - 1] | tp[n - 1]) ? 1 : 0));
#endif

It seems that the #ifdef HAVE___GMPN_ADD_NC did not work as expected,
or GMP-ECM was configured on a different system where __gmpn_add_nc
was available.

Paul Zimmermann

Reply all
Reply to author
Forward
0 new messages