2011/1/27 François Bissey <francois.bis...@canterbury.ac.nz>:
> Hi all,

  I am delaying a Mandriva sagemath 4.6.1 due to related reasons,
and may not release it if sagemath 4.6.2 is released soon :-). Since
Mandriva cooker is using python 2.7.1 and cython 0.14, I needed to
use a custom cython 0.13, but am trying to correct some issues with
python, to use python 2.7.1.


  Just adding unittest.py from python2.6 to PYTHONPATH, that points
to /usr/share/sage/site-packages corrected like 90% of the problems,
but just now I got this one in
sage/rings/polynomial/polynomial_quotient_ring_element.py

[[ cut&paste of test case in sage under a python in gdb
  slightly different than sage -gdb, but effectively the same ]]
-%<-
sage: R.<x> = PolynomialRing(QQ)
sage:             sage: S.<a> = R.quotient(x^3-2)
sage:             sage: int(S(10))
10
sage: int(a)
Fatal Python error: GC object already tracked

Program received signal SIGABRT, Aborted.
[...]
0x00007ffff74c4075 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff74c4075 in raise () from /lib64/libc.so.6
#1  0x00007ffff74c5806 in abort () from /lib64/libc.so.6
#2  0x00007ffff7b1c9de in Py_FatalError (msg=<value optimized out>)
    at Python/pythonrun.c:1670
#3  0x00007ffff7a8c76e in PyFrame_New (tstate=0x6020a0,
    code=<value optimized out>, globals=0x998f50, locals=<value optimized out>)
    at Objects/frameobject.c:742
#4  0x00007ffff7b00d67 in PyEval_EvalCodeEx (co=0x95f5b0,
    globals=<value optimized out>, locals=<value optimized out>, args=
    0x2265e08, argcount=4, kws=0x2265e28, kwcount=0, defs=0x814d28, defcount=
    5, closure=0x0) at Python/ceval.c:3032
#5  0x00007ffff7aff835 in fast_function (f=<value optimized out>,
    throwflag=<value optimized out>) at Python/ceval.c:4108
#6  call_function (f=<value optimized out>, throwflag=<value optimized out>)
    at Python/ceval.c:4033
[...]

> so it's that time again where I look at how "easy" it would be to update
> various pieces of sage to the latest upstream. The tests were performed
> on a linux machine running in 64 bit (amd64) based on 4.6.2.alpha2.
>
> numpy-1.5.1: upgrade quite nicely, just two doctests broken by a new warning
> from numpy:
> sage -t  -force_lib "devel/sage/sage/calculus/interpolators.pyx"
> **********************************************************************
> File
> "/home/gnuke/gentoo/usr/share/sage/devel/sage/sage/calculus/interpolators.pyx",
> line 52:
>    sage: m = Riemann_Map([lambda x: ps.value(x)], [lambda x:
> ps.derivative(x)],0)
> Expected nothing
> Got:
>    doctest:1: ComplexWarning: Casting complex values to real discards the
> imaginary part
> **********************************************************************

I see these too, but like this:

sage -t  -force_lib
"/usr/lib64/python2.7/site-packages/sage/calculus/interpolators.pyx"
 [?1034hWarning: invalid value encountered in divide
Warning: invalid value encountered in divide
<<<<<< last line repeats at least more 300 times >>>>>>
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/calculus/interpolators.pyx",
line 52:
    sage: m = Riemann_Map([lambda x: ps.value(x)], [lambda x:
ps.derivative(x)],0)
Expected nothing
Got:
    doctest:1: ComplexWarning: Casting complex values to real discards
the imaginary part


> File
> "/home/gnuke/gentoo/usr/share/sage/devel/sage/sage/calculus/interpolators.pyx",
> line 183:
>    sage: m = Riemann_Map([lambda x: cs.value(x)], [lambda x:
> cs.derivative(x)], 0)
> Expected nothing
> Got:
>    doctest:1: ComplexWarning: Casting complex values to real discards the
> imaginary part
> **********************************************************************
>
> Harmless and easy to correct.
>
> ecl-11.1.1/maxima-5.23.2
> Lots of numerical noise and a bit of formatting. Mostly due to ecl as
> downgrading maxima to 5.22.1 but keeping ecl-11.1.1 doesn't change the results
> of the tests. 6 files are affected in total.
>
> gfan-0.5: that's very bad.

  I have "gfan-0.4plus" packaged, so, do not see this one...

> sage -t  "devel/sage-main/sage/rings/polynomial/groebner_fan.py"
> [?1034h**********************************************************************
> File "/usr/share/sage/devel/sage-main/sage/rings/polynomial/groebner_fan.py",
> line 44:
>    sage: g.reduced_groebner_bases()
> Exception raised:
>    Traceback (most recent call last):
>      File "/usr/bin/ncadoctest.py", line 1231, in run_one_test
>        self.run_one_example(test, example, filename, compileflags)
>      File "/usr/bin/sagedoctest.py", line 38, in run_one_example
>        OrigDocTestRunner.run_one_example(self, test, example, filename,
> compileflags)
>      File "/usr/bin/ncadoctest.py", line 1172, in run_one_example
>        compileflags, 1) in test.globs
>      File "", line 1, in
>        g.reduced_groebner_bases()###line 44:
>    sage: g.reduced_groebner_bases()
>      File "/usr/lib64/python2.6/site-
> packages/sage/rings/polynomial/groebner_fan.py", line 696, in
> reduced_groebner_bases
>        G = self._gfan_reduced_groebner_bases()
>      File "/usr/lib64/python2.6/site-
> packages/sage/rings/polynomial/groebner_fan.py", line 647, in
> _gfan_reduced_groebner_bases
>        B = self.gfan()
>      File "/usr/lib64/python2.6/site-
> packages/sage/rings/polynomial/groebner_fan.py", line 755, in gfan
>        s = gfan(I, cmd, verbose=self.__verbose, format=format)
>      File "/usr/lib64/python2.6/site-packages/sage/interfaces/gfan.py", line
> 67, in __call__
>        raise RuntimeError, err
>    RuntimeError: This is the Gfan program for computing Groebner fans and
> tropical varieties.
>    Use the command "gfan list" to view all subcommands.
>    The command "gfan" is deprecate for computing all Groebner bases of an
> ideal.
>    Please use subcommand "gfan _bases" instead. Awaiting input. -D to end.
>    LP algorithm being used: "cddgmp".
>
>
> And it goes on as almost every single test in that file fails... 4 files 
> affected
> in total.
>
> mpfi-1.5: a number of tests fail in interesting ways:
> sage -t -long "devel/sage/sage/rings/qqbar.py"
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/qqbar.py", line 3808:
>    sage: (x-2).real_exact(RR)
> Expected:
>    0.000000000000000
> Got:
>    -0.000000000000000
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/qqbar.py", line 3810:
>    sage: (x-2).real_exact(RealField(53, rnd='RNDD'))
> Expected:
>    0.000000000000000
> Got:
>    -0.000000000000000
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/qqbar.py", line 3812:
>    sage: (x-2).real_exact(RealField(53, rnd='RNDU'))
> Expected:
>    0.000000000000000
> Got:
>    -0.000000000000000
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/qqbar.py", line 3814:
>    sage: (x-2).real_exact(RealField(53, rnd='RNDZ'))
> Expected:
>    0.000000000000000
> Got:
>    -0.000000000000000
> **********************************************************************
> 1 items had failures:
>   4 of  20 in __main__.example_96
> ***Test Failed*** 4 failures.
>
> Nothing much to say there. But as possible consequence of these
> sign flipping we also have these failures:
>  sage -t -long "devel/sage/sage/rings/real_mpfi.pyx"
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/real_mpfi.pyx", line 1078:
>    sage: b = R(1)/R(0); b
> Expected:
>    [+infinity .. +infinity]
> Got:
>    [-infinity .. +infinity]
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/real_mpfi.pyx", line 1080:
>    sage: loads(dumps(b)) == b
> Expected:
>    True
> Got:
>    False
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/real_mpfi.pyx", line 1082:
>    sage: b = R(-1)/R(0); b
> Expected:
>    [-infinity .. -infinity]
> Got:
>    [-infinity .. +infinity]
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/real_mpfi.pyx", line 1084:
>    sage: loads(dumps(b)) == b
> Expected:
>    True
> Got:
>    False
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/real_mpfi.pyx", line 2360:
>    sage: R(1)/R(0)
> Expected:
>    [+infinity .. +infinity]
> Got:
>    [-infinity .. +infinity]
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/real_mpfi.pyx", line 3217:
>    sage: RIF(-1, 1).min(0).endpoints()
> Expected:
>    (-1.00000000000000, 0.000000000000000)
> Got:
>    (-1.00000000000000, -0.000000000000000)
> **********************************************************************
> File "/usr/share/sage/devel/sage/sage/rings/real_mpfi.pyx", line 3221:
>    sage: RIF(-1, 1).min(0).endpoints()
> Expected:
>    (-1.00000000000000, 0.000000000000000)
> Got:
>    (-1.00000000000000, -0.000000000000000)
> **********************************************************************
> 3 items had failures:
>   4 of  18 in __main__.example_29
>   1 of   8 in __main__.example_55
>   2 of   9 in __main__.example_80
> ***Test Failed*** 7 failures.
>
> I should also mention that sage works well with mpfi-1.4

  Yes, and I also do not have this problem because of not updating
it...

  A good share of packages I only update when sagemath updates,
but other packages are updated by other people, or, I myself would
update to latest upstream, but in the case of sage, I would first
test...

  I also get a massive number of rounding ones, like:
-%<-
File "/usr/share/sage/devel/sage/sage/finance/time_series.pyx", line 1550:
    sage: v.variance()
Expected:
    0.80000000000000004
Got:
    0.8
-%<-

File "/usr/share/sage/devel/sage/sage/finance/markov_multifractal.py", line 99:
    sage: msm.m0()
Expected:
    1.3999999999999999
Got:
    1.4
-%<-
File 
"/usr/share/sage/devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py",
line 2134:
    sage: F.CPS_height_bound()
Expected:
    0.65551583769728516
Got:
    0.6555158376972852
-%<-

> Francois

Paulo

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to