New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failure in sage.rings.complex_arb on Cygwin #25620
Comments
comment:1
qsort() is not guaranteed to be a stable sort. I guess the two roots compare equal under arb's comparison function, and the qsort() implementations don't sort them in the same order. Fredrik, assuming this is correct, would it make sense to use a total order in vec_cort_pretty()? Or should we work around the issue in sage? |
comment:2
It makes sense to fix the comparison function. |
comment:3
Even so, it would be just as easy to supply a workaround in Sage as well. That said, perhaps the workaround is not high priority if the only affected platform is Cygwin. Perhaps the only reason it's affecting Cygwin is due to differences in the qsort implementation. |
comment:4
FWIW, I am seeing this consistently (since 8.3-b0, including 8.3-b8) on macOS 10.11.6. If I hack the source to reverse the last two entries in the root list, tests pass. |
comment:5
Not returning the answer in the desired sort order isn't exactly blocker material. I'm happy to merge if you provide a timely fix, of courese. |
comment:6
I believe any failing test or regression should be considered a blocker. How can you guarantee useful continuous integration tests if every run fails? Do I have to check the test results every time to see if something other than a known failure failed? If nothing else, until and unless Sage's test suite has a way of marking known failures to be ignored this should be a blocker. |
comment:7
Side note: it's one thing if it's just an occasional random failure if it's rare. It's another if something fails consistently on some platforms. A very simple fix to this would be to either change the code to provide additional sorting at the Python level, or change the test to not care (I'm fine with either). But unless it's passing it should be a blocker. |
Commit: |
Branch: u/mmezzarobba/ticket/25620 |
Author: Marc Mezzarobba |
New commits:
|
Reviewer: Travis Scrimshaw |
comment:9
LGTM. |
Changed branch from u/mmezzarobba/ticket/25620 to |
comment:11
Thanks--such a fix is good enough for me. |
Changed commit from |
SageMath version 8.3, Release Date: 2018-08-03 * tag '8.3': (8421 commits) Updated SageMath version to 8.3 Updated SageMath version to 8.3.rc3 although not strictly necessary, it would be good to bump the patch level if nothing else so the buildbots can see that the package changed Make absolutely sure that whatever else happened before installing or upgrading this package, we remove the old $SAGE_LOCAL/bin/pkg-config before trying to generate the new one, or lese it can become self-referential. Fixes https://trac.sagemath.org/ticket/25912 Updated SageMath version to 8.3.rc2 Add a stopgap to DuadicCodeEvenPair/DuadicCodeOddPair Add singular as dependency for p_group_cohomology bump version of pkgconf Updated SageMath version to 8.3.rc1 uninstall should happen before build Upgrade cysignals to 1.7.2 adjust for minor system-dependent floating point variation on this test; sagemath#25815 allow sdh_install to simply overwrite existing files when the -T option is used sagemath#25620 work around weakness of _arb_vec_sort_pretty in test Updated SageMath version to 8.3.rc0 Fix doctest due to more verbose python message 25529: corrected doc-build failure fix uninstall script Upgrade to Python 3.6.6 trac 25579 fixing bad handling of error msg in plot.py ...
The only difference (and I had to stare a while to see this) was in the sort order of the last 2 roots:
vs
where the only difference between the two is the sign on the complex part.
This failure, unsurprisingly, appears to be a possible problem with
arb; specifically the function _arb_vec_sort_pretty:
https://github.com/fredrik-johansson/arb/blob/f4dda0f34f30cb8cbfe3b18eafc9e5e8480a88da/acb/vec_sort_pretty.c#L48
I'm not sure why it only appears to be affecting me on Cygwin...
CC: @fredrik-johansson
Component: porting: Cygwin
Keywords: arb
Author: Marc Mezzarobba
Branch:
badccf6
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/25620
The text was updated successfully, but these errors were encountered: