do:
./sage -sh
cd local/bin
./hg update -C
then
exit
make check
Jaap
sorry typo
./hg update -C
Jaap
>
> 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
>
> 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
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
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
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
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
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
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
Oops, that took care of it. Sorry for the noise.
Jason
> 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
> 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
>
> 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.
--------