Sage 3.2.rc0 released

5 views
Skip to first unread message

mabshoff

unread,
Nov 11, 2008, 7:24:49 AM11/11/08
to sage-devel
Hello folks,

here is 3.2.rc0 and I have to confess that I cheated: I did build this
on numerous platforms before announcing here (if you hung out in IRC
you knew about this release for about 6 hours now) and as it turns out
my caution was justified. Doctesting is broken with this release
unless you do the following:

./sage -sh
cd local/bin
hg update -C

After doing that doctesting works again. The issue is (again) releated
to -sdist and I should have a fix in rc1 shortly. The initial plan has
been shifted by about 5 days, so expect a releae by Thursday. We
merged some major features in rc0, specifically the new timeit doctest
code as well as Cython 0.10 and the RDF/CDF backend switch to numpy.
Expect some numerical noise doctest failures and some other related
known issues. Please report issues here and check trac for existing
tickerts. There was also some major setup.py surgery, so please report
any Sage library build issue. "sage -b" should be much faster and less
buggy than before, but .... ;) One issue you will see here is that we
no longer suppress warnings, so expect "sage -b" to be more noise.
While most of those are caused by Cython's code generator due to
unused variables there is definitely some stuff in there worth fixing.
If the noise level is too annoying we can turn on warning suppression
by default again.

Sources and a sage.math only binary can be found at

http://sage.math.washington.edu/home/mabshoff/release-cycles-3.2/

Cheers,

Michael

Merged in Sage 3.2.rc0:

#3310: Craig Citro, Gonzalo Tonaria: sage -b fails after touching
sage/libs/mwrank/{mwrank.pyx,wrap.cc} [Reviewed by Michael Abshoff]
#3476: Nick Alexander, Mike Hansen: save timeit information with sage -
t -timeit [Reviewed by Mike Hansen, Michael Abshoff]
#3498: Jason Grout: make numpy the backend for matrices over CDF and
RDF [Reviewed by Mike Hansen, Robert Bradshaw, Michael Abshoff]
#3580: Craig Citro, John Voight: ensure that totallyreal does not
import numpy on startup [Reviewed by John Voight, Craig Citro]
#3750: Karl-Dieter Crisman: Request for a "log" function for Sage
integers [Reviewed by Mike Hansen]
#4362: Dan Bump: Bug fixes in tableaux latex output [Reviewed by Mike
Hansen, Nicolas Thiery]
#4395: William Stein: Sage 3.1.4: magma related optional doctest
failure in sage/rings/quotient_ring.py [Reviewed by Michael Abshoff]
#4425: Karl-Dieter Crisman: sqrt(4) returns a SymbolicComposition
instead of the number 2! [Reviewed by William Stein]
#4443: Craig Citro: Massive prime_range speedup, arith* files cleanup
[Reviewed by John Cremona]
#4444: Craig Citro: Remove duplicate source names in setup.py
[Reviewed by Michael Abshoff]
#4448: Jason Grout: bug in interact with matrices [Reviewed by Mike
Hansen]
#4452: William Stein: optimize next_prime [Reviewed by Robert
Bradshaw]
#4455: Nicolas Thiery: bug in Coxeter matrix for type G2 [Reviewed by
Mike Hansen]
#4462: John Perry, Jason Grout: contour_plot defaults changed to fill,
affects implicit_plot [Reviewed by Mike Hansen]
#4467: Michael Abshoff: removed unused hanke library code [Reviwed by
Jon Hanke]
#4473: William Stein: loading file.sage that has a line "load foo.py"
is broken due to a missing import [Reviewed by Michael Abshoff]
#4476: Robert Bradshaw: Update to Cython 0.10 [Reviewed by Michael
Abshoff]
#4479: Timothy Clemans: sage/logic/logic.py contains a trivial typo: "
varaiable" [Reviewed by Minh Nguyen]

John H Palmieri

unread,
Nov 11, 2008, 2:27:09 PM11/11/08
to sage-devel
On Nov 11, 4:24 am, mabshoff <mabsh...@googlemail.com> wrote:
> Hello folks,
>
> here is 3.2.rc0 and I have to confess that I cheated: I did build this
> on numerous platforms before announcing here (if you hung out in IRC
> you knew about this release for about 6 hours now) and as it turns out
> my caution was justified. Doctesting is broken with this release
> unless you do the following:
>
>  ./sage -sh
>  cd local/bin
>  hg update -C

When I try to do the last line (on an intel mac running 10.5), I get
this:

abort: could not import module lookup!

Did I do something wrong?

John

mabshoff

unread,
Nov 11, 2008, 2:50:19 PM11/11/08
to sage-devel
Hmm, this is strange to say the least. Could you post more of a
backtrace if there is one? In case you have a system wide hg (or one
from another Sage install) you could try to use that.

> Did I do something wrong?
>
> John

Cheers,

Michael

Jaap Spies

unread,
Nov 11, 2008, 2:57:26 PM11/11/08
to sage-...@googlegroups.com

do:

./sage -sh
cd local/bin
./hg update -C

then

exit
make check

Jaap

John H Palmieri

unread,
Nov 11, 2008, 3:02:26 PM11/11/08
to sage-devel
Here's what happens:

(/Applications/sage) [11:26am]>> ./sage -sh

Starting subshell with Sage environment variables set.
Be sure to exit when you are done and do not do anything
with other copies of Sage!

(/Applications/sage) [11:58am]>> cd local/bin
(...local/bin) [11:58am]>> ./hg update -C
abort: could not import module lookup!

> then
>
> exit
> make check

As you might guess, doctesting fails at this point:

ImportError: No module named sagedoctest

Maybe I'll start over again from the tar file.

John

Jaap Spies

unread,
Nov 11, 2008, 3:04:57 PM11/11/08
to sage-...@googlegroups.com
> ../sage -sh
> cd local/bin
> ../hg update -C
>

sorry typo

./hg update -C

Jaap

mabshoff

unread,
Nov 11, 2008, 3:07:21 PM11/11/08
to sage-devel
So far so good.

> (/Applications/sage) [11:58am]>> cd local/bin
> (...local/bin) [11:58am]>> ./hg update -C
> abort: could not import module lookup!

mmh - can you try without the "./" since hg is in $PATH. What shell
are you using - even though this should not matter, but one never
knows.

> > then
>
> > exit
> > make check
>
> As you might guess, doctesting fails at this point:
>
> ImportError: No module named sagedoctest
>
> Maybe I'll start over again from the tar file.

That will not work since the issue is in the tarball itself. I am on
my way home, so I cannot post an updated rc1 until about 18 hours from
now. But I will make sure the issue is gone in rc1.

>   John

Cheers,

Michael

John H Palmieri

unread,
Nov 11, 2008, 3:15:20 PM11/11/08
to sage-devel
I did that first, same problem.

> What shell
> are you using - even though this should not matter, but one never
> knows.

Oh, this is the problem. I'm running tcsh (I got used to it years
ago, and keep deciding it's too much work to switch). When I switch
to bash, everything works.

John H Palmieri

unread,
Nov 11, 2008, 4:54:01 PM11/11/08
to sage-devel
> Expect some numerical noise doctest failures and some other related
> known issues. Please report issues here and check trac for existing
> tickets.

On an intel mac running 10.5 (after changing my stone-age shell :),
sage -testall has two or three problems:

the known numerical noise problem in wester.py (http://
trac.sagemath.org/sage_trac/ticket/4472)

an error in matrix_double_dense, which I couldn't find on trac (should
I create a ticket?):

sage -t devel/sage/sage/matrix/matrix_double_dense.pyx
**********************************************************************
File "/Applications/sage/devel/sage/sage/matrix/
matrix_double_dense.pyx", line 444:
sage: ~A
Expected:
Traceback (most recent call last):
...
LinAlgError: singular matrix
Got:
[-4.50359962737e+15 9.00719925474e+15 -4.50359962737e+15]
[ 9.00719925474e+15 -1.80143985095e+16 9.00719925474e+15]
[-4.50359962737e+15 9.00719925474e+15 -4.50359962737e+15]
**********************************************************************
File "/Applications/sage/devel/sage/sage/matrix/
matrix_double_dense.pyx", line 909:
sage: max((U*S*V.transpose()-m).list())<1e-15 # check
Expected:
True
Got:
False
**********************************************************************
2 items had failures:
1 of 11 in __main__.example_15
1 of 27 in __main__.example_26
***Test Failed*** 2 failures.

I also got this:

[ERROR]:
sage.dsage.twisted.tests.test_remote.WorkerRemoteCallsTest.testremote_get_job

Traceback (most recent call last):
Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was
unclean.
Selectables:
<Broker #0 on 65296>
-------------------------------------------------------------------------------
Ran 52 tests in 14.794s

FAILED (errors=1, successes=52)
However, an ERROR occurred in the Distributed Sage unit tests.

John

Jaap Spies

unread,
Nov 11, 2008, 6:08:47 PM11/11/08
to sage-...@googlegroups.com
mabshoff wrote:

>
> Sources and a sage.math only binary can be found at
>
> http://sage.math.washington.edu/home/mabshoff/release-cycles-3.2/
>

On Fedora 9, 32 bits the one and only failure:

sage -t devel/sage/sage/combinat/root_system/weyl_characters.py*** *** Error: TIMED OUT! *** ***
*** *** Error: TIMED OUT! *** ***
[435.4 s]

Surprising?

Jaap

mhampton

unread,
Nov 11, 2008, 11:30:57 PM11/11/08
to sage-devel
I got the same matrix_double_dense failure as J. Palmieri on intel
macs running 10.4 and 10.5, plus this one which only occured on the
10.5 machine:

sage -t devel/sage/sage/calculus/wester.py
**********************************************************************
File "/Users/mh/sagestuff/sage-3.2.rc0/devel/sage/sage/calculus/
wester.py", line 261:
: [float(f(i/10)) for i in range(1,5)]
Expected:
<BLANKLINE>
[-0.00033670040754082975,
-0.0027778004096620235,
-0.00989099409140...,
-0.025411145508414...]
Got:
[-0.00033670040754081587, -0.0027778004096621622,
-0.0098909940914039818, -0.025411145508414779]
**********************************************************************
1 items had failures:
1 of 193 in __main__.example_0
***Test Failed*** 1 failures.


-M. Hampton

Jaap Spies

unread,
Nov 12, 2008, 5:16:20 AM11/12/08
to sage-...@googlegroups.com
mabshoff wrote:
> Hello folks,

>
> Sources and a sage.math only binary can be found at
>
> http://sage.math.washington.edu/home/mabshoff/release-cycles-3.2/
>

On Fedora 8, 32 bits one test failure:

[jaap@peace sage-3.2.rc0]$ ./sage -t devel/sage/sage/combinat/species/library.py
sage -t devel/sage/sage/combinat/species/library.py sage -t
devel/sage/sage/combinat/species/library.pysage -t
devel/sage/sage/combinat/species/library.py**********************************************************************
File "/home/jaap/Download/sage-3.2.rc0/devel/sage/sage/combinat/species/library.py",
line 86:
sage: a.automorphism_group()
Expected:
Permutation Group with generators [(), ()]
Got:
Permutation Group with generators [()]


**********************************************************************
1 items had failures:

1 of 9 in __main__.example_1
***Test Failed*** 1 failures.
For whitespace errors, see the file
/home/jaap/Download/sage-3.2.rc0/tmp/.doctest_library.py
[11.5 s]
exit code: 1024

----------------------------------------------------------------------
The following tests failed:


sage -t devel/sage/sage/combinat/species/library.py
Total time for all tests: 11.5 seconds


Jaap

Craig Citro

unread,
Nov 12, 2008, 7:09:46 AM11/12/08
to sage-...@googlegroups.com
Hi all,

So there's one annoying new problem with rc0, and it's partly my
fault. Here's the issue: if you do a fresh build, and then clone, it's
going to do a sage -ba. The underlying problem is coming from the way
trac #4500 (which is a genuine bug) interacts with our new build
system. I'll fix it in the morning, but if you want to use rc0 in the
interim, here's an easy workaround: type sage -b, and hit ctrl-c as
soon as it's done copying files over. Then cd
$SAGE_ROOT/devel/sage-main/build, and do:

find . -name *.o | xargs touch

What those two commands together do is copy all the cython files in
the sage library into the build directory, and then touch the object
files so nothing needs rebuilt. This is fine, because if you've built
from source, you just built all these files anyway.

Once you do this once, everything is back to normal.

-cc

Jason Grout

unread,
Nov 12, 2008, 9:41:41 AM11/12/08
to sage-...@googlegroups.com
John H Palmieri wrote:
>> Expect some numerical noise doctest failures and some other related
>> known issues. Please report issues here and check trac for existing
>> tickets.
>
> On an intel mac running 10.5 (after changing my stone-age shell :),
> sage -testall has two or three problems:
>
> the known numerical noise problem in wester.py (http://
> trac.sagemath.org/sage_trac/ticket/4472)
>
> an error in matrix_double_dense, which I couldn't find on trac (should
> I create a ticket?):
>
> sage -t devel/sage/sage/matrix/matrix_double_dense.pyx
> **********************************************************************
> File "/Applications/sage/devel/sage/sage/matrix/
> matrix_double_dense.pyx", line 444:
> sage: ~A
> Expected:
> Traceback (most recent call last):
> ...
> LinAlgError: singular matrix
> Got:
> [-4.50359962737e+15 9.00719925474e+15 -4.50359962737e+15]
> [ 9.00719925474e+15 -1.80143985095e+16 9.00719925474e+15]
> [-4.50359962737e+15 9.00719925474e+15 -4.50359962737e+15]


Hmm. This code was just moved to a numpy backend. Scipy correctly saw
this matrix as singular on my system. However, it looks like you are
seeing a spurious inverse, most likely due to numerical issues.

Could you post the output of the following commands:

sage: A = matrix(RDF,3,range(1,10));A
sage: A.determinant()
sage: ~A
sage: b=A.numpy(); b
sage: import scipy
sage: import scipy.linalg
sage: scipy.linalg.det(b)
sage: scipy.linalg.inv(b)


> **********************************************************************
> File "/Applications/sage/devel/sage/sage/matrix/
> matrix_double_dense.pyx", line 909:
> sage: max((U*S*V.transpose()-m).list())<1e-15 # check
> Expected:
> True
> Got:
> False

Again, could you post the output of the following commands:


sage: m = matrix(RDF,3,2,range(6)); m
sage: U,S,V = m.SVD()
sage: U*S*V.transpose() # random low order bits

Thanks,

Jason

John H Palmieri

unread,
Nov 12, 2008, 10:45:35 AM11/12/08
to sage-devel
On Nov 12, 6:41 am, Jason Grout <jason-s...@creativetrax.com> wrote:
> John H Palmieri wrote:
[1.0 2.0 3.0]
[4.0 5.0 6.0]
[7.0 8.0 9.0]
sage: A.determinant()
0.0
sage: -A

[-1.0 -2.0 -3.0]
[-4.0 -5.0 -6.0]
[-7.0 -8.0 -9.0]
sage: b = A.numpy(); b

array([[ 1., 2., 3.],
[ 4., 5., 6.],
[ 7., 8., 9.]])
sage: import scipy
sage: import scipy.linalg
sage: scipy.linalg.det(b)
0.0
sage: scipy.linalg.inv(b)

array([[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15],
[ 9.00719925e+15, -1.80143985e+16, 9.00719925e+15],
[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15]])

That last pair of results looks suspicious, doesn't it?

> > **********************************************************************
> > File "/Applications/sage/devel/sage/sage/matrix/
> > matrix_double_dense.pyx", line 909:
> >     sage: max((U*S*V.transpose()-m).list())<1e-15 # check
> > Expected:
> >     True
> > Got:
> >     False
>
> Again, could you post the output of the following commands:
>
> sage: m = matrix(RDF,3,2,range(6)); m
> sage: U,S,V = m.SVD()
> sage: U*S*V.transpose()   # random low order bits

sage: m = matrix(RDF,3,2,range(6)); m

[0.0 1.0]
[2.0 3.0]
[4.0 5.0]
sage: U,S,V = m.SVD()
sage: U*S*V.transpose() # random low order bits

[0.0 1.0]
[2.0 3.0]
[4.0 5.0]

max((U*S*V.transpose()-m).list())
1.7763568394e-15


John

Jason Grout

unread,
Nov 12, 2008, 11:20:03 AM11/12/08
to sage-...@googlegroups.com
John H Palmieri wrote:
> On Nov 12, 6:41 am, Jason Grout <jason-s...@creativetrax.com> wrote:
>> John H Palmieri wrote:
>>> an error in matrix_double_dense, which I couldn't find on trac (should
>>> I create a ticket?):

Yes, please create tickets for both of these errors.


> sage: scipy.linalg.det(b)
> 0.0
> sage: scipy.linalg.inv(b)
>
> array([[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15],
> [ 9.00719925e+15, -1.80143985e+16, 9.00719925e+15],
> [ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15]])
>
> That last pair of results looks suspicious, doesn't it?

Yes, very much so. Any comments from anyone on what might be going on?
I wonder if it is a 32/64 bit issue. I'll submit this to the numpy
list as well.


> max((U*S*V.transpose()-m).list())
> 1.7763568394e-15


Okay, apparently the doctest just needs a looser bound; what you get is
still within reason for numerical issues. Currently we see if that
maximum is < 1e-15. Changing it to 1e-14 should fix this.

Jason

John H Palmieri

unread,
Nov 12, 2008, 12:55:37 PM11/12/08
to sage-devel
On Nov 12, 8:20 am, Jason Grout <jason-s...@creativetrax.com> wrote:
> John H Palmieri wrote:
> > On Nov 12, 6:41 am, Jason Grout <jason-s...@creativetrax.com> wrote:
> >> John H Palmieri wrote:
> >>> an error in matrix_double_dense, which I couldn't find on trac (should
> >>> I create a ticket?):
>
> Yes, please create tickets for both of these errors.

<http://trac.sagemath.org/sage_trac/ticket/4502>
<http://trac.sagemath.org/sage_trac/ticket/4503>

John

Jason Grout

unread,
Nov 12, 2008, 2:46:32 PM11/12/08
to sage-...@googlegroups.com

One more time, could you do the following sequence of commands so that I
can report them to the numpy mailing list. I've left the output from my
run; it's interesting that the numpy.linalg.inv on my computer gives the
same ridiculous answers that your scipy.linalg.inv command gives. It
looks like it is scaling by dividing by the determinant or something.

sage: import numpy
sage: a=numpy.array([[1,2,3],[4,5,6],[7,8,9]],dtype="float64")


sage: import scipy
sage: import scipy.linalg

sage: import numpy.linalg
sage: scipy.linalg.det(a)
0.0
sage: scipy.linalg.inv(a)
---------------------------------------------------------------------------
LinAlgError Traceback (most recent call
[snip]
LinAlgError: singular matrix
sage: numpy.linalg.det(a)
-1.3325928902019335e-15
sage: numpy.linalg.inv(a)

array([[ 2.25125019e+15, -4.50250038e+15, 2.25125019e+15],
[ -4.50250038e+15, 9.00500077e+15, -4.50250038e+15],
[ 2.25125019e+15, -4.50250038e+15, 2.25125019e+15]])


Thanks,

Jason

Craig Citro

unread,
Nov 12, 2008, 2:59:42 PM11/12/08
to sage-...@googlegroups.com
Actually, I have a numpy question, and since we're on the topic ...

The following is somewhat frustrating:

sage: R = RDF['x']
sage: f = R([4, 4, 1, 4, 2, 0, 1])
sage: f.roots(algorithm='pari')
[(-1.0, 1), (-1.0, 1)]

sage: f.roots() # uses numpy
[]
sage: import numpy
sage: numpy.roots(f.reverse().list())
array([ 0.50000001 +1.32287567e+00j, 0.50000001 -1.32287567e+00j,
0.49999999 +1.32287564e+00j, 0.49999999 -1.32287564e+00j,
-1.00000000 +1.79471980e-08j, -1.00000000 -1.79471980e-08j])

I assume this comes down to the following:

sage: [ numpy.isreal(x) for x in numpy.roots(f.reverse().list()) ]
[False, False, False, False, False, False]

What's the easiest parameter to adjust so that we get those roots?

Note: this polynomial is clearly bad for a certain reason, namely that
it's the square of another polynomial.

-cc

Jason Grout

unread,
Nov 12, 2008, 7:28:09 PM11/12/08
to sage-...@googlegroups.com


I get the same error (using bash) when trying to doctest a file:

$ sage -t graph.py
sage -t devel/sage-main/sage/graphs/graph.py Traceback
(most recent call last):
File "/home/jason/sage/tmp/.doctest_graph.py", line 6598, in <module>
import sagedoctest


ImportError: No module named sagedoctest

[4.6 s]
exit code: 1024

----------------------------------------------------------------------
The following tests failed:


sage -t devel/sage-main/sage/graphs/graph.py
Total time for all tests: 4.6 seconds

I built sage 3.2.rc0 from scratch.

Jason

mabshoff

unread,
Nov 12, 2008, 7:31:07 PM11/12/08
to sage-devel


On Nov 12, 4:28 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
> John H Palmieri wrote:

<SNIP>

> > Oh, this is the problem.  I'm running tcsh (I got used to it years
> > ago, and keep deciding it's too much work to switch).  When I switch
> > to bash, everything works.
>
> I get the same error (using bash) when trying to doctest a file:
>
> $ sage -t graph.py
> sage -t  devel/sage-main/sage/graphs/graph.py               Traceback
> (most recent call last):
>    File "/home/jason/sage/tmp/.doctest_graph.py", line 6598, in <module>
>      import sagedoctest
> ImportError: No module named sagedoctest
>
>          [4.6 s]
> exit code: 1024

Did you do the "hg update -H" in the local/bin repo?

Cheers,

Michael

John H Palmieri

unread,
Nov 12, 2008, 8:01:00 PM11/12/08
to sage-devel
> One more time, could you do the following sequence of commands so that I
> can report them to the numpy mailing list.  I've left the output from my
> run; it's interesting that the numpy.linalg.inv on my computer gives the
> same ridiculous answers that your scipy.linalg.inv command gives.  It
> looks like it is scaling by dividing by the determinant or something.
>
> sage: import numpy
> sage: a=numpy.array([[1,2,3],[4,5,6],[7,8,9]],dtype="float64")
> sage: import scipy
> sage: import scipy.linalg
> sage: import numpy.linalg
> sage: scipy.linalg.det(a)
> 0.0
> sage: scipy.linalg.inv(a)
> ---------------------------------------------------------------------------
> LinAlgError                               Traceback (most recent call
> [snip]
> LinAlgError: singular matrix
> sage: numpy.linalg.det(a)
> -1.3325928902019335e-15
> sage: numpy.linalg.inv(a)
>
> array([[  2.25125019e+15,  -4.50250038e+15,   2.25125019e+15],
>         [ -4.50250038e+15,   9.00500077e+15,  -4.50250038e+15],
>         [  2.25125019e+15,  -4.50250038e+15,   2.25125019e+15]])

I get this:

sage: scipy.linalg.det(a)
0.0
sage: scipy.linalg.inv(a)

array([[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15],
[ 9.00719925e+15, -1.80143985e+16, 9.00719925e+15],
[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15]])
sage: numpy.linalg.det(a)
6.6613381477509392e-16
sage: numpy.linalg.inv(a)

array([[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15],
[ 9.00719925e+15, -1.80143985e+16, 9.00719925e+15],
[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15]])

John

Jason Grout

unread,
Nov 12, 2008, 8:02:50 PM11/12/08
to sage-...@googlegroups.com
mabshoff wrote:
>
>
> On Nov 12, 4:28 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
>> John H Palmieri wrote:
>
> <SNIP>
>
>>> Oh, this is the problem. I'm running tcsh (I got used to it years
>>> ago, and keep deciding it's too much work to switch). When I switch
>>> to bash, everything works.
>> I get the same error (using bash) when trying to doctest a file:
>>
>> $ sage -t graph.py
>> sage -t devel/sage-main/sage/graphs/graph.py Traceback
>> (most recent call last):
>> File "/home/jason/sage/tmp/.doctest_graph.py", line 6598, in <module>
>> import sagedoctest
>> ImportError: No module named sagedoctest
>>
>> [4.6 s]
>> exit code: 1024
>
> Did you do the "hg update -H" in the local/bin repo?


Oops, that took care of it. Sorry for the noise.

Jason

Jason Grout

unread,
Nov 12, 2008, 9:46:00 PM11/12/08
to sage-...@googlegroups.com
John H Palmieri wrote:


> sage: scipy.linalg.det(a)
> 0.0
> sage: scipy.linalg.inv(a)
>
> array([[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15],
> [ 9.00719925e+15, -1.80143985e+16, 9.00719925e+15],
> [ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15]])
> sage: numpy.linalg.det(a)
> 6.6613381477509392e-16
> sage: numpy.linalg.inv(a)
>
> array([[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15],
> [ 9.00719925e+15, -1.80143985e+16, 9.00719925e+15],
> [ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15]])

I was about to post to the appropriate mailing list, but realized that
we never updated scipy (I thought we had). That means we are running
scipy code from over a year ago. Now, they haven't had a new release in
over a year, but we should probably update to SVN at least before
complaining about this error.

For now, we can check to see if the determinant (the scipy.linalg.det
determinant) is zero. If it is, throw the singular matrix error.

Jason

Ronan Paixão

unread,
Nov 13, 2008, 11:03:56 AM11/13/08
to sage-...@googlegroups.com

> > sage: numpy.linalg.inv(a)
> >
> > array([[ 2.25125019e+15, -4.50250038e+15, 2.25125019e+15],
> > [ -4.50250038e+15, 9.00500077e+15, -4.50250038e+15],
> > [ 2.25125019e+15, -4.50250038e+15, 2.25125019e+15]])
>
> I get this:

> sage: scipy.linalg.inv(a)


>
> array([[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15],
> [ 9.00719925e+15, -1.80143985e+16, 9.00719925e+15],
> [ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15]])

Some notes:
Scipy uses numpy as its backend

The numerical noise problem is probably something deeper, because it
doesn't affect only the results of inv(), but others as well, like when
trying to get the autovalues matrix after obtaining the eigenvectors
matrix. In Ipython:

In [34]: from pylab import *

In [35]: k = array([[1,2,4],[4,7,5],[8,7,9]],dtype='float64')

In [36]: lambdas, P = eig(k)

In [37]: dot(P.T,dot(k,P))
Out[37]:
array([[ 16.47731777, 0.48505536, -0.12297265],
[ -4.20177431, -1.90215152, 0.03248141],
[ -0.8356282 , -0.02547992, 2.42483375]])

In [38]: lambdas
Out[38]: array([ 16.47731777, -1.90215152, 2.42483375])

One can see the main diagonal fits the autovalues right, but the other
elements should be zero, when one of them gets to a significant value
(-4 is even greater in modulus than two of the autovalues)

Ronan

Justin C. Walker

unread,
Nov 13, 2008, 3:33:49 PM11/13/08
to sage-...@googlegroups.com

On Nov 11, 2008, at 04:24 , mabshoff wrote:

>
> Hello folks,
[snip]


>
> Sources and a sage.math only binary can be found at
>
> http://sage.math.washington.edu/home/mabshoff/release-cycles-3.2/

Built w/o problems on Mac OS X, 10.5.5 (Dual Quad Xeon). Testing
revealed two failures (see below).

Built w/o problems on Mac OS X, 10.4.11 (Core 2 Duo). Testing
revealed two failures (see below), one of which is in the dsage
tests. How do I rerun that test w/o running the whole doctest?

Justin

Output from tests follows (separated by '===')
=
=
========================================================================
Mac OS X, 10.5.5 failures:

sage -t devel/sage/sage/calculus/wester.py

**********************************************************************
File "/Users/tmp/sage-3.2.rc0/devel/sage/sage/calculus/

wester.py", line 261:
: [float(f(i/10)) for i in range(1,5)]
Expected:
<BLANKLINE>
[-0.00033670040754082975,
-0.0027778004096620235,
-0.00989099409140...,
-0.025411145508414...]
Got:
[-0.00033670040754081587, -0.0027778004096621622,
-0.0098909940914039818, -0.025411145508414779]

**********************************************************************
1 items had failures:

1 of 193 in __main__.example_0
***Test Failed*** 1 failures.
For whitespace errors, see the file /Users/tmp/sage-3.2.rc0/
tmp/.doctest_wester.py
[9.0 s]


sage -t devel/sage/sage/matrix/matrix_double_dense.pyx

**********************************************************************
File "/Users/tmp/sage-3.2.rc0/devel/sage/sage/matrix/

matrix_double_dense.pyx", line 444:
sage: ~A
Expected:

Traceback (most recent call last):

...
LinAlgError: singular matrix
Got:
[-4.50359962737e+15 9.00719925474e+15 -4.50359962737e+15]
[ 9.00719925474e+15 -1.80143985095e+16 9.00719925474e+15]
[-4.50359962737e+15 9.00719925474e+15 -4.50359962737e+15]

**********************************************************************
File "/Users/tmp/sage-3.2.rc0/devel/sage/sage/matrix/

matrix_double_dense.pyx", line 909:
sage: max((U*S*V.transpose()-m).list())<1e-15 # check
Expected:
True
Got:
False

**********************************************************************
2 items had failures:


1 of 11 in __main__.example_15
1 of 27 in __main__.example_26

***Test Failed*** 2 failures.
For whitespace errors, see the file /Users/tmp/sage-3.2.rc0/
tmp/.doctest_matrix_double_dense.py
[2.0 s]

=
=
========================================================================
Mac OS X, 10.4.11 failures:

WorkerRemoteCallsTest

testget_killed_jobs_list ...
[OK]

testremote_get_job ...
[OK]

testremote_job_done ...
[OK]
[ERROR]

testremote_job_failed ...
[OK]


=
=
=
=
========================================================================
[ERROR]:
sage
.dsage.twisted.tests.test_remote.WorkerRemoteCallsTest.testremote_job_d
one

Traceback (most recent call last):

Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor
was unclean.
Selectables:

<Broker #0 on 56553>

----------------------------------------------------------------------------
Ran 52 tests in 10.975s

FAILED (errors=1, successes=52)
However, an ERROR occurred in the Distributed Sage unit tests.

sage -t devel/sage/sage/matrix/matrix_double_dense.pyx

**********************************************************************
File "/Users/tmp/sage-3.2.rc0/devel/sage/sage/matrix/

matrix_double_dense.pyx", line
444:
sage: ~A
Expected:

Traceback (most recent call last):

...
LinAlgError: singular matrix
Got:
[-4.50359962737e+15 9.00719925474e+15 -4.50359962737e+15]
[ 9.00719925474e+15 -1.80143985095e+16 9.00719925474e+15]
[-4.50359962737e+15 9.00719925474e+15 -4.50359962737e+15]

**********************************************************************
File "/Users/tmp/sage-3.2.rc0/devel/sage/sage/matrix/

matrix_double_dense.pyx", line
909:
sage: max((U*S*V.transpose()-m).list())<1e-15 # check
Expected:
True
Got:
False

**********************************************************************

=
=
========================================================================

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
Experience is what you get
when you don't get what you want.
--------

David Joyner

unread,
Nov 14, 2008, 9:10:29 AM11/14/08
to sage-...@googlegroups.com
I know this is late, but all tests passed and the build went fine on
my work machine, which runs amd64 hardy heron.


On Tue, Nov 11, 2008 at 7:24 AM, mabshoff <mabs...@googlemail.com> wrote:
>
> Hello folks,
>
> here is 3.2.rc0 and I have to confess that I cheated: I did build this
> on numerous platforms before announcing here (if you hung out in IRC
> you knew about this release for about 6 hours now) and as it turns out
> my caution was justified. Doctesting is broken with this release
> unless you do the following:
>
> ./sage -sh
> cd local/bin
> hg update -C
>
> After doing that doctesting works again. The issue is (again) releated
> to -sdist and I should have a fix in rc1 shortly. The initial plan has
> been shifted by about 5 days, so expect a releae by Thursday. We
> merged some major features in rc0, specifically the new timeit doctest
> code as well as Cython 0.10 and the RDF/CDF backend switch to numpy.
> Expect some numerical noise doctest failures and some other related
> known issues. Please report issues here and check trac for existing
> tickerts. There was also some major setup.py surgery, so please report
> any Sage library build issue. "sage -b" should be much faster and less
> buggy than before, but .... ;) One issue you will see here is that we
> no longer suppress warnings, so expect "sage -b" to be more noise.
> While most of those are caused by Cython's code generator due to
> unused variables there is definitely some stuff in there worth fixing.
> If the noise level is too annoying we can turn on warning suppression
> by default again.
>
> Sources and a sage.math only binary can be found at
>
> http://sage.math.washington.edu/home/mabshoff/release-cycles-3.2/
>
> Cheers,
>
> Michael
>
> Merged in Sage 3.2.rc0:
>
> #3310: Craig Citro, Gonzalo Tonaria: sage -b fails after touching
> sage/libs/mwrank/{mwrank.pyx,wrap.cc} [Reviewed by Michael Abshoff]
> #3476: Nick Alexander, Mike Hansen: save timeit information with sage -
> t -timeit [Reviewed by Mike Hansen, Michael Abshoff]
> #3498: Jason Grout: make numpy the backend for matrices over CDF and
> RDF [Reviewed by Mike Hansen, Robert Bradshaw, Michael Abshoff]
> #3580: Craig Citro, John Voight: ensure that totallyreal does not
> import numpy on startup [Reviewed by John Voight, Craig Citro]
> #3750: Karl-Dieter Crisman: Request for a "log" function for Sage
> integers [Reviewed by Mike Hansen]
> #4362: Dan Bump: Bug fixes in tableaux latex output [Reviewed by Mike
> Hansen, Nicolas Thiery]
> #4395: William Stein: Sage 3.1.4: magma related optional doctest
> failure in sage/rings/quotient_ring.py [Reviewed by Michael Abshoff]
> #4425: Karl-Dieter Crisman: sqrt(4) returns a SymbolicComposition
> instead of the number 2! [Reviewed by William Stein]
> #4443: Craig Citro: Massive prime_range speedup, arith* files cleanup
> [Reviewed by John Cremona]
> #4444: Craig Citro: Remove duplicate source names in setup.py
> [Reviewed by Michael Abshoff]
> #4448: Jason Grout: bug in interact with matrices [Reviewed by Mike
> Hansen]
> #4452: William Stein: optimize next_prime [Reviewed by Robert
> Bradshaw]
> #4455: Nicolas Thiery: bug in Coxeter matrix for type G2 [Reviewed by
> Mike Hansen]
> #4462: John Perry, Jason Grout: contour_plot defaults changed to fill,
> affects implicit_plot [Reviewed by Mike Hansen]
> #4467: Michael Abshoff: removed unused hanke library code [Reviwed by
> Jon Hanke]
> #4473: William Stein: loading file.sage that has a line "load foo.py"
> is broken due to a missing import [Reviewed by Michael Abshoff]
> #4476: Robert Bradshaw: Update to Cython 0.10 [Reviewed by Michael
> Abshoff]
> #4479: Timothy Clemans: sage/logic/logic.py contains a trivial typo: "
> varaiable" [Reviewed by Minh Nguyen]
> >
>
Reply all
Reply to author
Forward
0 new messages