Opened 11 years ago

Last modified 8 years ago

#11705 closed enhancement

Port Sage to SUSE Linux Power 7 (ppc64). — at Version 93

Reported by: William Stein Owned by: David Kirkby
Priority: major Milestone: sage-6.4
Component: porting Keywords: sd32 sd35.5
Cc: Leif Leonhardy, Benjamin Jones, Paul Zimmermann, Mariah Lennox, Jean-Pierre Flori Merged in:
Authors: Paul Zimmermann, Jeroen Demeyer Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Jeroen Demeyer)

Port Sage so that it builds and passes its full test suite on the new IBM Power 7 architecture running SUSE Linux.

sage-5.0.beta13 builds on this machine, but there are many test failures.

Most of these failures are due to:

  • #12829: Remove <object> cast in real_mpfi.pyx

After applying that ticket, the remaining failures are:

        sage -t  --long -force_lib devel/sage/doc/en/numerical_sage/cvxopt.rst # 1 doctests failed
        sage -t  --long -force_lib devel/sage/sage/libs/libecm.pyx # Killed/crashed
        sage -t  --long -force_lib devel/sage/sage/numerical/optimize.py # 6 doctests failed
        sage -t  --long -force_lib devel/sage/sage/plot/plot3d/list_plot3d.py # 4 doctests failed
        sage -t  --long -force_lib devel/sage/sage/functions/special.py # 2 doctests failed

Change History (93)

comment:1 Changed 11 years ago by William Stein

Description: modified (diff)

comment:2 Changed 11 years ago by François Bissey

I am actually in the process of commissioning such hardware and suse will be on some nodes (Aix 6.1 on the other nodes).

comment:3 Changed 11 years ago by William Stein

Description: modified (diff)

comment:4 Changed 11 years ago by William Stein

fbissey -- do you want an account on skynet, so you can help us with porting to SUSE on a nice new "IBM Power 750 Express server" that we have?

comment:5 Changed 11 years ago by William Stein

This is the computer we have access to: http://www-03.ibm.com/systems/power/hardware/750/index.html

comment:6 Changed 11 years ago by Leif Leonhardy

Cc: Leif Leonhardy added

comment:7 Changed 11 years ago by François Bissey

We are getting 13 power755 locally but they'll go live at the end of September - I am currently installing a power720 that is meant to be a deployment server. Got a BlueGene?/L and BlueGene?/P as well but that would be another exercise :)

The big pity as far as I am concerned is that there is no Gentoo-prefix for linux-ppc otherwise I could have been up and running faster.

We currently have some power5 575 some of which are running suse 9 and that's awful, the latest gcc I have been able to compile is 4.2.4.

comment:8 Changed 11 years ago by François Bissey

I notice in the build logs that you have gcc-4.6.1 on that box. Is it a manual install of gcc?

comment:9 in reply to:  8 Changed 11 years ago by William Stein

Replying to fbissey:

I notice in the build logs that you have gcc-4.6.1 on that box. Is it a manual install of gcc?

Yes. Here is some info about the machine. If you want an account on it, send me an email and I can arrange it.

wstein@silius:~/silius/sage-4.7.1> cat /etc/issue

Welcome to SUSE Linux Enterprise Server 11 SP1  (ppc64) - Kernel \r (\l).


wstein@silius:~/silius/sage-4.7.1> uname -a
Linux silius 2.6.32.43-0.4-ppc64 #1 SMP 2011-07-14 14:47:44 +0200 ppc64 ppc64 ppc64 GNU/Linux
wstein@silius:~/silius/sage-4.7.1> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.1/ppc64-Linux-power7-suse/libexec/gcc/powerpc64-unknown-linux-gnu/4.6.1/lto-wrapper
Target: powerpc64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.6.1/src/gcc-4.6.1/configure --enable-languages=c,c++,fortran --with-gnu-as --with-gnu-as=/usr/local/binutils-2.21/ppc64-Linux-power7-suse-gcc-4.3.4-suse/bin/as --with-gnu-ld --with-ld=/usr/local/binutils-2.21/ppc64-Linux-power7-suse-gcc-4.3.4-suse/bin/ld --with-gmp=/usr/local/mpir-2.4.0/ppc64-Linux-power7-suse-gcc-4.3.4-suse --with-mpfr=/usr/local/mpfr-3.0.1/ppc64-Linux-power7-suse-mpir-2.4.0-gcc-4.3.4-suse --with-mpc=/usr/local/mpc-0.9/ppc64-Linux-power7-suse-mpir-2.4.0-mpfr-3.0.1-gcc-4.3.4-suse --prefix=/usr/local/gcc-4.6.1/ppc64-Linux-power7-suse
Thread model: posix
gcc version 4.6.1 (GCC) 

comment:11 Changed 11 years ago by Benjamin Jones

Cc: Benjamin Jones added

comment:12 Changed 11 years ago by William Stein

Keywords: sd32 added

comment:13 Changed 11 years ago by François Bissey

I was trying to find a way to run the install of maxima through gdb and I got this

fbissey@silius:~/sage-4.7.2.alpha2> ./sage -gdb
----------------------------------------------------------------------
| Sage Version 4.7.2.alpha2, Release Date: 2011-08-24                |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
**********************************************************************
*                                                                    *
* Warning: this is a prerelease version, and it may be unstable.     *
*                                                                    *
**********************************************************************
/home/fbissey/sage-4.7.2.alpha2/local/bin/sage-ipython
GNU gdb (GDB) SUSE (7.3-0.6.1)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ppc64-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/fbissey/sage-4.7.2.alpha2/local/bin/python...done.
Missing separate debuginfo for /lib64/ld64.so.1
Try: zypper install -C "debuginfo(build-id)=9ad9cc2ebe9a93396712a1da1902ce1791d7a01a"
Missing separate debuginfo for /lib64/power7/libpthread.so.0
Try: zypper install -C "debuginfo(build-id)=b5b6fe2d9c6386464baf451c855d26e32ac8e25f"
[Thread debugging using libthread_db enabled]
Missing separate debuginfo for /lib64/libdl.so.2
Try: zypper install -C "debuginfo(build-id)=0c5e22422f5abdea4081987ec9b7d276a7674246"
Missing separate debuginfo for /lib64/libutil.so.1
Try: zypper install -C "debuginfo(build-id)=d05c063f9c3e2eaf208254f15783e80352551d5d"
Missing separate debuginfo for /lib64/power7/libm.so.6
Try: zypper install -C "debuginfo(build-id)=0b0eca877c00501c95ef08f9f692405bfbfed207"
Missing separate debuginfo for /lib64/power7/libc.so.6
Try: zypper install -C "debuginfo(build-id)=68ff029e9f430bd7351521dab154f400b384ff30"
Python 2.6.4 (r264:75706, Sep 12 2011, 02:12:11) 
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Setting permissions of DOT_SAGE directory so only you can read and write it.
Detaching after fork from child process 59250.
Detaching after fork from child process 59251.
Missing separate debuginfo for /lib64/libcrypt.so.1
Try: zypper install -C "debuginfo(build-id)=5f55a2213c780d5f9d3ce2cd6a9ef1d4e63b8739"
Detaching after fork from child process 59253.
sage: install_package(maxima-5.25.1)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/home/fbissey/sage-4.7.2.alpha2/<ipython console> in <module>()

/home/fbissey/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/structure/element.so in sage.structure.element.Element.__getattr__ (sage/structure/element.c:2794)()

/home/fbissey/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/structure/parent.so in sage.structure.parent.getattr_from_other_class (sage/structure/parent.c:2940)()

/home/fbissey/sage-4.7.2.alpha2/local/lib/python2.6/site-packages/sage/structure/parent.so in sage.structure.parent.raise_attribute_error (sage/structure/parent.c:2709)()

AttributeError: 'sage.rings.real_mpfr.RealLiteral' object has no attribute 'gen'

I have created a spkg with the latest maxima in case that would make a difference but unsurprisingly it doesn't.

comment:14 Changed 11 years ago by François Bissey

Benjamin posted a test log in #11708, let's analyse it:

sage -t  -long -force_lib devel/sage/doc/en/numerical_sage/cvxopt.rst
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/doc/en/numerical_sage/cvxopt.rst", line 129:
    sage: print sol['x']      # ... below since can get -00 or +00 depending on architecture
Expected:
    [ 1.00e...00]
    [ 1.00e+00]
Got:
    [ 9.85e-01]
    [ 9.91e-01]
    <BLANKLINE>
**********************************************************************

Rather large numerical noise and some formatting noise which is more curious.

There are multiples instances of these errors in that test:

sage -t  -long -force_lib devel/sage/doc/en/bordeaux_2008/elliptic_curves.rst
  ***   Warning: new stack size = 1098912 (1.048 Mbytes).
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/doc/en/bordeaux_2008/elliptic_curves.rst", line 299:
    sage: E.integral_points(both_signs=True)   # about a minute
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_10[3]>", line 1, in <module>
        E.integral_points(both_signs=True)   # about a minute###line 299:
    sage: E.integral_points(both_signs=True)   # about a minute
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 5452, in integral_points
        w1, w2 = self.period_lattice().basis()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 2861, in period_lattice
        self._period_lattice = PeriodLattice_ell(self)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/period_lattice.py", line 231, in __init__
        self._ei = self.f2.roots(AA,multiplicities=False)
      File "polynomial_element.pyx", line 4850, in sage.rings.polynomial.polynomial_element.Polynomial.roots (sage/rings/polynomial/polynomial_element.c:31255)
      File "real_roots.pyx", line 4115, in sage.rings.polynomial.real_roots.real_roots (sage/rings/polynomial/real_roots.c:36162)
      File "real_mpfi.pyx", line 277, in sage.rings.real_mpfi.RealIntervalField (sage/rings/real_mpfi.c:2982)
      File "real_mpfi.pyx", line 441, in sage.rings.real_mpfi.RealIntervalField_class.__init__ (sage/rings/real_mpfi.c:3124)
    OverflowError: value too large to convert to int
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/doc/en/bordeaux_2008/elliptic_curves.rst", line 177:
    sage: L = E.padic_lseries(5)
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_4[3]>", line 1, in <module>
        L = E.padic_lseries(Integer(5))###line 177:
    sage: L = E.padic_lseries(5)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/padics.py", line 159, in padic_lseries
        normalize = normalize, use_eclib=use_eclib)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/padic_lseries.py", line 199, in __init__
        self._modular_symbol = E.modular_symbol(sign=+1, use_eclib = use_eclib, normalize=normalize)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 1243, in modular_symbol
        M = ell_modular_symbols.ModularSymbolSage(self, sign, normalize=normalize)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_modular_symbols.py", line 629, in __init__
        self._find_scaling_L_ratio()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_modular_symbols.py", line 310, in _find_scaling_L_ratio
        l1 = self.__lalg__(D)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_modular_symbols.py", line 362, in __lalg__
        lv = ED.lseries().L_ratio() # this is L(ED,1) divided by the Neron period omD of ED
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/lseries_ell.py", line 686, in L_ratio
        omega = self.__E.period_lattice().basis()[0]
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 2861, in period_lattice
        self._period_lattice = PeriodLattice_ell(self)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/period_lattice.py", line 231, in __init__
        self._ei = self.f2.roots(AA,multiplicities=False)
      File "polynomial_element.pyx", line 4850, in sage.rings.polynomial.polynomial_element.Polynomial.roots (sage/rings/polynomial/polynomial_element.c:31255)
      File "real_roots.pyx", line 4141, in sage.rings.polynomial.real_roots.real_roots (sage/rings/polynomial/real_roots.c:36556)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/rings/qqbar.py", line 761, in polynomial_root
        return AlgebraicReal(ANRoot(poly, interval, multiplicity))
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/rings/qqbar.py", line 4417, in __init__
        self._interval = self.refine_interval(interval, 64)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/rings/qqbar.py", line 4528, in refine_interval
        return self._real_refine_interval(interval, prec)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/rings/qqbar.py", line 4621, in _real_refine_interval
        raise ValueError, "Refining interval that does not bound unique root!"
    ValueError: Refining interval that does not bound unique root!
**********************************************************************

Two potentially separate issues in mpfi and qqbar.py

sage -t  -long -force_lib devel/sage/sage/structure/sage_object.pyx
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/structure/sage_object.pyx", line 1103:
    sage: sage.structure.sage_object.unpickle_all()  # (4s on sage.math, 2011)
Expected:
    Successfully unpickled ... objects.
    Failed to unpickle 0 objects.
Got:
     * unpickle failure: load('/home/bjones/.sage/temp/silius/20398/dir_2/pickle_jar/_class__sage_coding_linear_code_LinearCode__.sobj')
     * unpickle failure: load('/home/bjones/.sage/temp/silius/20398/dir_2/pickle_jar/_class__sage_crypto_mq_sr_SR_gf2__.sobj')
     * unpickle failure: load('/home/bjones/.sage/temp/silius/20398/dir_2/pickle_jar/_class__sage_homology_chain_complex_ChainComplex__.sobj')
     * unpickle failure: load('/home/bjones/.sage/temp/silius/20398/dir_2/pickle_jar/_type__sage_coding_binary_code_BinaryCode__.sobj')
     * unpickle failure: load('/home/bjones/.sage/temp/silius/20398/dir_2/pickle_jar/_type__sage_matrix_matrix_mod2_dense_Matrix_mod2_dense__.sobj')
    Failed:
    _class__sage_coding_linear_code_LinearCode__.sobj
    _class__sage_crypto_mq_sr_SR_gf2__.sobj
    _class__sage_homology_chain_complex_ChainComplex__.sobj
    _type__sage_coding_binary_code_BinaryCode__.sobj
    _type__sage_matrix_matrix_mod2_dense_Matrix_mod2_dense__.sobj
    Successfully unpickled 582 objects.
    Failed to unpickle 5 objects.
**********************************************************************
1 items had failures:
   1 of   7 in __main__.example_25
***Test Failed*** 1 failures.

picklejar failure should be checked against the same error on arm. Possibly a deeper python problem.

sage -t  -long -force_lib devel/sage/sage/structure/parent.pyx
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/structure/parent.pyx", line 1783:
    sage: K.coerce_embedding()
Expected:
    Generic morphism:
      From: Number Field in a with defining polynomial x^3 + x^2 + 1
      To:   Real Lazy Field
      Defn: a -> -1.465571231876768?
Got:
    Generic morphism:
      From: Number Field in a with defining polynomial x^3 + x^2 + 1
      To:   Real Lazy Field
      Defn: a -> 0
**********************************************************************
1 items had failures:
   1 of   7 in __main__.example_39
***Test Failed*** 1 failures.

That's more than large numerical noise, that has to be wrong.

sage -t  -long -force_lib devel/sage/sage/matrix/matrix_double_dense.pyx
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/matrix/matrix_double_dense.pyx", line 1766:
    sage: Q
Expected:
    [ -0.359210604054   0.569326179705   0.368048420509   0.641385845805]
    [  0.179605302027  -0.144590775798   0.925041158846  -0.301884576418]
    [  0.179605302027  -0.704880032016  0.0774617736597   0.681825307224]
    [  0.898026510134   0.397624633445 -0.0532812182975   0.180566192161]
Got:
    [ -0.359210604054   0.569326179705   0.146859067236   0.724753652911]
    [  0.179605302027  -0.144590775798   0.973039543327 0.00543048428303]
    [  0.179605302027  -0.704880032016  -0.141642164231   0.671433967908]
    [  0.898026510134   0.397624633445  -0.107535848925   0.154528570726]
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/matrix/matrix_double_dense.pyx", line 1771:
    sage: R
Expected:
    [    -5.56776436283       2.6940795304      -2.6940795304]
    [                 0     -3.56958477752      3.56958477752]
    [                 0                  0 -9.93013661299e-16]
    [                 0                  0                  0]
Got:
    [   -5.56776436283      2.6940795304     -2.6940795304]
    [                0    -3.56958477752     3.56958477752]
    [                0                 0 9.81879219451e-16]
    [                0                 0                 0]
**********************************************************************
1 items had failures:
   2 of  40 in __main__.example_31
***Test Failed*** 2 failures.

Some numerical noise but something else is badly wrong in the first one.

sage -t  -long -force_lib devel/sage/sage/matrix/matrix2.pyx
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/matrix/matrix2.pyx", line 7722:
    sage: M.round(10)
Expected:
    [-2.4494897428           0.0           0.0]
    [-3.6742346142  0.7071067812           0.0]
    [-4.8989794856  1.4142135624           0.0]
Got:
    [-2.4494897428           0.0           0.0]
    [-3.6742346142  0.7071067812           0.0]
    [-4.8989794856  1.4142135624          -0.0]
**********************************************************************
1 items had failures:

That one is not that worrying, I just wish we could easily deal with 0.0 sign flipping.

sage -t  -long -force_lib devel/sage/sage/numerical/optimize.py
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/numerical/optimize.py", line 469:
    sage: sol['x']
Expected:
    (0.999..., 1.000...)
Got nothing
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/numerical/optimize.py", line 479:
    sage: sol['x']
Expected:
    (45.000000..., 6.2499999...3, 1.00000000...)
Got nothing
GLPK Simplex Optimizer, v4.44
6 rows, 3 columns, 8 non-zeros
Preprocessing...
2 rows, 2 columns, 4 non-zeros
Scaling...
 A: min|aij| =  2.400e+01  max|aij| =  5.000e+01  ratio =  2.083e+00
GM: min|aij| =  8.128e-01  max|aij| =  1.230e+00  ratio =  1.514e+00
EQ: min|aij| =  6.606e-01  max|aij| =  1.000e+00  ratio =  1.514e+00
Constructing initial basis...
Size of triangular part = 2
*     0: obj =  -5.100000000e+01  infeas =  0.000e+00 (0)
*     1: obj =  -5.225000000e+01  infeas =  0.000e+00 (0)
OPTIMAL SOLUTION FOUND
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/numerical/optimize.py", line 564:
    sage: find_fit(data, model)
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_7[5]>", line 1, in <module>
        find_fit(data, model)###line 564:
    sage: find_fit(data, model)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/numerical/optimize.py", line 655, in find_fit
        estimated_params, d = leastsq(error_function, initial_guess, args = (x_data, y_data))
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/scipy/optimize/minpack.py", line 324, in leastsq
        raise errors[info][1](errors[info][0])
    TypeError: Improper input parameters.
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/numerical/optimize.py", line 570:
    sage: fit = find_fit(data, f, parameters = [a, b, c], variables = [x], solution_dict = True)
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_7[7]>", line 1, in <module>
        fit = find_fit(data, f, parameters = [a, b, c], variables = [x], solution_dict = True)###line 570:
    sage: fit = find_fit(data, f, parameters = [a, b, c], variables = [x], solution_dict = True)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/numerical/optimize.py", line 655, in find_fit
        estimated_params, d = leastsq(error_function, initial_guess, args = (x_data, y_data))
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/scipy/optimize/minpack.py", line 324, in leastsq
        raise errors[info][1](errors[info][0])
    TypeError: Improper input parameters.
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/numerical/optimize.py", line 571:
    sage: fit[a], fit[b], fit[c]
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_7[8]>", line 1, in <module>
        fit[a], fit[b], fit[c]###line 571:
    sage: fit[a], fit[b], fit[c]
    NameError: name 'fit' is not defined
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/numerical/optimize.py", line 577:
    sage: find_fit(dataprime, a * x * log(b * x), parameters = [a, b], variables = [x])
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_7[10]>", line 1, in <module>
        find_fit(dataprime, a * x * log(b * x), parameters = [a, b], variables = [x])###line 577:
    sage: find_fit(dataprime, a * x * log(b * x), parameters = [a, b], variables = [x])
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/numerical/optimize.py", line 655, in find_fit
        estimated_params, d = leastsq(error_function, initial_guess, args = (x_data, y_data))
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/scipy/optimize/minpack.py", line 324, in leastsq
        raise errors[info][1](errors[info][0])
    TypeError: Improper input parameters.
**********************************************************************
2 items had failures:

That looks bad we obviously have stuff wrong in scipy.

sage -t  -long -force_lib devel/sage/sage/ext/fast_callable.pyx
get_str.c:149: MPFR assertion failed: size_s1 >= m
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/ext/fast_callable.pyx", line 1445:
    sage: square(RIF(-1, 1)).str(style='brackets')
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_50[7]>", line 1, in <module>
        square(RIF(-Integer(1), Integer(1))).str(style='brackets')###line 1445:
    sage: square(RIF(-1, 1)).str(style='brackets')
      File "real_mpfi.pyx", line 1425, in sage.rings.real_mpfi.RealIntervalFieldElement.str (sage/rings/real_mpfi.c:8979)
      File "real_mpfr.pyx", line 1618, in sage.rings.real_mpfr.RealNumber.str (sage/rings/real_mpfr.c:11037)
    RuntimeError: Aborted
**********************************************************************
1 items had failures:

Something miscompiled in mpfr?

sage -t  -long -force_lib devel/sage/sage/categories/pushout.py
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.RuntimeError'> ignored
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/categories/pushout.py", line 2421:
    sage: F2(QQ).coerce_embedding()
Expected:
    Generic morphism:
      From: Number Field in a with defining polynomial x^3 - x^2 + 1
      To:   Real Lazy Field
      Defn: a -> -0.7548776662466928?
Got:
    Generic morphism:
      From: Number Field in a with defining polynomial x^3 - x^2 + 1
      To:   Real Lazy Field
      Defn: a -> 0
**********************************************************************

And we have a repeat of errors from qqbar.py in that test too.

sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/period_lattice.py

more qqbar.py failuresalong with mpfr/mpfi like in elliptic_curves.rst and some wrong results:

File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/schemes/elliptic_curves/period_lattice.py", line 854:
    sage: L.basis_matrix()
Expected:
    [ 2.49021256085505 0.000000000000000]
    [0.000000000000000  1.97173770155165]
Got:
    [ 1.26920930427955 0.000000000000000]
    [0.634604652139777  1.45881661693850]
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/schemes/elliptic_curves/period_lattice.py", line 857:
    sage: L.basis_matrix(normalised=True)
Expected:
    [ 2.49021256085505 0.000000000000000]
    [0.000000000000000 -1.97173770155165]
Got:
    [0.634604652139777 -1.45881661693850]
    [-1.26920930427955 0.000000000000000]
**********************************************************************
sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/schemes/elliptic_curves/descent_two_isogeny.pyx", line 1147:
    sage: E.sha().an()
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_18[28]>", line 1, in <module>
        E.sha().an()###line 1147:
    sage: E.sha().an()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/sha_tate.py", line 392, in an
        L1_over_omega = E.lseries().L_ratio()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/lseries_ell.py", line 686, in L_ratio
        omega = self.__E.period_lattice().basis()[0]
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 2861, in period_lattice
        self._period_lattice = PeriodLattice_ell(self)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/period_lattice.py", line 231, in __init__
        self._ei = self.f2.roots(AA,multiplicities=False)
      File "polynomial_element.pyx", line 4850, in sage.rings.polynomial.polynomial_element.Polynomial.roots (sage/rings/polynomial/polynomial_element.c:31255)
      File "real_roots.pyx", line 4115, in sage.rings.polynomial.real_roots.real_roots (sage/rings/polynomial/real_roots.c:36162)
      File "real_mpfi.pyx", line 277, in sage.rings.real_mpfi.RealIntervalField (sage/rings/real_mpfi.c:2982)
      File "real_mpfi.pyx", line 441, in sage.rings.real_mpfi.RealIntervalField_class.__init__ (sage/rings/real_mpfi.c:3124)
    OverflowError: value too large to convert to int
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/schemes/elliptic_curves/descent_two_isogeny.pyx", line 1147:
    sage: E.sha().an()
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_18[28]>", line 1, in <module>
        E.sha().an()###line 1147:
    sage: E.sha().an()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/sha_tate.py", line 392, in an
        L1_over_omega = E.lseries().L_ratio()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/lseries_ell.py", line 686, in L_ratio
        omega = self.__E.period_lattice().basis()[0]
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 2861, in period_lattice
        self._period_lattice = PeriodLattice_ell(self)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/period_lattice.py", line 231, in __init__
        self._ei = self.f2.roots(AA,multiplicities=False)
      File "polynomial_element.pyx", line 4850, in sage.rings.polynomial.polynomial_element.Polynomial.roots (sage/rings/polynomial/polynomial_element.c:31255)
      File "real_roots.pyx", line 4115, in sage.rings.polynomial.real_roots.real_roots (sage/rings/polynomial/real_roots.c:36162)
      File "real_mpfi.pyx", line 277, in sage.rings.real_mpfi.RealIntervalField (sage/rings/real_mpfi.c:2982)
      File "real_mpfi.pyx", line 441, in sage.rings.real_mpfi.RealIntervalField_class.__init__ (sage/rings/real_mpfi.c:3124)
    OverflowError: value too large to convert to int
**********************************************************************

again and again in that one

sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/padics.py

There are other errors in that last one but I think they are consequences of previous failures.

Same error in

sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/ell_modular_symbols.py

again some other errors that are probably consequences of this particular failure. We get some qqbar.py errors too in that one.

sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/lseries_ell.py
  ***   Warning: new stack size = 1001728 (0.955 Mbytes).
  ***   Warning: new stack size = 1002624 (0.956 Mbytes).
  ***   Warning: new stack size = 1010736 (0.964 Mbytes).
  ***   Warning: new stack size = 1114144 (1.063 Mbytes).
**********************************************************************
sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/ell_point.py
sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/modular_parametrization.py
sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/BSD.py
sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/padic_lseries.py
sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/heegner.py
sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/sha_tate.py
sage -t  -long -force_lib devel/sage/sage/rings/real_lazy.pyx
sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py
sage -t  -long -force_lib devel/sage/sage/rings/qqbar.py <- what a surprise (got MPFR assertion errors too)
sage -t  -long -force_lib devel/sage/sage/rings/number_field/totallyreal_rel.py
sage -t  -long -force_lib devel/sage/sage/rings/number_field/number_field_morphisms.pyx
sage -t  -long -force_lib devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py
sage -t  -long -force_lib devel/sage/sage/rings/polynomial/real_roots.pyx
get_str.c:149: MPFR assertion failed: size_s1 >= m
get_str.c:149: MPFR assertion failed: size_s1 >= m

some more of the same with qqbar.py and mpfi/mpfr.

sage -t  -long -force_lib devel/sage/sage/rings/real_interval_absolute.pyx
get_str.c:149: MPFR assertion failed: size_s1 >= m
get_str.c:149: MPFR assertion failed: size_s1 >= m
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/rings/real_interval_absolute.pyx", line 237:
    sage: R(1)
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_12[4]>", line 1, in <module>
        R(Integer(1))###line 237:
    sage: R(1)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/misc/displayhook.py", line 174, in displayhook
        print_obj(sys.stdout, obj)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/misc/displayhook.py", line 142, in print_obj
        print >>out_stream, `obj`
      File "sage_object.pyx", line 154, in sage.structure.sage_object.SageObject.__repr__ (sage/structure/sage_object.c:1463)
      File "real_interval_absolute.pyx", line 434, in sage.rings.real_interval_absolute.RealIntervalAbsoluteElement._repr_ (sage/rings/real_interval_absolute.c:4989)
        return repr(self._real_mpfi_(RealIntervalField(prec)))
      File "real_mpfi.pyx", line 1109, in sage.rings.real_mpfi.RealIntervalFieldElement.__repr__ (sage/rings/real_mpfi.c:7925)
        return self.str(10)
      File "real_mpfi.pyx", line 1434, in sage.rings.real_mpfi.RealIntervalFieldElement.str (sage/rings/real_mpfi.c:9075)
        return self._str_question_style(base, error_digits, e, prefer_sci)
      File "real_mpfi.pyx", line 1650, in sage.rings.real_mpfi.RealIntervalFieldElement._str_question_style (sage/rings/real_mpfi.c:9520)
        sig_on()
    RuntimeError: Aborted
get_str.c:149: MPFR assertion failed: size_s1 >= m

mpfr troubles with one backtrace

File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/rings/real_interval_absolute.pyx", line 915:
    sage: R(10)^-10
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_39[7]>", line 1, in <module>
        R(Integer(10))**-Integer(10)###line 915:
    sage: R(10)^-10
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/misc/displayhook.py", line 174, in displayhook
        print_obj(sys.stdout, obj)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/misc/displayhook.py", line 142, in print_obj
        print >>out_stream, `obj`
      File "sage_object.pyx", line 154, in sage.structure.sage_object.SageObject.__repr__ (sage/structure/sage_object.c:1463)
      File "real_interval_absolute.pyx", line 434, in sage.rings.real_interval_absolute.RealIntervalAbsoluteElement._repr_ (sage/rings/real_interval_absolute.c:4989)
        return repr(self._real_mpfi_(RealIntervalField(prec)))
      File "real_mpfi.pyx", line 1109, in sage.rings.real_mpfi.RealIntervalFieldElement.__repr__ (sage/rings/real_mpfi.c:7925)
        return self.str(10)
      File "real_mpfi.pyx", line 1434, in sage.rings.real_mpfi.RealIntervalFieldElement.str (sage/rings/real_mpfi.c:9075)
        return self._str_question_style(base, error_digits, e, prefer_sci)
      File "real_mpfi.pyx", line 1650, in sage.rings.real_mpfi.RealIntervalFieldElement._str_question_style (sage/rings/real_mpfi.c:9520)
        sig_on()
    RuntimeError: Aborted
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libcsage.so(print_backtrace-0x1cf7c)[0x40000a4e49c]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libcsage.so(sigdie-0x1cf24)[0x40000a4e50c]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libcsage.so(sage_signal_handler-0x1d600)[0x40000a4dd88]
[0x40000040418]
[0xfffcd8e00f0]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libpython2.6.so.1.0(PyString_FromString-0x1346dc)[0x40000132594]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libpython2.6.so.1.0(PyErr_SetString-0xbeac8)[0x400001aced0]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libcsage.so(sage_signal_handler-0x1d6c0)[0x40000a4dcc8]
[0x40000040418]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libgmp.so.3(__gmpz_get_str-0x62970)[0x400013b3cf0]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libgmp.so.3(__gmpq_get_str-0x55e8c)[0x400013c111c]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/rings/rational.so(+0x2156c)[0x40003b8156c]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libpython2.6.so.1.0(PyCFunction_Call-0x1459b8)[0x4000011fc80]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/libpython2.6.so.1.0(PyObject_Call-0x18cd08)[0x400000d3590]
/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/rings/rational.so(+0x133cc)[0x40003b733cc]

Also

sage -t  -long -force_lib devel/sage/sage/rings/complex_interval.pyx
get_str.c:149: MPFR assertion failed: size_s1 >= m
get_str.c:149: MPFR assertion failed: size_s1 >= m
sage -t  -long -force_lib devel/sage/sage/rings/real_mpfi.pyx
get_str.c:149: MPFR assertion failed: size_s1 >= m
get_str.c:149: MPFR assertion failed: size_s1 >= m (and a bunch of other errors)
sage -t  -long -force_lib devel/sage/sage/misc/functional.py
#0: simplify_sum(expr='sum(q^k,k,0,inf))
#1: simplify_sum(expr=a*'sum(q^k,k,0,inf))
get_str.c:149: MPFR assertion failed: size_s1 >= m
sage -t  -long -force_lib devel/sage/sage/rings/polynomial/real_roots.pyx
get_str.c:149: MPFR assertion failed: size_s1 >= m
get_str.c:149: MPFR assertion failed: size_s1 >= m
sage -t  -long -force_lib devel/sage/sage/lfunctions/sympow.py
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/lfunctions/sympow.py", line 213:
    sage: sympow.modular_degree(EllipticCurve('11a'))
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_6[2]>", line 1, in <module>
        sympow.modular_degree(EllipticCurve('11a'))###line 213:
    sage: sympow.modular_degree(EllipticCurve('11a'))
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/lfunctions/sympow.py", line 229, in modular_degree
        raise RuntimeError, "failed to compute modular degree"
    RuntimeError: failed to compute modular degree

sympow...

sage -t  -long -force_lib devel/sage/sage/interfaces/qepcad.py
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/interfaces/qepcad.py", line 2045:
    sage: x = _eval_qepcad_algebraic('the unique root of 8 x^2 - 8 x - 29 between -47/32 and -1503/1024'); x
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_52[3]>", line 1, in <module>
        x = _eval_qepcad_algebraic('the unique root of 8 x^2 - 8 x - 29 between -47/32 and -1503/1024'); x###line 2045:
    sage: x = _eval_qepcad_algebraic('the unique root of 8 x^2 - 8 x - 29 between -47/32 and -1503/1024'); x
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/interfaces/qepcad.py", line 2069, in _eval_qepcad_algebraic
        raise ValueError, "%s or %s not an exact floating-point number"%(lbound, ubound)
    ValueError: -47/32 or -1503/1024 not an exact floating-point number
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/interfaces/qepcad.py", line 2047:
    sage: 8*x^2 - 8*x - 29 == 0
Expected:
    True
Got:
    8*x^2 - 8*x - 29 == 0
**********************************************************************
sage -t  -long -force_lib devel/sage/sage/rings/number_field/number_field_rel.py
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/rings/number_field/number_field_rel.py", line 1876:
    sage: L.places()
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_54[3]>", line 1, in <module>
        L.places()###line 1876:
    sage: L.places()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/rings/number_field/number_field_rel.py", line 1899, in places
        pl = L.places(all_complex, prec)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/rings/number_field/number_field.py", line 6226, in places
        real_intervals = [ x[0] for x in self.defining_polynomial().roots(R) ]
      File "polynomial_element.pyx", line 4853, in sage.rings.polynomial.polynomial_element.Polynomial.roots (sage/rings/polynomial/polynomial_element.c:31307)
      File "real_roots.pyx", line 4115, in sage.rings.polynomial.real_roots.real_roots (sage/rings/polynomial/real_roots.c:36162)
      File "real_mpfi.pyx", line 277, in sage.rings.real_mpfi.RealIntervalField (sage/rings/real_mpfi.c:2982)
      File "real_mpfi.pyx", line 441, in sage.rings.real_mpfi.RealIntervalField_class.__init__ (sage/rings/real_mpfi.c:3124)
    OverflowError: value too large to convert to int
**********************************************************************
1 items had failures:
sage -t  -long -force_lib devel/sage/sage/plot/plot3d/list_plot3d.py
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/plot/plot3d/list_plot3d.py", line 102:
    sage: list_plot3d(m, texture='yellow', interpolation_type='spline',frame_aspect_ratio=[1,1,1/3])
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_1[9]>", line 1, in <module>
        list_plot3d(m, texture='yellow', interpolation_type='spline',frame_aspect_ratio=[Integer(1),Integer(1),Integer(1)/Integer(3)])###line 102:
    sage: list_plot3d(m, texture='yellow', interpolation_type='spline',frame_aspect_ratio=[1,1,1/3])
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/plot/plot3d/list_plot3d.py", line 172, in list_plot3d
        return list_plot3d_tuples(l,interpolation_type,texture,**kwds)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/plot/plot3d/list_plot3d.py", line 316, in list_plot3d_tuples
        s=interpolate.bisplrep(x,y,z,[int(1)]*len(x),xmin,xmax,ymin,ymax,kx=kx,ky=ky,s=s)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/scipy/interpolate/fitpack.py", line 873, in bisplrep
        tx,ty,nxest,nyest,wrk,lwrk1,lwrk2)
    ValueError: negative dimensions are not allowed
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/plot/plot3d/list_plot3d.py", line 109:
    sage: list_plot3d(m, texture='yellow', interpolation_type='spline', degree=5, frame_aspect_ratio=[1,1,1/3])
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_1[10]>", line 1, in <module>
        list_plot3d(m, texture='yellow', interpolation_type='spline', degree=Integer(5), frame_aspect_ratio=[Integer(1),Integer(1),Integer(1)/Integer(3)])###line 109:
    sage: list_plot3d(m, texture='yellow', interpolation_type='spline', degree=5, frame_aspect_ratio=[1,1,1/3])
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/plot/plot3d/list_plot3d.py", line 172, in list_plot3d
        return list_plot3d_tuples(l,interpolation_type,texture,**kwds)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/plot/plot3d/list_plot3d.py", line 316, in list_plot3d_tuples
        s=interpolate.bisplrep(x,y,z,[int(1)]*len(x),xmin,xmax,ymin,ymax,kx=kx,ky=ky,s=s)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/scipy/interpolate/fitpack.py", line 873, in bisplrep
        tx,ty,nxest,nyest,wrk,lwrk1,lwrk2)
    ValueError: negative dimensions are not allowed
**********************************************************************
1 items had failures:
   2 of  26 in __main__.example_1
sage -t  -long -force_lib devel/sage/sage/modular/abvar/abvar.py
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/modular/abvar/abvar.py", line 3305:
    sage: E.modular_degree()
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_84[8]>", line 1, in <module>
        E.modular_degree()###line 3305:
    sage: E.modular_degree()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 3201, in modular_degree
        m = sympow.modular_degree(self)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/lfunctions/sympow.py", line 229, in modular_degree
        raise RuntimeError, "failed to compute modular degree"
    RuntimeError: failed to compute modular degree
**********************************************************************
1 items had failures:
sage -t  -long -force_lib devel/sage/sage/modular/hecke/submodule.py
**********************************************************************
File "/tmp/bjones/sage-4.7.2.alpha2/devel/sage-main/sage/modular/hecke/submodule.py", line 511:
    sage: EllipticCurve('128a').congruence_number()
Exception raised:
    Traceback (most recent call last):
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_17[19]>", line 1, in <module>
        EllipticCurve('128a').congruence_number()###line 511:
    sage: EllipticCurve('128a').congruence_number()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 3294, in congruence_number
        m = self.modular_degree()
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 3201, in modular_degree
        m = sympow.modular_degree(self)
      File "/tmp/bjones/sage-4.7.2.alpha2/local/lib/python/site-packages/sage/lfunctions/sympow.py", line 229, in modular_degree
        raise RuntimeError, "failed to compute modular degree"
    RuntimeError: failed to compute modular degree
**********************************************************************
1 items had failures:
   1 of  21 in __main__.example_17

come from sympow

So big trouble coming from mpfr or possibly mpir underneath. Once we isolate that most of these will disapear.

comment:15 Changed 11 years ago by John Palmieri

With the new mpir spkg from #11964, Sage builds for me on silius, using gcc 4.6.2. I get a lot of test failures, though: I think that many of these are as reported before. See the log for full details.

comment:16 Changed 11 years ago by François Bissey

I was hoping the mpir upgrade would deal with some of these. I'd like to try a vanilla compiler from SLES (gfortran is on a separate SDK DVD I discovered).

comment:17 in reply to:  15 Changed 11 years ago by Leif Leonhardy

Replying to jhpalmieri:

With the new mpir spkg from #11964, Sage builds for me on silius, using gcc 4.6.2. I get a lot of test failures, though: I think that many of these are as reported before. See the log for full details.

The following tests failed:

	sage -t  -long -force_lib devel/sagenb-main/sagenb/interfaces/status.py # File not found
	sage -t  -long -force_lib devel/sage/doc/en/numerical_sage/cvxopt.rst # 1 doctests failed
	sage -t  -long -force_lib devel/sage/doc/en/bordeaux_2008/elliptic_curves.rst # 10 doctests failed
	sage -t  -long -force_lib devel/sage/sage/modular/hecke/submodule.py # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/modular/abvar/abvar.py # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/numerical/optimize.py # 6 doctests failed
	sage -t  -long -force_lib devel/sage/sage/misc/functional.py # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/libs/libecm.pyx # Killed/crashed
	sage -t  -long -force_lib devel/sage/sage/categories/pushout.py # 8 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/qqbar.py # 119 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/real_interval_absolute.pyx # 53 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/complex_interval.pyx # 22 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/real_lazy.pyx # 3 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/number_field/totallyreal_rel.py # 8 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/number_field/number_field_morphisms.pyx # 2 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/number_field/number_field_rel.py # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/misc/randstate.pyx # Time out
	sage -t  -long -force_lib devel/sage/sage/rings/polynomial/real_roots.pyx # 23 doctests failed
	sage -t  -long -force_lib devel/sage/sage/structure/parent.pyx # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/real_mpfi.pyx # Time out
	sage -t  -long -force_lib devel/sage/sage/structure/sage_object.pyx # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/lfunctions/sympow.py # 13 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/number_field/number_field_element.pyx # Time out
	sage -t  -long -force_lib devel/sage/sage/rings/number_field/number_field.py # Time out
	sage -t  -long -force_lib devel/sage/sage/rings/polynomial/polynomial_element.pyx # Time out
	sage -t  -long -force_lib devel/sage/sage/plot/plot3d/list_plot3d.py # 2 doctests failed
	sage -t  -long -force_lib devel/sage/sage/interfaces/qepcad.py # 2 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/padics.py # 10 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/padic_lseries.py # 44 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/lseries_ell.py # 3 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/ell_point.py # 9 doctests failed
	sage -t  -long -force_lib devel/sage/sage/tests/startup.py # Time out
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/ell_modular_symbols.py # 16 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/modular_parametrization.py # 4 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/BSD.py # 6 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/descent_two_isogeny.pyx # 2 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/heegner.py # 72 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/period_lattice.py # 70 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py # 48 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/sha_tate.py # 40 doctests failed
	sage -t  -long -force_lib devel/sage/sage/ext/fast_callable.pyx # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/interfaces/psage.py # Time out
	sage -t  -long -force_lib devel/sage/sage/interfaces/expect.py # Time out
	sage -t  -long -force_lib devel/sage/sage/interfaces/sage0.py # Time out
----------------------------------------------------------------------

FWIW, I previously managed to reduce the doctest errors to 7 files IIRC; from sage-release (Sage 4.7.2.alpha3 thread):

leif wrote:
> > I've also tested on Linux PPC64 (POWER7), but there a lot goes wrong
> > (mainly due to a partially broken ECL and Maxima I think), including
> > some noise I didn't see on any of the other platforms, e.g. ones that
> > don't match "1.00..." because they are slightly *less* than one.

P.S.: The following tests even timeout when run individually (with the
default timeout of half an hour on a quite fast box) in my current build:

sage -t  -long -force_lib sage/rings/real_mpfi.pyx # Time out
sage -t  -long -force_lib sage/rings/polynomial/polynomial_element.pyx #
Time out
sage -t  -long -force_lib
sage/rings/number_field/number_field_element.pyx # Time out
sage -t  -long -force_lib sage/sage/rings/number_field/number_field.py #
Time out

Interestingly also sandpile takes a long time, although this is SUSE
Linux Enterprise Server 11 SP1 (ppc64), Kernel version
2.6.32.43-0.4-ppc64 and not Ubuntu.

The other failing doctests are in:

  sage/misc/functional.py # 1 doctests failed
  (failing MPFR assertion)
  sage/interfaces/qepcad.py # 2 doctests failed
  (two funny errors)
  sage/plot/plot3d/list_plot3d.py # 2 doctests failed
  (two times "ValueError: negative dimensions are not allowed" in
list_plot3d())

Note that there are further doctest errors in the files which timeout,
i.e., before tests start to hang.


-leif

I unfortunately cannot tell (at least at the moment) how I exactly built that version since I had trouble with various things like GCC 4.4.6 not recognizing -mvsx (which ATLAS uses without first trying whether the command line option is supported) and the PolyBoRi spkg which didn't propagate LIBRARY_PATH etc.

comment:18 Changed 11 years ago by Leif Leonhardy

Description: modified (diff)

comment:19 Changed 11 years ago by François Bissey

I have built 5.0.prealpha on one of the power7 box I have access too (not silius). I get the following after running the tests (not in parallel)

The following tests failed:


        sage -t -long  -force_lib "devel/sage/sage/numerical/optimize.py"
        sage -t -long  -force_lib "devel/sage/sage/misc/functional.py"
        sage -t -long  -force_lib "devel/sage/sage/libs/libecm.pyx" # Killed/crashed
        sage -t -long  -force_lib "devel/sage/sage/categories/pushout.py"
        sage -t -long  -force_lib "devel/sage/sage/rings/real_mpfi.pyx" # Time out
        sage -t -long  -force_lib "devel/sage/sage/rings/number_field/totallyreal_rel.py"
        sage -t -long  -force_lib "devel/sage/sage/rings/number_field/number_field_element.pyx" # Time out
        sage -t -long  -force_lib "devel/sage/sage/rings/number_field/number_field_morphisms.pyx"
        sage -t -long  -force_lib "devel/sage/sage/rings/number_field/number_field.py" # Killed/crashed
        sage -t -long  -force_lib "devel/sage/sage/rings/number_field/number_field_rel.py"
        sage -t -long  -force_lib "devel/sage/sage/rings/qqbar.py"
        sage -t -long  -force_lib "devel/sage/sage/rings/real_interval_absolute.pyx"
        sage -t -long  -force_lib "devel/sage/sage/rings/complex_interval.pyx"
        sage -t -long  -force_lib "devel/sage/sage/rings/real_lazy.pyx"
        sage -t -long  -force_lib "devel/sage/sage/rings/polynomial/polynomial_element.pyx" # Time out
        sage -t -long  -force_lib "devel/sage/sage/rings/polynomial/real_roots.pyx"
        sage -t -long  -force_lib "devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py"
        sage -t -long  -force_lib "devel/sage/sage/structure/parent.pyx"
        sage -t -long  -force_lib "devel/sage/sage/structure/sage_object.pyx"
        sage -t -long  -force_lib "devel/sage/sage/plot/plot3d/list_plot3d.py"
        sage -t -long  -force_lib "devel/sage/sage/interfaces/qepcad.py"
        sage -t -long  -force_lib "devel/sage/sage/graphs/graph_decompositions/vertex_separation.pyx"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/padics.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/padic_lseries.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/ell_point.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/lseries_ell.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/ell_modular_symbols.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/modular_parametrization.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/BSD.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/sha_tate.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/heegner.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/descent_two_isogeny.pyx"
        sage -t -long  -force_lib "devel/sage/sage/schemes/elliptic_curves/period_lattice.py"
        sage -t -long  -force_lib "devel/sage/sage/schemes/plane_conics/con_number_field.py"
        sage -t -long  -force_lib "devel/sage/sage/ext/fast_callable.pyx"
Total time for all tests: 21029.5 seconds

I cannot really post many details right now but the errors are similar to before. Problems with mpfr and scipy are the main culprits. Some details on the box used:

frb15@p2n14-c /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0 :uname -a
Linux p2n14-c 2.6.32.12-0.7-ppc64 #1 SMP 2010-05-20 11:14:20 +0200 ppc64 ppc64 ppc64 GNU/Linux

and the end of /proc/cpuinfo:

processor       : 61
cpu             : POWER7 (architected), altivec supported
clock           : 3300.000000MHz
revision        : 2.1 (pvr 003f 0201)

timebase        : 512000000
platform        : pSeries
model           : IBM,8233-E8B
machine         : CHRP IBM,8233-E8B

comment:20 Changed 11 years ago by François Bissey

I can supply gdb output for the test that got killed, "devel/sage/sage/rings/number_field/number_field.py":

init2.c:52: MPFR assertion failed: p >= 2 && p <= ((mpfr_prec_t)((mpfr_prec_t)(~(mpfr_prec_t)0)>>1))

Program received signal SIGABRT, Aborted.
0x00000400004c80e0 in .raise () from /lib64/power7/libc.so.6
(gdb) bt
#0  0x00000400004c80e0 in .raise () from /lib64/power7/libc.so.6
#1  0x00000400004c9da0 in .abort () from /lib64/power7/libc.so.6
#2  0x0000040004202580 in .mpfr_assert_fail () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.1
#3  0x00000400041f9278 in .mpfr_init2 () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.1
#4  0x00000400041e92c0 in .set_z () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.1
#5  0x00000400041e9424 in .mpfr_set_q () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.1
#6  0x00000400044ba900 in mpfi_interv_q (a=0x1703db98, b=0x17034250, c=0x170342b0) at mpfi.c:3648
#7  0x000004000445b3a0 in __pyx_pf_4sage_5rings_9real_mpfi_24RealIntervalFieldElement___init__ (__pyx_v_self=0x1703db78, 
    __pyx_args=<value optimized out>, __pyx_kwds=<value optimized out>) at sage/rings/real_mpfi.c:7366
#8  0x000004000017736c in type_call (type=<value optimized out>, args=0x17025500, kwds=0x0) at Objects/typeobject.c:735
#9  0x00000400000ecb3c in PyObject_Call (func=0x4000449c208, arg=0x17025500, kw=0x0) at Objects/abstract.c:2529
#10 0x000004000445e514 in __pyx_pf_4sage_5rings_9real_mpfi_23RealIntervalField_class_9__call__ (__pyx_v_self=0x10ee1c50, 
    __pyx_args=<value optimized out>, __pyx_kwds=<value optimized out>) at sage/rings/real_mpfi.c:4421

I may try to upgrade mpfi/mpfr to see if it improve things.

comment:21 Changed 11 years ago by François Bissey

I have updated mpfi and mpfr using #12171 and #11666 and now I am getting a backtrace going back to mpir:

Program received signal SIGSEGV, Segmentation fault.
0x000004000155c604 in .__gmpn_lshift () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libgmp.so.8
(gdb) bt
#0  0x000004000155c604 in .__gmpn_lshift () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libgmp.so.8
#1  0x00000400041efbd0 in .set_z () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.4
#2  0x00000400041efd3c in .mpfr_set_q () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.4
#3  0x00000400044d0580 in mpfi_interv_q (a=0x17033b98, b=0x170342b0, c=0x17034310) at interv_q.c:34
#4  0x000004000446b3a0 in __pyx_pf_4sage_5rings_9real_mpfi_24RealIntervalFieldElement___init__ (__pyx_v_self=0x17033b78, 
    __pyx_args=<value optimized out>, __pyx_kwds=<value optimized out>) at sage/rings/real_mpfi.c:7366
#5  0x000004000017736c in type_call (type=<value optimized out>, args=0x17025500, kwds=0x0) at Objects/typeobject.c:735
#6  0x00000400000ecb3c in PyObject_Call (func=0x400044ac208, arg=0x17025500, kw=0x0) at Objects/abstract.c:2529
#7  0x000004000446e514 in __pyx_pf_4sage_5rings_9real_mpfi_23RealIntervalField_class_9__call__ (__pyx_v_self=0x10ee1c50, 
    __pyx_args=<value optimized out>, __pyx_kwds=<value optimized out>) at sage/rings/real_mpfi.c:4421

comment:22 Changed 11 years ago by François Bissey

Just one more detail on the crash running the test with -verbose to get the failing bit:

Trying:
    L = NumberField(x**Integer(3) - Integer(4)*x + Integer(1), embedding = RealNumber('1.86'), names=('b',)); (b,) = L._first_ngens(1)###line 5176:_sage_    >>> L.<b> = NumberField(x^3 - 4*x + 1, embedding = 1.86)
Expecting nothing
ok
Trying:
    L(a)###line 5177:_sage_    >>> L(a)
Expecting:
    Traceback (most recent call last):
    ...
    ValueError: Cannot convert a to Number Field in b with defining polynomial x^3 - 4*x + 1 (using the specified embeddings)
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libcsage.so(print_backtrace-0x1cf74)[0x40000a5e1ec]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libcsage.so(sigdie-0x1cf1c)[0x40000a5e25c]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libcsage.so(sage_signal_handler-0x1d370)[0x40000a5dd60]
[0x40000040418]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.4(+0x2fbb0)[0x400040ffbb0]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.4(mpfr_set_q-0x4f1b4)[0x400040ffd3c]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfi.so.0(mpfi_interv_q-0x1b260)[0x400043e0580]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/python/site-packages/sage/rings/real_mpfi.so(+0x2b3a0)[0x4000437b3a0]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libpython2.7.so.1.0(+0x11736c)[0x4000017736c]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libpython2.7.so.1.0(PyObject_Call-0x1bff54)[0x400000ecb3c]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/python/site-packages/sage/rings/real_mpfi.so(+0x2e514)[0x4000437e514]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libpython2.7.so.1.0(PyObject_Call-0x1bff54)[0x400000ecb3c]
The doctested process was killed by signal 11
         [5.9 s]

So we are expecting to catch some failure here in the first place and it doesn't go according to plan.

Also I forgot to mention I used the compiler fron SLES rather than compiling a newer version:

gcc -v
Using built-in specs.
Target: powerpc64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.3 --enable-linux-futex --without-system-libunwind --with-cpu=power4 --enable-secureplt --with-long-double-128 --build=powerpc64-suse-linux
Thread model: posix
gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) 
gfortran -v
Using built-in specs.
Target: powerpc64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.3 --enable-linux-futex --without-system-libunwind --with-cpu=power4 --enable-secureplt --with-long-double-128 --build=powerpc64-suse-linux
Thread model: posix
gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux)

comment:23 Changed 11 years ago by François Bissey

I am doing a complete test run with the new mpfi/mpfr combo but so far the results don't look any different. I looked a little bit more into the test that timed out (devel/sage/sage/rings/real_mpfi.pyx) with verbose and it stops dead there:

Trying:
    RIF(Integer(5)).gamma()###line 4133:_sage_    >>> RIF(5).gamma()
Expecting:
    24
ok
Trying:
    a = RIF(Integer(3),Integer(4)).gamma(); a###line 4135:_sage_    >>> a = RIF(3,4).gamma(); a
Expecting:
    1.?e1

I'll look at the other killed test (libecm.pyx) a bit later.

comment:24 Changed 11 years ago by François Bissey

libecm.pyx doesn't seem to work at all

frb15@p2n14-c /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0 :./sage -t -long  -force_lib "devel/sage/sage/libs/libecm.pyx" -verbose
sage -t -long -force_lib -verbose "devel/sage/sage/libs/libecm.pyx"
Trying:
    set_random_seed(0L)
Expecting nothing
ok
Trying:
    change_warning_output(sys.stdout)
Expecting nothing
ok
Trying:
    import sage.libs.libecm###line 14:_sage_    >>> import sage.libs.libecm
Expecting nothing
ok
Trying:
    from sage.libs.libecm import ecmfactor###line 15:_sage_    >>> from sage.libs.libecm import ecmfactor
Expecting nothing
ok
Trying:
    result = ecmfactor(Integer(999), RealNumber('0.00'))###line 16:_sage_    >>> result = ecmfactor(999, 0.00)
Expecting nothing
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libcsage.so(print_backtrace-0x1cf74)[0x40000a5e1ec]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libcsage.so(sigdie-0x1cf1c)[0x40000a5e25c]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libcsage.so(sage_signal_handler-0x1d370)[0x40000a5dd60]
[0x40000040418]
[0xfffc9771790]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/python/site-packages/sage/libs/libecm.so(+0x27c84)[0x4000a207c84]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/python/site-packages/sage/libs/libecm.so(ecm-0x657dc)[0x4000a1f60e4]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/python/site-packages/sage/libs/libecm.so(ecm_factor-0x6746c)[0x4000a1f43ac]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/python/site-packages/sage/libs/libecm.so(+0x133d4)[0x4000a1f33d4]
/hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libpython2.7.so.1.0(PyCFunction_Call-0x15fed4)[0x40000152c1c]

and from gdb

Program received signal SIGSEGV, Segmentation fault.
0x7d0429d27d242810 in ?? ()
(gdb) bt
#0  0x7d0429d27d242810 in ?? ()
#1  0x000004000a5d3f70 in mulredc (z=0x13afdb50, x=<value optimized out>, y=<value optimized out>, m=0x13b05df0, nn=1, 
    invm=4727093576446091305) at mpmod.c:386
#2  0x000004000a5d7c84 in ecm_mulredc_basecase (R=0xfffffffb080, S1=0xfffffffb1a8, S2=0xfffffffb178, modulus=0xfffffffb130) at mpmod.c:611
#3  0x000004000a5c60e4 in ecm (f=0xfffffffb578, x=0xfffffffb3d8, sigma=0xfffffffb3e8, n=0xfffffffb568, go=0xfffffffb400, 
    B1done=0xfffffffb410, B1=0, B2min_parm=0xfffffffb418, B2_parm=0xfffffffb428, B2scale=1, k=0, S=0, verbose=0, repr=<value optimized out>, 
    nobase2step2=0, use_ntt=1, sigma_is_A=0, os=0x4000061d698, es=0x4000061d778, chkfilename=0x0, TreeFilename=0x0, maxmem=0, stage1time=0, 
    rng=0xfffffffb480, stop_asap=0) at ecm.c:940
#4  0x000004000a5c43ac in ecm_factor (f=0xfffffffb578, n=0xfffffffb568, B1=0, p=0xfffffffb3d0) at factor.c:93
#5  0x000004000a5c33d4 in __pyx_pf_4sage_4libs_6libecm_ecmfactor (__pyx_self=<value optimized out>, __pyx_args=<value optimized out>, 
    __pyx_kwds=<value optimized out>) at sage/libs/libecm.c:1894
#6  0x0000040000152c1c in PyCFunction_Call (func=0x13aae368, arg=0x13ac1878, kw=<value optimized out>) at Objects/methodobject.c:85

comment:25 Changed 11 years ago by François Bissey

ecm passed its test suite so it is quite strange.

comment:26 Changed 11 years ago by François Bissey

Strangely enough I now get the following backtrace for real_mpfi.pyx, I have installed texlive in the mean time which may have made a difference.

get_str.c:153: MPFR assertion failed: size_s1 >= m

Program received signal SIGABRT, Aborted.
0x00000400004c80e0 in .raise () from /lib64/power7/libc.so.6
(gdb) bt
#0  0x00000400004c80e0 in .raise () from /lib64/power7/libc.so.6
#1  0x00000400004c9da0 in .abort () from /lib64/power7/libc.so.6
#2  0x00000400042ec060 in .mpfr_assert_fail () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.4
#3  0x00000400042c12fc in .mpfr_get_str_aux () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.4
#4  0x00000400042c1d48 in .mpfr_get_str () from /hpc/scratch/frb15/sandbox/sage-5.0.prealpha0/local/lib/libmpfr.so.4
#5  0x0000040004547ff4 in __pyx_f_4sage_5rings_9real_mpfi_24RealIntervalFieldElement__str_question_style (__pyx_v_self=0x13f47408, 
    __pyx_v_base=0, __pyx_v_error_digits=0, __pyx_v_e=0x40000646cb0, __pyx_v_prefer_sci=0, __pyx_skip_dispatch=<value optimized out>)
    at sage/rings/real_mpfi.c:9727
#6  0x00000400045524f8 in __pyx_pf_4sage_5rings_9real_mpfi_24RealIntervalFieldElement_12str (__pyx_v_self=0x13f47408, 
    __pyx_args=<value optimized out>, __pyx_kwds=<value optimized out>) at sage/rings/real_mpfi.c:9275

I will move to 5.0.prealpha1 soon.

comment:27 Changed 11 years ago by Paul Zimmermann

Cc: Paul Zimmermann added
Keywords: sd35.5 added

did someone try to compile MPFR 3.1.0 outside from Sage, and run its test suite (make check)? Same for MPFI 1.5.0?

Paul Zimmermann

comment:28 Changed 11 years ago by Paul Zimmermann

note: I just tried MPFR 3.1.0 on top of MPIR 2.1.3 on gcc110.fsffrance.org and "make check" worked.

Paul

comment:29 Changed 11 years ago by Leif Leonhardy

Replying to zimmerma:

did someone try to compile MPFR 3.1.0 outside from Sage, and run its test suite (make check)?

I did build both release candidates on Silius (Skynet); all [run] tests passed (although I don't recall with which GCC version; I guess I used my own build of 4.4.6).

I now see at least rc2 passed all tests with 4.3.4 and 4.6.1, too.


Same for MPFI 1.5.0?

Nope.

comment:30 Changed 11 years ago by Paul Zimmermann

Leif,

I did build both release candidates on Silius (Skynet); all [run] tests passed

please could you check again with the 3.1.0 release? Alternatively if I have access to this machine (Silius?) I can try to investigate. William, is it possible?

Paul

comment:31 Changed 11 years ago by Jeroen Demeyer

Description: modified (diff)

comment:32 in reply to:  30 Changed 11 years ago by Leif Leonhardy

Replying to zimmerma:

I did build both release candidates on Silius (Skynet); all [run] tests passed

please could you check again with the 3.1.0 release?

IIRC there was no difference to the rc2 (except for version strings and the like), but I can probably retry a build tomorrow.


Alternatively if I have access to this machine (Silius?) I can try to investigate.

If you have a skynet account, you can log into silius from eno; otherwise you can ask Mariah Lenox for an account.

comment:33 Changed 11 years ago by Paul Zimmermann

Cc: Mariah Lennox added

Leif,

I only have an account on sage.math, thus I don't think I have one on eno. Mariah, if you are out there, please can you create an account for me on skynet? My email is Paul dot Zimmermann at inria dot fr.

Paul

comment:34 Changed 11 years ago by Leif Leonhardy

Just for the record:

leif@silius:~> gcc -v
Using built-in specs.
Target: powerpc64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.3 --enable-linux-futex --without-system-libunwind --with-cpu=power4 --enable-secureplt --with-long-double-128 --build=powerpc64-suse-linux
Thread model: posix
gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) 
leif@silius:~> (. /usr/local/skynet_bash_profile ; gcc -v)
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.2/ppc64-Linux-power7-suse/libexec/gcc/powerpc64-unknown-linux-gnu/4.6.2/lto-wrapper
Target: powerpc64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.6.2/src/gcc-4.6.2/configure --enable-languages=c,c++,fortran --with-gnu-as --with-gnu-as=/usr/local/binutils-2.21.1/ppc64-Linux-power7-suse-gcc-4.6.1/bin/as --with-gnu-ld --with-ld=/usr/local/binutils-2.21.1/ppc64-Linux-power7-suse-gcc-4.6.1/bin/ld --with-gmp=/usr/local/mpir-2.4.0/ppc64-Linux-power7-suse-gcc-4.3.4-suse --with-mpfr=/usr/local/mpfr-3.1.0/ppc64-Linux-power7-suse-mpir-2.4.0-gcc-4.6.0 --with-mpc=/usr/local/mpc-0.9/ppc64-Linux-power7-suse-mpir-2.4.0-mpfr-3.1.0-gcc-4.6.1 --prefix=/usr/local/gcc-4.6.2/ppc64-Linux-power7-suse
Thread model: posix
gcc version 4.6.2 (GCC) 

I.e., Mariah did build GCC 4.6.2 with MPFR 3.1.0 as well.

(And I'm pretty sure it defaults to power7; as you can see the "native" [SuSE] GCC 4.3.4 defaults to power4.)

comment:35 Changed 11 years ago by Leif Leonhardy

Oh, btw., all my stand-alone builds of MPFR (3.1.0[.rc{1,2}]) were with GMP 5.0.2, not MPIR.

====================
All 160 tests passed
(1 test was not run)
====================
...
leif@silius:~/src/mpfr-3.1.0-build.silius-gmp-5.0.2-gcc-4.3.4> gcc -v ; egrep "__GMP_(CC|CFLAGS)" /home/leif/local/silius-gmp-5.0.2/include/gmp.h 
Using built-in specs.
Target: powerpc64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.3 --enable-linux-futex --without-system-libunwind --with-cpu=power4 --enable-secureplt --with-long-double-128 --build=powerpc64-suse-linux
Thread model: posix
gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) 
#define __GMP_CC "gcc -std=gnu99"
#define __GMP_CFLAGS "-O3 -g -fno-strict-aliasing -mcpu=power7 -mtune=power7"
leif@silius:~/src/mpfr-3.1.0-build.silius-gmp-5.0.2-gcc-4.3.4> 

(Just built again. I didn't set CC or CFLAGS etc., so MPFR took GMP's settings -- those above.)

comment:36 Changed 11 years ago by Leif Leonhardy

Same with GCC 4.6.2:

====================
All 160 tests passed
(1 test was not run)
====================
...
leif@silius:~/src/mpfr-3.1.0-build.silius-gmp-5.0.2-gcc-4.6.2> gcc -v ; egrep "__GMP_(CC|CFLAGS)" /home/leif/local/silius-gmp-5.0.2/include/gmp.h 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.2/ppc64-Linux-power7-suse/libexec/gcc/powerpc64-unknown-linux-gnu/4.6.2/lto-wrapper
Target: powerpc64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.6.2/src/gcc-4.6.2/configure --enable-languages=c,c++,fortran --with-gnu-as --with-gnu-as=/usr/local/binutils-2.21.1/ppc64-Linux-power7-suse-gcc-4.6.1/bin/as --with-gnu-ld --with-ld=/usr/local/binutils-2.21.1/ppc64-Linux-power7-suse-gcc-4.6.1/bin/ld --with-gmp=/usr/local/mpir-2.4.0/ppc64-Linux-power7-suse-gcc-4.3.4-suse --with-mpfr=/usr/local/mpfr-3.1.0/ppc64-Linux-power7-suse-mpir-2.4.0-gcc-4.6.0 --with-mpc=/usr/local/mpc-0.9/ppc64-Linux-power7-suse-mpir-2.4.0-mpfr-3.1.0-gcc-4.6.1 --prefix=/usr/local/gcc-4.6.2/ppc64-Linux-power7-suse
Thread model: posix
gcc version 4.6.2 (GCC) 
#define __GMP_CC "gcc -std=gnu99"
#define __GMP_CFLAGS "-O3 -g -fno-strict-aliasing -mcpu=power7 -mtune=power7"

comment:37 Changed 11 years ago by Leif Leonhardy

Same with MPIR (although 2.5.0, and slightly different CFLAGS):

====================
All 160 tests passed
(1 test was not run)
====================
...
leif@silius:~/src/mpfr-3.1.0-build.silius-mpir-2.5.0-gcc-4.6.2> gcc -v ; egrep "__(GMP|MPIR)_(CC|CFLAGS)" /home/leif/local/silius-mpir-2.5.0/include/gmp.h 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.6.2/ppc64-Linux-power7-suse/libexec/gcc/powerpc64-unknown-linux-gnu/4.6.2/lto-wrapper
Target: powerpc64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.6.2/src/gcc-4.6.2/configure --enable-languages=c,c++,fortran --with-gnu-as --with-gnu-as=/usr/local/binutils-2.21.1/ppc64-Linux-power7-suse-gcc-4.6.1/bin/as --with-gnu-ld --with-ld=/usr/local/binutils-2.21.1/ppc64-Linux-power7-suse-gcc-4.6.1/bin/ld --with-gmp=/usr/local/mpir-2.4.0/ppc64-Linux-power7-suse-gcc-4.3.4-suse --with-mpfr=/usr/local/mpfr-3.1.0/ppc64-Linux-power7-suse-mpir-2.4.0-gcc-4.6.0 --with-mpc=/usr/local/mpc-0.9/ppc64-Linux-power7-suse-mpir-2.4.0-mpfr-3.1.0-gcc-4.6.1 --prefix=/usr/local/gcc-4.6.2/ppc64-Linux-power7-suse
Thread model: posix
gcc version 4.6.2 (GCC) 
#define __GMP_CC __MPIR_CC
#define __GMP_CFLAGS __MPIR_CFLAGS
#define __MPIR_CC "gcc -std=gnu99"
#define __MPIR_CFLAGS "-m64  -O3"

comment:38 Changed 11 years ago by Paul Zimmermann

Same with MPIR (although 2.5.0, and slightly different CFLAGS):

but gcc -v says --with-gmp=/usr/local/mpir-2.4.0 instead. Please could you try with MPIR 2.1.3, which is as far as I know the version currently used by Sage?

Paul

comment:39 in reply to:  38 ; Changed 11 years ago by Leif Leonhardy

Replying to zimmerma:

Same with MPIR (although 2.5.0, and slightly different CFLAGS):

but gcc -v says --with-gmp=/usr/local/mpir-2.4.0 instead. Please could you try with MPIR 2.1.3, which is as far as I know the version currently used by Sage?

Well, that's the version GCC was built with, which doesn't matter here.

But I could rebuild and test MPFR 3.1.0 with (e.g.) MPIR 2.1.4 later.

comment:40 in reply to:  39 Changed 11 years ago by Leif Leonhardy

Replying to leif:

Replying to zimmerma:

Same with MPIR (although 2.5.0, and slightly different CFLAGS):

but gcc -v says --with-gmp=/usr/local/mpir-2.4.0 instead. Please could you try with MPIR 2.1.3, which is as far as I know the version currently used by Sage?

Well, that's the version GCC was built with, which doesn't matter here.

But I could rebuild and test MPFR 3.1.0 with (e.g.) MPIR 2.1.4 later.

Ok, I now also built MPIR 2.1.4 (changes w.r.t. 2.1.3 don't matter) and MPFR 3.1.0 with that version on silius; once without specifying any CFLAGS (such that MPIR used -m64 -O3, without any -march=/-mcpu=/-mtune=), once with CFLAGS="-mcpu=power7 -mtune=power7 -m64 -g -O3 (but in both cases only with GCC 4.6.2).

All test suites passed, as expected.

comment:41 Changed 11 years ago by François Bissey

Not sure how I ended with a crash in real_mpfi.pyx, there is a time out. But I don't see a crash anymore after a rebuild from scratch including mpfi-1.5.0. The time out may be caused by some other components.

comment:42 Changed 11 years ago by Paul Zimmermann

I have now an account on silius, thus I will be able to try. Francois, which version of Sage did you try?

Paul

comment:43 Changed 11 years ago by Paul Zimmermann

comment:44 Changed 11 years ago by Paul Zimmermann

compilation of sage-4.8 succeeded. Running sage -tp 48 * failed with:

        sage -t  devel/sage-main/sage/categories/pushout.py # 8 doctests failed
        sage -t  devel/sage-main/sage/ext/fast_callable.pyx # 1 doctests failed
        sage -t  devel/sage-main/sage/graphs/graph_decompositions/vertex_separation.pyx # 3 doctests failed
        sage -t  devel/sage-main/sage/interfaces/qepcad.py # 2 doctests failed
        sage -t  devel/sage-main/sage/libs/libecm.pyx # Killed/crashed
        sage -t  devel/sage-main/sage/lfunctions/sympow.py # 10 doctests failed
        sage -t  devel/sage-main/sage/misc/functional.py # 1 doctests failed
        sage -t  devel/sage-main/sage/numerical/optimize.py # 6 doctests failed
        sage -t  devel/sage-main/sage/modular/hecke/submodule.py # 1 doctests failed
        sage -t  devel/sage-main/sage/plot/plot3d/list_plot3d.py # 2 doctests failed
        sage -t  devel/sage-main/sage/modular/abvar/abvar.py # 1 doctests failed
        sage -t  devel/sage-main/sage/rings/real_interval_absolute.pyx # 53 doctests failed
        sage -t  devel/sage-main/sage/rings/real_lazy.pyx # 3 doctests failed
        sage -t  devel/sage-main/sage/rings/complex_interval.pyx # 22 doctests failed
        sage -t  devel/sage-main/sage/rings/qqbar.py # 119 doctests failed
        sage -t  devel/sage-main/sage/rings/number_field/totallyreal_rel.py # 8 doctests failed
        sage -t  devel/sage-main/sage/rings/number_field/number_field_morphisms.pyx # 2 doctests failed
        sage -t  devel/sage-main/sage/rings/number_field/number_field.py # Killed/crashed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/modular_parametrization.py # 4 doctests failed

        sage -t  devel/sage-main/sage/schemes/elliptic_curves/lseries_ell.py # 3 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/descent_two_isogeny.pyx # 2 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/padics.py # 10 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/period_lattice.py # 70 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/BSD.py # 4 doctests failed
        sage -t  devel/sage-main/sage/structure/parent.pyx # 1 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/ell_modular_symbols.py # 13 doctests failed
        sage -t  devel/sage-main/sage/structure/sage_object.pyx # 1 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/padic_lseries.py # 43 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/ell_point.py # 9 doctests failed
        sage -t  devel/sage-main/sage/rings/polynomial/multi_polynomial_ideal.py # 1 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/sha_tate.py # 34 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/heegner.py # 66 doctests failed
        sage -t  devel/sage-main/sage/schemes/elliptic_curves/ell_rational_field.py # 44 doctests failed
        sage -t  devel/sage-main/sage/rings/real_mpfi.pyx # Time out
        sage -t  devel/sage-main/sage/rings/number_field/number_field_element.pyx # Time out

        sage -t  devel/sage-main/sage/rings/number_field/number_field_rel.py # Time out
        sage -t  devel/sage-main/sage/rings/polynomial/polynomial_element.pyx # Time out
        sage -t  devel/sage-main/sage/rings/polynomial/real_roots.pyx # Time out
        sage -t  devel/sage-main/sage/sandpiles/sandpile.py # Time out
        sage -t  devel/sage-main/sage/schemes/plane_conics/con_number_field.py # Time out

I will investigate further.

Paul

comment:45 Changed 11 years ago by Paul Zimmermann

I can isolate one issue with MPFI:

sage: RIF(1,1).lower()
5.96124715852883e27
sage: RIF(1,1).upper()
4.05648192073034e31
sage: RIF(0,1).lower()
...
RuntimeError: Aborted

Paul

comment:46 Changed 11 years ago by Paul Zimmermann

if I modify the function mpfi_interv_z of MPFI as follows:

int mpfi_interv_z(mpfi_ptr a,mpz_srcptr b,mpz_srcptr c)
{
  int inexact_left, inexact_right, inexact=0;

  mpz_dump (b);
  mpz_dump (c);
  if ( mpz_cmp(b,c) <= 0 ) {
    inexact_left = mpfr_set_z(&(a->left), b, MPFI_RNDD);
    mpfr_dump (&(a->left));
    inexact_right = mpfr_set_z(&(a->right), c, MPFI_RNDU);
    mpfr_dump (&(a->right));
  }
...

then I get:

sage: RIF(1,2)
000000000000000001
000000000000000002
0.00000000000000000000000000000000000000000000000000000E65
0.00000000000000000000000000000000000000000000000000001E65
get_str.c:149: MPFR assertion failed: size_s1 >= m
...

thus clearly something is corrupted with GMP and MPFR, since we should get:

1
2
0.10000000000000000000000000000000000000000000000000000E1
0.10000000000000000000000000000000000000000000000000000E2

Note: I cannot reproduce the problem outside from Sage, thus it is probably due to the way GMP (i.e., MPIR) and/or MPFR are compiled within Sage.

Paul

comment:47 Changed 11 years ago by François Bissey

sage-5.0-beta5 + #11666 + #12171

sage: RIF(1,1).lower()
get_str.c:153: MPFR assertion failed: size_s1 >= m
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)

/hpc/scratch/frb15/sandbox/sage-5.0.beta5/<ipython console> in <module>()

/hpc/scratch/frb15/sandbox/sage-5.0.beta5/local/lib/python2.7/site-packages/IPython/Prompts.pyc in __call__(self, arg)
    550 
    551             # and now call a possibly user-defined print mechanism
--> 552             manipulated_val = self.display(arg)
    553             
    554             # user display hooks can change the variable to be stored in

/hpc/scratch/frb15/sandbox/sage-5.0.beta5/local/lib/python2.7/site-packages/IPython/Prompts.pyc in _display(self, arg)
    576             return IPython.generics.result_display(arg)
    577         except TryNext:            
--> 578             return self.shell.hooks.result_display(arg)
    579 
    580     # Assign the default display method:

/hpc/scratch/frb15/sandbox/sage-5.0.beta5/local/lib/python2.7/site-packages/IPython/hooks.pyc in __call__(self, *args, **kw)
    139             #print "prio",prio,"cmd",cmd #dbg
    140             try:
--> 141                 ret = cmd(*args, **kw)
    142                 return ret
    143             except ipapi.TryNext, exc:

/hpc/scratch/frb15/sandbox/sage-5.0.beta5/local/lib/python2.7/site-packages/sage/misc/displayhook.pyc in result_display(ip_self, obj)
    148     # IPython's default result_display() uses the IPython.genutils.Term.cout stream.
    149     # See also local/lib/python2.6/site-packages/IPython/hooks.py.
--> 150     print_obj(IPython.genutils.Term.cout, obj)
    151 
    152 def displayhook(obj):

/hpc/scratch/frb15/sandbox/sage-5.0.beta5/local/lib/python2.7/site-packages/sage/misc/displayhook.pyc in print_obj(out_stream, obj)
    140             if _check_tall_list_and_print(out_stream, obj):
    141                 return
--> 142     print >>out_stream, `obj`
    143 
    144 def result_display(ip_self, obj):

/hpc/scratch/frb15/sandbox/sage-5.0.beta5/local/lib/python2.7/site-packages/sage/rings/real_mpfr.so in sage.rings.real_mpfr.RealNumber.__repr__ (sage/rings/real_mpfr.c:9438)()

/hpc/scratch/frb15/sandbox/sage-5.0.beta5/local/lib/python2.7/site-packages/sage/rings/real_mpfr.so in sage.rings.real_mpfr.RealNumber.str (sage/rings/real_mpfr.c:11257)()

RuntimeError: Aborted

Same thing with upper. But your remark about it working outside of sage makes me want to hack sage "provided atlas" style and see what happens.

comment:48 Changed 11 years ago by François Bissey

Ok I did a build of 5.0.beta8-gcc along with the new mpir from #11616. I asked the gcc spkg to be built. I may do another build without it later. I didn't run all the test I just looked at one key test at the moment:sage -t -long -force_lib "devel/sage/sage/rings/number_field/number_field.py" because it is killed. I am still getting a backtrace similar to comment 21.

Program received signal SIGSEGV, Segmentation fault.
.__gmpn_lshift () at tmp-lshift.s:105
105     tmp-lshift.s: No such file or directory.
        in tmp-lshift.s
Current language:  auto
The current source language is "auto; currently asm".
(gdb) bt
#0  .__gmpn_lshift () at tmp-lshift.s:105
#1  0x000004000874c908 in set_z (f=0xfffffff74d0, z=0x16eef0d0, zs=<value optimized out>) at set_q.c:53
#2  0x000004000874ca4c in mpfr_set_q (f=0x1724ca00, q=0x16eef0d0, rnd=<value optimized out>) at set_q.c:101
#3  0x0000040008a00198 in mpfi_interv_q (a=0x1724ca00, b=0x16eef0d0, c=0x16eef130) at interv_q.c:34
#4  0x00000400089b7a14 in __pyx_pf_4sage_5rings_9real_mpfi_24RealIntervalFieldElement___init__ (__pyx_v_self=0x1724c9e0, 
    __pyx_args=<value optimized out>, __pyx_kwds=<value optimized out>) at sage/rings/real_mpfi.c:7366
#5  0x000004000016aed0 in type_call (type=0x400089e8360, args=0x17232730, kwds=0x0) at Objects/typeobject.c:737
#6  0x00000400000f33f0 in PyObject_Call (func=0x400089e8360, arg=<value optimized out>, kw=<value optimized out>)
    at Objects/abstract.c:2529
#7  0x00000400089b2044 in __pyx_pf_4sage_5rings_9real_mpfi_23RealIntervalField_class_9__call__ (__pyx_v_self=0x10fb44e0, 
    __pyx_args=<value optimized out>, __pyx_kwds=<value optimized out>) at sage/rings/real_mpfi.c:4421

and I am still getting the following:

sage: RIF(1,1).lower()
get_str.c:153: MPFR assertion failed: size_s1 >= m
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)

/hpc/scratch/frb15/sandbox/sage-5.0.beta8-gcc/<ipython console> in <module>()

/hpc/scratch/frb15/sandbox/sage-5.0.beta8-gcc/local/lib/python2.7/site-packages/IPython/Prompts.pyc in __call__(self, arg)
    550 
    551             # and now call a possibly user-defined print mechanism
--> 552             manipulated_val = self.display(arg)
    553             
    554             # user display hooks can change the variable to be stored in

/hpc/scratch/frb15/sandbox/sage-5.0.beta8-gcc/local/lib/python2.7/site-packages/IPython/Prompts.pyc in _display(self, arg)
    576             return IPython.generics.result_display(arg)
    577         except TryNext:            
--> 578             return self.shell.hooks.result_display(arg)
    579 
    580     # Assign the default display method:

/hpc/scratch/frb15/sandbox/sage-5.0.beta8-gcc/local/lib/python2.7/site-packages/IPython/hooks.pyc in __call__(self, *args, **kw)
    139             #print "prio",prio,"cmd",cmd #dbg
    140             try:
--> 141                 ret = cmd(*args, **kw)
    142                 return ret
    143             except ipapi.TryNext, exc:

/hpc/scratch/frb15/sandbox/sage-5.0.beta8-gcc/local/lib/python2.7/site-packages/sage/misc/displayhook.pyc in result_display(ip_self, obj)
    148     # IPython's default result_display() uses the IPython.genutils.Term.cout stream.
    149     # See also local/lib/python2.6/site-packages/IPython/hooks.py.
--> 150     print_obj(IPython.genutils.Term.cout, obj)
    151 
    152 def displayhook(obj):

/hpc/scratch/frb15/sandbox/sage-5.0.beta8-gcc/local/lib/python2.7/site-packages/sage/misc/displayhook.pyc in print_obj(out_stream, obj)
    140             if _check_tall_list_and_print(out_stream, obj):
    141                 return
--> 142     print >>out_stream, `obj`
    143 
    144 def result_display(ip_self, obj):

/hpc/scratch/frb15/sandbox/sage-5.0.beta8-gcc/local/lib/python2.7/site-packages/sage/rings/real_mpfr.so in sage.rings.real_mpfr.RealNumber.__repr__ (sage/rings/real_mpfr.c:9438)()

/hpc/scratch/frb15/sandbox/sage-5.0.beta8-gcc/local/lib/python2.7/site-packages/sage/rings/real_mpfr.so in sage.rings.real_mpfr.RealNumber.str (sage/rings/real_mpfr.c:11257)()

RuntimeError: Aborted

comment:49 Changed 11 years ago by Paul Zimmermann

Francois, just to be sure, did you check MPFR is built with --disable-thread-safe? Can you try to build GMP/MPIR and MPFR with --enable-assert? If you tell me where your build is I can try again to isolate the problem.

Paul

comment:50 Changed 11 years ago by Leif Leonhardy

FWIW, I've also built Sage 5.0.beta8 on silius (skynet), where GCC 4.6.3 meanwhile is the default compiler (although one still has to source /local/bin/skynet_bash_profile, since otherwise a few packages, two IIRC, fail to build because of wrong libraries / not sufficiently set LD_LIBRARY_PATH).

I've built once with MPIR 2.1.3 and once with MPIR 2.4.0[.p1], which doesn't seem to make a difference regarding the results of ptestlong.


According to Bill, MPIR doesn't make (much) use of assertions; they mainly rely on their test suites (same for FLINT).

comment:51 Changed 11 years ago by Leif Leonhardy

P.S.: I've of course built MPIR 2.4.0 (successfully) with SAGE_CHECK=yes; the GCC on silius is itself built with MPIR 2.5.0 and MPFR 3.1.0.

I use -mcpu=power7 -mtune=power7 -O3 -g [-fno-strict-aliasing]; with earlier Sage versions, I did build ECL with -mcpu=power4 ..., which (besides other variations) led to less errors (doctest errors in only 8 files IIRC), but I currently can't give a comparison or more details.

comment:52 Changed 11 years ago by Leif Leonhardy

Replying to zimmerma:

Francois, just to be sure, did you check MPFR is built with --disable-thread-safe?

The MPFR 3.1.0.p0 spkg included in Sage 5.0.beta8 uses --disable-thread-safe.

comment:53 Changed 11 years ago by François Bissey

I have build sage again with SAGE_DEBUG set to yes but I don't get more information this is annoying.

comment:54 Changed 11 years ago by François Bissey

All mpir/mpfr/mpfi tests pass (expect tget_set_d64 in mpfr which is skipped). One strange thing in mpfr

[tversion] MPIR: header 2.4.0, library 2.4.0
[tversion] MPFR tuning parameters from src/powerpc32/mparam.h

this is a powerpc64 machine (and I am sure mpir is configured 64bits), does it matter?

comment:55 Changed 11 years ago by François Bissey

It doesn't seem to matter but I am not sure the configuration works as it should in mpfr, if both ARCH_PPC and PPC64 are present PPC64 is just ignored.

comment:56 Changed 11 years ago by Paul Zimmermann

Francois,

I don't think it matters, since the mparam.h file only contains tuning parameters, however I will fix that in the development version. Thank you for pointing out this.

Paul

comment:57 Changed 11 years ago by Paul Zimmermann

in fact this issue was already fixed in the development version of MPFR. Here is a patch:

zimmerma@silius:~/mpfr-3.1.0> diff -u src/mparam_h.in.orig src/mparam_h.in
--- src/mparam_h.in.orig        2012-03-23 07:46:30.412866000 +0000
+++ src/mparam_h.in     2012-03-23 07:46:41.821355000 +0000
@@ -61,14 +61,14 @@
 #define MPFR_TUNE_CASE "src/arm/mparam.h"
 #include "arm/mparam.h"
 
-#elif defined (_ARCH_PPC) /* Threshold for 32-bit PowerPC */
-#define MPFR_TUNE_CASE "src/powerpc32/mparam.h"
-#include "powerpc32/mparam.h"
-
 #elif defined (__PPC64__) /* Threshold for 64-bit PowerPC */
 #define MPFR_TUNE_CASE "src/powerpc64/mparam.h"
 #include "powerpc64/mparam.h"
 
+#elif defined (_ARCH_PPC) /* Threshold for 32-bit PowerPC */
+#define MPFR_TUNE_CASE "src/powerpc32/mparam.h"
+#include "powerpc32/mparam.h"
+
 #elif defined (__sparc_v9__) /* Threshold for 64-bits Sparc */
 #define MPFR_TUNE_CASE "src/sparc64/mparam.h"
 #include "sparc64/mparam.h"

Paul

comment:58 Changed 11 years ago by Paul Zimmermann

would it be possible to send me the config.log file from MPFR when configured within Sage?

Paul

comment:59 in reply to:  58 Changed 11 years ago by Leif Leonhardy

Replying to zimmerma:

would it be possible to send me the config.log file from MPFR when configured within Sage?

I've uploaded two config.logs of MPFR from silius:

They don't differ except for the name of a temporary file.

(GCC 4.6.3, which meanwhile is the default compiler on that machine; CFLAGS/CXXFLAGS: -mcpu=power7 -mtune=power7 -O3 -g -fno-strict-aliasing)

-leif

comment:60 Changed 11 years ago by Paul Zimmermann

Leif,

thank you. I did compare your config.log of MPFR 3.1.0.p0 configured with MPIR 2.4.0 with the one for a vanilla MPFR-3.1.0 configured with GMP 5.0.4:

(1) it seems your config.log does not extract CC and CFLAGS from gmp.h

(2) mine uses gcc -std=gnu99 instead of gcc alone

(3) your config.log uses -mcpu=power7 -mtune=power7 instead of -m64

(4) the linker used is ld in your case and /usr/local/binutils-2.21.1/ppc64-Linux-power7-suse-gcc-4.6.1/bin/ld for a vanilla MPFR

I'd like to reproduce exactly your build with a vanilla MPFR but I cannot access some of your files:

zimmerma@silius:~/mpfr-3.1.0> ls /home/leif/Sage/release/build/silius/sage-5.0.beta9-gcc-4.6.3/local/include
ls: cannot access /home/leif/Sage/release/build/silius/sage-5.0.beta9-gcc-4.6.3/local/include: Permission denied

Paul

comment:61 Changed 11 years ago by Leif Leonhardy

Replying to zimmerma:

I did compare your config.log of MPFR 3.1.0.p0 configured with MPIR 2.4.0 with the one for a vanilla MPFR-3.1.0 configured with GMP 5.0.4:

(1) it seems your config.log does not extract CC and CFLAGS from gmp.h

It does, but MPIR takes (also) the flags I specified and hence writes these to gmp.h:

leif@silius:~/.../sage-5.0.beta9-gcc-4.6.3> egrep "__(GMP|MPIR)_(CC|CFLAGS)" local/include/gmp.h 
#define __GMP_CC __MPIR_CC
#define __GMP_CFLAGS __MPIR_CFLAGS
#define __MPIR_CC "gcc -std=gnu99"
#define __MPIR_CFLAGS " -g -O3 -mcpu=power7 -mtune=power7 -O3 -g -fno-strict-aliasing "

(This is the gmp.h created by MPIR 2.4.0.p1. I know the one from MPIR 2.1.3 does look different: First of all, __GMP_CC and __GMP_CFLAGS are defined to strings as well, instead of referring to their respective MPIR macros, and -- which is a known bug -- __GMP_CC doesn't contain -std=gnu99, although __MPIR_CC does.)

(2) mine uses gcc -std=gnu99 instead of gcc alone

This shouldn't matter; I could retry building MPIR and MPFR with CC="gcc -std=gnu99" though.

(3) your config.log uses -mcpu=power7 -mtune=power7 instead of -m64

See above.

(4) the linker used is ld in your case and /usr/local/binutils-2.21.1/ppc64-Linux-power7-suse-gcc-4.6.1/bin/ld for a vanilla MPFR

leif@silius:~> command -v ld
/usr/bin/ld
leif@silius:~> (. /usr/local/skynet_bash_profile ; command -v ld)
/usr/bin/ld

leif@silius:~> command ld --version
GNU ld (GNU Binutils; SUSE Linux Enterprise 11) 2.20.0.20100122-0.7.9
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
leif@silius:~> (. /usr/local/skynet_bash_profile ; command ld --version)
GNU ld (GNU Binutils; SUSE Linux Enterprise 11) 2.20.0.20100122-0.7.9
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

leif@silius:~> echo $PATH
/usr/local/bin/ppc64-Linux-power7-suse:/home/leif/.local/bin:/home/leif/bin/silius:/home/leif/bin:/opt/csm/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin

I'd like to reproduce exactly your build with a vanilla MPFR but I cannot access some of your files.

I've copied the headers and libs into /tmp/leif/sage-5.0beta9/MPIR-{2.1.3,2.4.0}/local/{include,lib}/, so you should be able to configure MPFR with --with-gmp=/tmp/leif/sage-5.0beta9/MPIR-2.1.3/local/ etc.

[Sorry for the delay, had some network trouble.]

comment:62 Changed 11 years ago by Paul Zimmermann

with MPFR configured with --enable-assert within sage-5.0.beta9, I can simplify the problem to:

sage: RIF(1,1)
get_exp.c:29: MPFR assertion failed: ((x)->_mpfr_d)[(((((x))->_mpfr_prec)-1)/(64 - 0)+1)-1] & ((~(mp_limb_t)0) ^ ((~(mp_limb_t)0) >> 1))

This means that we compute the exponent of a number which is either NaN, infinite or zero. I will continue to investigate.

Paul

comment:63 Changed 11 years ago by Paul Zimmermann

I have spent several hours on this and my conclusion is that the culprit is Sage (i.e. Cython). In real_mpfi.pyx one can read:

            elif PY_TYPE_CHECK(a, Rational) and PY_TYPE_CHECK(b, Rational):
                rat = a
                rat1 = b
                # todo: The <object> coerce is evidently to get around a weird bug in SageX (?)
                mpfi_interv_q(self.value, <object>rat.value, <object>rat1.value)

and the same coerce is done in the integer case.

I am 99% sure that we hit that weird bug. Indeed with RIF(1,1) the integers (mpz_t) which are passed to mpfi_interv_z are malformed, with SIZ=2 instead of SIZ=1.

However I have no idea how to solve that weird bug, or how to find another workaround. Can we know who did write this comment?

It might be that the issue is related to the fact that the Power7 is big endian. Was Sage tested on other 64-bit big endian platforms?

Paul

comment:64 in reply to:  63 Changed 11 years ago by Leif Leonhardy

Replying to zimmerma:

I am 99% sure that we hit that weird bug. However I have no idea how to solve that weird bug, or how to find another workaround.

? The coercion is supposed to work around just that "weird bug", as I understand this.

But this comment is likely to be obsolete ("SageX") anyway; did you try removing the <object>?


Can we know who did write this comment?

hg annotate ... (an alias for blame ;-) ) gives the changeset number, then hg log [-v] ... to see who made that change.


It might be that the issue is related to the fact that the Power7 is big endian. Was Sage tested on other 64-bit big endian platforms?

Well, [SunOS/Solaris] SPARC (V9), but the 64-bit port (including x86_64) is still incomplete AFAIK. (There's some wiki page on it, and a couple of meta-tickets; or ask Dave Kirkby, who did most if not all of it on his own.)

comment:65 Changed 11 years ago by Paul Zimmermann

Leif,

yes I tried removing the coercion. It gives:

Error compiling Cython file:
------------------------------------------------------------
...
                mpfi_interv_q(self.value, <object>rat.value, <object>rat1.value)
            elif PY_TYPE_CHECK(a, Integer) and PY_TYPE_CHECK(b, Integer):
                integ = a
                integ1 = b
                mpfi_interv_z(self.value, integ.value, integ1.value)
                                              ^
------------------------------------------------------------

sage/rings/real_mpfi.pyx:1045:47: Cannot convert 'mpz_t' to Python object

This is strange because mpfi_interv_z expects a mpz_t as 2nd and 3rd arguments, and integ.value is a mpz_t, thus I don't see any reason to convert to a Python object.

Paul

comment:66 Changed 11 years ago by Paul Zimmermann

on sage.math with Sage 4.8 hg annotate gives:

 2617:                 # todo: The <object> coerce is evidently to get around a weird bug in SageX (?)  
 2617:                 mpfi_interv_q(self.value, <object>rat.value, <object>rat1
.value)

then:

zimmerma@sage:~/sage-4.8/devel/sage/sage/rings$ hg  log -r 2617
changeset:   2617:616e5624646c
user:        William Stein <wstein@gmail.com>
date:        Wed Jan 24 11:42:46 2007 -0800
summary:     Switch to Carl Witty's new MPFI wrapper; also some fixes for the reference manual.

I'll thus ask William to help.

Paul

comment:67 Changed 11 years ago by Paul Zimmermann

I've sent a private mail to William. The bug seems clearly in Cython. In real_mpfi.c I see:

      __pyx_t_3 = ((PyObject *)__pyx_v_integ->value);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_8 = ((PyObject *)__pyx_v_integ1->value);
      __Pyx_INCREF(__pyx_t_8);
      mpfi_interv_z(((struct __pyx_obj_4sage_5rings_9real_mpfi_RealIntervalFiel\
dElement *)__pyx_v_self)->value, __pyx_t_3, __pyx_t_8);

thus __pyx_t_3 is of the wrong type: it should be of type Integer and not of type Python object (compare to the call to mpfi_set_z in the same file).

Paul

comment:68 Changed 11 years ago by Paul Zimmermann

I believe I understand what happens. The fact that __pyx_t_3 has the wrong type is not a problem, since it is a pointer, like what mpz_t expects as 2nd (and 3rd) argument of mpfi_interv_z.

However my guess is that the __Pyx_INCREF(__pyx_t_3) call is intended to increase a reference counter stored somewhere in the PyObject struct. Since __pyx_v_integ->value is not a Python object but a mpz_t, this call makes a side effect on the mpz_t structure, which has the effect to increase its "size" from 1 to 2, which explains why the mpz_t object seen by mpfi_interv_z is corrupted.

What is annoying is that this corruption also happens on other configurations (in particular little endian). For some reason it gets unnoticed, maybe because the corrupted field is not the size (maybe the allocated size). However one might be able to reproduce the problem also by changing the order of the fields in the mpz_t structure in gmp.h. Putting _mp_size first seems to break Sage on 64-bit Intel processors.

Paul

comment:69 Changed 11 years ago by Paul Zimmermann

I still got no answer from William. Does anybody know if it is possible to recompile Sage after modifying manually the real_mpfi.c file, without it being automatically generated? My idea is to remove the __Pyx_INCREF instructions to confirm my guess.

Paul

comment:70 in reply to:  69 Changed 11 years ago by Leif Leonhardy

Replying to zimmerma:

I still got no answer from William. Does anybody know if it is possible to recompile Sage after modifying manually the real_mpfi.c file, without it being automatically generated?

./sage -b should just do that, since Cython won't (re)generate files that are newer than their sources.

Of course first make a copy of it, but I've patched C and C++ files generated by Cython a couple of times without problems.

comment:71 Changed 11 years ago by Paul Zimmermann

thank you Leif. This confirms my guess: if I comment the two __Pyx_INCREF before the call to mpfi_interv_z, and the two __Pyx_DECREF after, then RIF(1,1) runs ok.

The problem is thus isolated, we now need somebody fluent in Cython to solve it or find another (platform independent) workaround.

Where do we report Cython bugs?

Paul

comment:72 Changed 11 years ago by Jeroen Demeyer

First attempt at patch. It builds, but I have not tested it.

comment:73 Changed 11 years ago by Paul Zimmermann

it seems indeed to solve the MPFI problem. I will try this patch on top of sage-5.0.beta10. Good catch Jeroen! Btw, why did you remove the cdef for free()?

Paul

comment:74 in reply to:  73 Changed 11 years ago by Jeroen Demeyer

Replying to zimmerma:

Btw, why did you remove the cdef for free()?

  1. Because it is not needed.
  2. Because in Sage, you should use sage_free() (which blocks interrupts and could potentially do other stuff too).

comment:75 Changed 11 years ago by Paul Zimmermann

with the patch on top of sage-5.0.beta10, we are making good progress, but the following doctests still fail:

sage -t devel/sage-11705/sage/functions/special.py # 2 doctests failed
sage -t devel/sage-11705/sage/graphs/graph_decompositions/vertex_separation.pyx # 3 doctests failed
sage -t devel/sage-11705/sage/libs/libecm.pyx # Killed/crashed
sage -t devel/sage-11705/sage/numerical/optimize.py # 6 doctests failed
sage -t devel/sage-11705/sage/plot/plot3d/list_plot3d.py # 4 doctests failed
sage -t devel/sage-11705/sage/sandpiles/sandpile.py # Time out

I will investigate the libecm problem.

Paul

comment:76 Changed 11 years ago by Paul Zimmermann

the sandpile.py doctest passes with -long, thus only 5 doctests fail.

Paul

comment:77 Changed 11 years ago by Paul Zimmermann

the libecm problem disappears when configuring GMP-ECM with --disable-asm-redc. The error is when the assembly function mulredc1 is called. Nothing seems wrong in the arguments, and I cannot reproduce the problem when configuring GMP-ECM alone. Also after adding make check in spkg-install everything is ok (btw why is make check not done?).

Maybe the problem is similar to the one Jeroen solved with MPFI?

Paul

comment:78 Changed 11 years ago by Jeroen Demeyer

Building cvxopt with SAGE_CHECK=yes fails on silius with GCC-4.6.3:

Testing l1.py ...
     pcost       dcost       gap    pres   dres   k/t
 0:  8.3671e+02  2.4168e+02  6e+02  8e-17  6e-15  1e+00
Traceback (most recent call last):
  File "l1.py", line 126, in <module>
    x, y = l1(P,q)
  File "l1.py", line 120, in l1
    primalstart={'x': x0, 's': s0}, dualstart={'z': z0})
  File "/home/jdemeyer/silius/sage-5.0.beta12-gcc/local/lib/python2.7/site-packages/cvxopt/coneprog.py", line 1084, in conelp
    raise ValueError("Rank(A) < p or Rank([G; A]) < n")
ValueError: Rank(A) < p or Rank([G; A]) < n
Error: test /home/jdemeyer/silius/sage-5.0.beta12-gcc/spkg/build/cvxopt-1.1.3.p1/src/examples/doc/chap8/l1.py failed

comment:79 Changed 11 years ago by Jeroen Demeyer

Here is the backtrace for the ECM Segmentation Fault:

#0  0x7d0429d27d242810 in ?? ()
#1  0x00000fffae273c18 in mulredc (z=0x10678760, x=<optimized out>, y=<optimized out>, m=0x1410d4b0, nn=1, invm=4727093576446091305)
    at mpmod.c:386
#2  0x00000fffae277300 in ecm_mulredc_basecase (R=0xfffffffc3b0, S1=0xfffffffc4d8, S2=0xfffffffc4a8, modulus=0xfffffffc460)
    at mpmod.c:611
#3  0x00000fffae26576c in ecm (f=0xfffffffc878, x=0xfffffffc6e8, sigma=0xfffffffc6f8, n=0xfffffffc888, go=0xfffffffc710,
    B1done=0xfffffffc720, B1=0, B2min_parm=0xfffffffc728, B2_parm=0xfffffffc738, B2scale=1, k=0, S=0, verbose=0, repr=0, nobase2step2=0,
    use_ntt=1, sigma_is_A=0, os=0xfffb7b7d698, es=0xfffb7b7d778, chkfilename=0x0, TreeFilename=0x0, maxmem=0, stage1time=0,
    rng=0xfffffffc790, stop_asap=0) at ecm.c:940
#4  0x00000fffae264e34 in ecm_factor (f=0xfffffffc878, n=0xfffffffc888, B1=0, p=0xfffffffc6e0) at factor.c:93
#5  0x00000fffae262640 in __pyx_pf_4sage_4libs_6libecm_ecmfactor (__pyx_self=<optimized out>, __pyx_args=<optimized out>,
    __pyx_kwds=<optimized out>) at sage/libs/libecm.c:1958
#6  0x00000fffb7e13ed4 in PyCFunction_Call (func=0x140c36c8, arg=<optimized out>, kw=<optimized out>) at Objects/methodobject.c:85
#7  0x00000fffb7e8fc18 in call_function (oparg=<optimized out>, pp_stack=0xfffffffca48) at Python/ceval.c:4013
#8  PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2666
#9  0x00000fffb7e91908 in PyEval_EvalCodeEx (co=0x140c2830, globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=<optimized out>, kws=<optimized out>, kwcount=<optimized out>, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#10 0x00000fffb7e9199c in PyEval_EvalCode (co=<optimized out>, globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:667

comment:80 Changed 11 years ago by Paul Zimmermann

Jeroen, I get the same backtrace, then the mulredc() function should call the assembly code mulredc1.asm in the powerpc64 subdirectory. I don't know if this assembly function is called or not. Could it be a problem in the way parameters are passed to that assembly function?

Paul

comment:81 Changed 11 years ago by Jeroen Demeyer

Recompiling ecm with -O0 doesn't help.

comment:82 in reply to:  81 Changed 11 years ago by Paul Zimmermann

Replying to jdemeyer:

Recompiling ecm with -O0 doesn't help.

yes. I'll try with GMP-ECM 6.4.2 to see if the problem persists.

Paul

comment:83 Changed 11 years ago by Paul Zimmermann

I get the same SIGSEGV signal with GMP-ECM 6.4.2.

Paul

comment:84 Changed 11 years ago by Paul Zimmermann

I tried linking the GMP-ECM binary with the libecm.a and libgmp.a files produced by Sage, and then the same example works fine... No more idea for now.

Paul

comment:85 Changed 11 years ago by Paul Zimmermann

interesting, the segv only occurs for some inputs. For example the following works:

sage: ecmfactor(2^20-1,0.0)
(True, 33)

Paul

comment:86 Changed 11 years ago by Paul Zimmermann

I tried configuring GMP-ECM with -enable-assert, nothing wrong happens. I have no further idea to investigate. Any suggestion out there?

Of course a possible workaround would be to configure with --disable-asm-redc on powerpc64, but it would be nice to find the reason of this problem. Is there any other powerpc on which we could test?

What is strange is that the bug occurs inside libecm.a when called from within Sage, and does not occur when called from the binary GMP-ECM (with the same libecm.a). Maybe a memory corruption related to the ecm_params structure which is not really defined in libecm.pyx? Is it possible to link libecm dynamically to Sage?

Paul

comment:87 Changed 11 years ago by François Bissey

Ok so I applied the patch to beta10 and run the long test (in serial) and we have made a lot of progress:

        sage -t -long "devel/sage/doc/en/numerical_sage/cvxopt.rst"
        sage -t -long "devel/sage/sage/functions/special.py"
        sage -t -long "devel/sage/sage/graphs/graph_decompositions/vertex_separation.pyx"
        sage -t -long "devel/sage/sage/libs/libecm.pyx" # Killed/crashed
        sage -t -long "devel/sage/sage/numerical/optimize.py"
        sage -t -long "devel/sage/sage/plot/plot3d/list_plot3d.py"

I am applying #12777 next to see if that helps with libecm.

comment:88 Changed 11 years ago by Jeroen Demeyer

#12777 wasn't meant to solve this issue...

comment:89 Changed 11 years ago by François Bissey

And it indeed doesn't. I was just curious if it would help get a better report on the problem. It doesn't.

comment:90 Changed 11 years ago by Jeroen Demeyer

Authors: Paul Zimmermann, Jeroen Demeyer

comment:91 Changed 11 years ago by Jeroen Demeyer

I moved the mpfi patch to #12829. We should merge this patch, even though it doesn't solve all ppc64 problems. Paul, are you able to review it?

I had a quick look at the other ppc64 issues, but I couldn't immediately find out what the problem was.

comment:92 Changed 11 years ago by Jeroen Demeyer

Description: modified (diff)

comment:93 Changed 11 years ago by Jeroen Demeyer

Description: modified (diff)
Note: See TracTickets for help on using tickets.