I compiled sage 4.7.2 (and eventually use the new make micro_install
option) on my Live CD base distro. But I got some doctest failures.
With two of them I get different correct  solutions compared to the
solutions in the doctests. Other failures seem specific for my setup.
Could you give me advice or hints how those could be be fixed (I'd
like to have zero doctest failures)? Or at least give an expert
assessment if those failures are critical?

some info:
md5sum of source download was correct
I use gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
Kernel 2.6.33.2
2xIntel Duo E4600 CPU@2.4 Ghz / 1 GB RAM

- failure 1 -------------

sage -t -force_lib "devel/sage/doc/en/thematic_tutorials/
linear_programming.rst"
**********************************************************************
File "/mnt/sda6/COMPILE/sage-4.7.2/devel/sage/doc/en/
thematic_tutorials/linear_programming.rst", line 366:
    sage: [e for e,b in matching.iteritems() if b == 1]
Expected:
    [(0, 1), (6, 9), (2, 7), (3, 4), (5, 8)]
Got:
    [(1, 6), (0, 4), (2, 3), (5, 8), (7, 9)]
**********************************************************************

1 items had failures:
   1 of  11 in __main__.example_2
***Test Failed*** 1 failures.
For whitespace errors, see the file /root/.sage//tmp/
linear_programming_3381.py
         [3.2 s]

This is about finding a matching set in the Peterson graph. I read
about it and this is obviously an alternativ solution compared to the
one in the doctest.
Out of symmetrie reasons there are still other possibilities to solve
this.
Would it makes sence to choose doctests with unique solutions? Or does
this result points out that something is seriously odd in my system?


- failure 2 ---------------

sage -t -force_lib "devel/sage/sage/structure/sage_object.pyx"
**********************************************************************
File "/mnt/sda6/COMPILE/sage-4.7.2/devel/sage/sage/structure/
sage_object.pyx", line 1042:
    sage: sage.structure.sage_object.picklejar(1, dir + '/noaccess')
Expected:
    Traceback (most recent call last):
    ...
    OSError: ...
Got nothing
**********************************************************************
1 items had failures:
   1 of  11 in __main__.example_24
***Test Failed*** 1 failures.
For whitespace errors, see the file /root/.sage//tmp/
sage_object_3831.py
         [7.7 s]

This is about testing access to a directory which had permissions set
to "0000" before.
The doctest expects some sort of error message, but on my machine
there is no error.
I checked that the directory was created and the permissions were set
to 0000 correctly.
Is this critical or can it be fixed with some sort of setting?

EDIT: I found the culprit - I ran doctest as root.
If I run the doctest as restricted user I get the correct OSError
message.

Maybe there could be a check/warning if the tests run as root?


- failure 3 ---------------

sage -t -force_lib "devel/sage/sage/combinat/integer_vector.py"
**********************************************************************
File "/mnt/sda6/COMPILE/sage-4.7.2/devel/sage/sage/combinat/
integer_vector.py", line 262:
    sage: print gale_ryser_theorem(p1, p2)
Expected:
    [1 1 0]
    [1 0 1]
    [0 1 0]
Got:
    [0 1 1]
    [1 1 0]
    [1 0 0]
**********************************************************************
File "/mnt/sda6/COMPILE/sage-4.7.2/devel/sage/sage/combinat/
integer_vector.py", line 298:
    sage: print gale_ryser_theorem(p1, p2, algorithm="gale")
Expected:
    [1 1 1 0 0]
    [1 1 0 0 1]
    [1 0 1 0 0]
    [0 0 0 1 0]
Got:
    [1 0 1 1 0]
    [1 0 1 0 1]
    [1 1 0 0 0]
    [0 1 0 0 0]
**********************************************************************
1 items had failures:
   2 of  31 in __main__.example_3
***Test Failed*** 2 failures.
For whitespace errors, see the file /root/.sage//tmp/
integer_vector_4275.py
         [3.2 s]

Here we have another example of a different possible solution. I read
about the gale ryser theorem and
p1 =  [2,2,1], p2 = [2,2,1] and the row sum of the matrix should be p1
and the column sum of the matrix should be p2
which is obviously true for both matrices.

Same is true for the second doctest error, both matrices have
[3,3,2,1] [3,2,2,1,1] as row resp column sum.
Why choose doctests with multiple possible solutions?


- failure 4 --------------

sage -t -force_lib "devel/sage/sage/sandpiles/sandpile.py"
*** *** Error: TIMED OUT! PROCESS KILLED! *** ***

         [360.2 s]

This module gave me headaches before, just because doctests needs so
much time.
I went through the doctests manualy, most went through smooth, only
which took several seconds was
line 196:  S.resolution() - took maybe 15 sec
line 1897: S._set_resolution() - took maybe 35 sec
line 1939: S.resolution() - same as line 196
line 2026: S.betti() - took long, I timed it and got: CPU 2.19 s,
Wall: 48.64 s ?
line 4689: K.betti() - took ages, like 60 sec
line 4979: S.resolution() - took > 30 sec
line 5049: D=SandpileDivisor(S, [1,1,1,12,0]) - takes like 60 sec
line 5134: sage: for p in P: sum([partition_sandpile(S,
i).betti(verbose=False)[-1] for i in p]) ... betti in a loop :(, takes
about 20 sec
line 5138: S.betti() betti again
line 5172: sage: for p in P: sum([partition_sandpile(S,
i).betti(verbose=False)[-1] for i in p]) ... again, betti in loop
line 5181: S.betti ...

As one can see, most of the time is used for "betti" and this is
tested over and over again.
I think here there is a conflict with the function of the docstrings
as "help and documentation", and
as a way to test the correctness of the build. Is there a specific
problem with my machine so that this function is so slow?
Otherways it would make no sense for me to test this slow function
multiple times and have the test ultimately time out because of it. (6
minutes are 5% of overall test time)

Another point I don't understand is e.g in line 1367, there is the
example
sage: [i.effective_div() for i in ns] # optional - 4ti2

which gives a warning because I don't have "4ti2" installed - is this
another dependency?
in the documentation it says:
r"""
To calculate linear systems associated with divisors, 4ti2 must be
installed.
One way to do this is to run sage -i to install glpk, then 4ti2.  See
http://sagemath.org/download-packages.html to get the exact names of
these
packages.  An alternative is to install 4ti2 separately, then point
the
following variable to the correct path.
"""

I didn't know that there are hidden dependencies in regular sage
modules (other examples who need this dependency in this module are in
Lines 1644,1684ff, 3505ff, 4045, 4147f,4211, 4296, 4346, 4415, 5050)
Given this long list I assume the module sandbox is only fully usable
if this "4ti2" dependency is installed. IMHO this is questionable for
a standard module. Are there such hidden dependencies in other
standard sage modules? Would it be advisable to include all such
dependencies in a Live CD release?


- failure 5 ------------

sage -t -force_lib "devel/sage/sage/graphs/digraph.py"
The doctested process was killed by signal 6
         [5.6 s]

I get an error for the test in line 857:
sage: all( random_acyclic(100, .2).is_directed_acyclic()    # long
time
...        for i in range(50))                              # long
time

Line 1340:
sage: dcycle.feedback_edge_set(value_only=True)
give no result while it should give 5.0

also the next tests of the function "feedback_edge_set" do not work
properly
sage: g = graphs.RandomGNP(5,.3)
sage: dg = DiGraph(g)
sage: feedback = dg.feedback_edge_set()
sage: (u,v,l) = g.edge_iterator().next()
sage: (u,v) in feedback or (v,u) in feedback

gives no result while it should give True

other Doctests in this specific function fail with Traceback error.

so I think there is an error somewhere here wich results in the
"Killed/crashed" error. I tried the rest of the doctests in the
module, but those where OK.


ok thanks if you read this far :-) any help appreciated.
sincerly
emil

-- 
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