Ticket #6825 (closed defect: fixed)
intermittent failure in vector_real_double_dense.pyx
| Reported by: | mvngu | Owned by: | tbd |
|---|---|---|---|
| Priority: | blocker | Milestone: | sage-4.2.1 |
| Component: | doctest coverage | Keywords: | |
| Cc: | jason | Work issues: | |
| Report Upstream: | Reviewers: | William Stein | |
| Authors: | Mike Hansen | Merged in: | sage-4.2.1.rc0 |
| Dependencies: | Stopgaps: |
Description
Mariah Lenox reported the following doctest failure when running the test suite:
sage -t "devel/sage/sage/modules/vector_real_double_dense.pyx" ********************************************************************** File "/home/mariah/sage/sage-4.1.1-x86_64-Linux-core2-fc-move/devel/sage/sage/modules/vector_real_double_dense.pyx", line 72: sage: v.stats_skew() Expected: 0.0 Got: doctest:106: SyntaxWarning: assertion is always true, perhaps remove parentheses? 0.0 ********************************************************************** 1 items had failures:
But if you run doctest again on sage/modules/vector_real_double_dense.pyx, the failure would disappear. This is an intermittent failure I came across while managing the release of Sage 4.1.1.
Change History
comment:2 Changed 4 years ago by was
I can make the problem described in sage trac ticket #6825
reproducible and not intermitent.
If you remove
local/lib/python/site-packages/scipy/stats/mstats_basic.pyc
then you will see the error when you run
sage -t "devel/sage/sage/modules/vector_real_double_dense.pyx"
This reproduces the problem whether or not you move the build directory.
One possible fix for the problem is to remove line 106 of
local/lib/python/site-packages/scipy/stats/mstats_basic.py
which is the assert line about which the output message complains.
I do not know a lot about python, but it seems that
python evidently has some check that the sage tree has moved and
so rebuilds *.pyc files if they have not been regenerated recently.
I am surprised that local/bin/sage-location does not remove all the
*.pyc files and rebuild them when the sage tree moves.
Mariah
comment:4 follow-up: ↓ 5 Changed 4 years ago by mvngu
Now I get a mysterious error in Sage 4.2.alpha0:
[mvngu@sage sage-4.2.alpha0-sage.math]$ sage -t -long devel/sage-main/sage/modules/vector_real_double_dense.pyx
sage -t -long "devel/sage-main/sage/modules/vector_real_double_dense.pyx"
A mysterious error (perhaps a memory error?) occurred, which may have crashed doctest.
[3.1 s]
exit code: 768
----------------------------------------------------------------------
The following tests failed:
sage -t -long "devel/sage-main/sage/modules/vector_real_double_dense.pyx"
Total time for all tests: 3.1 seconds
comment:5 in reply to: ↑ 4 Changed 4 years ago by jason
Replying to mvngu:
Now I get a mysterious error in Sage 4.2.alpha0:
This seems like a totally different error. Should a new ticket be opened?
comment:6 Changed 4 years ago by jason
- Is your memory error reproducible?
- Can you use hg bisect to narrow it down to a patch?
comment:8 Changed 4 years ago by mhansen
- Status changed from new to needs_review
I've made an spkg which fixes the assert statement by switching it to the correct syntax.
It can be found a http://sage.math.washington.edu/home/mhansen/scipy-0.7.p3.spkg
comment:10 Changed 4 years ago by was
Positive review. I slightly modified the spkg and put the modified version here:
comment:12 follow-up: ↓ 13 Changed 4 years ago by was
Oh, and the thing mike patched has already been fixed upstream.
comment:13 in reply to: ↑ 12 Changed 4 years ago by jason
Replying to was:
Oh, and the thing mike patched has already been fixed upstream.
We're already a version behind (we're at 0.7, but upstream is 0.7.1). Would upgrading to 0.7.1 get us this fix?
comment:14 Changed 4 years ago by jason
Is this the bug: http://projects.scipy.org/scipy/ticket/944
If so, it is fixed in 0.7.1, so we should probably just upgrade.
comment:15 Changed 4 years ago by mhansen
Yes, that's the bug. I think at this point, it makes more sense to apply the small fix for 4.2.1 which should be out in the next day or so.
In 4.3, we can upgrade to 0.7.1 when we can get more rounds of testing on various platforms.
comment:16 Changed 4 years ago by mhansen
- Status changed from positive_review to closed
- Reviewers set to William Stein
- Resolution set to fixed
- Merged in set to sage-4.2.1.rc0
I'll open a new ticket to update to 0.7.1.

I think this is probably an error in scipy or numpy.