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
rubiks fails doctest with gcc 4.6.0 and -O2 optimisation. #11168
Comments
This comment has been minimized.
This comment has been minimized.
Author: David Kirkby |
This comment has been minimized.
This comment has been minimized.
comment:3
The patch is very simple. The new spkg builds on both hawk (OpenSolaris on x86, with gcc 4.5.0 and gcc 4.6.0) and t2 (Solaris on sparc, with gcc 4.5.1 and 4.6.0), and tests pass in all cases. With the old version, tests failed on both machines using gcc 4.6.0 (but everything worked fine with the earlier version of gcc). Note: to build with gcc 4.6.0 on t2, I had to set LD_LIBRARY_PATH and unset LD_OPTIONS; I couldn't get LD_OPTIONS to work. But I don't really know how to properly use these variables anyway... |
Reviewer: John Palmieri |
Merged: sage-4.7.alpha5 |
Changed merged from sage-4.7.alpha5 to none |
comment:6
Marking this as needs_work because there are more systems with the same symptom. In particular, on the buildbot Fedora 14-32 (cicero). |
comment:7
Also, I really dislike simply lowering the optimization level. That is wiping the problem under the carpet, not solving it. Also should be reported upstream. |
comment:8
Replying to @jdemeyer:
In the short term, I don't see we can do anything other than just lower the optimisation. It should be noted that there are quite a few Sage patches applied - some directly to the source code, which should not have been done, but has been done. This package has been patched 13 times already! Dave |
This comment has been minimized.
This comment has been minimized.
comment:9
Here's a revised package, which reduces the optimisation level to -O1 (as my previous patch), but this time only on all platforms, and not just Solaris. Dave |
comment:10
Replying to @sagetrac-drkirkby:
The grammar was not very good there! The point being, this patch changes the optimisation to -O1 on all platforms. Dave |
comment:11
I believe only the file src/reid/optimal.c needs to be reduced |
Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. Little or no feedback. |
comment:27
Replying to @jdemeyer:
Sure. |
Merged: sage-4.7.rc1 |
Changed merged from sage-4.7.rc1 to none |
This comment has been minimized.
This comment has been minimized.
Changed reviewer from John Palmieri to John Palmieri, David Kirkby |
Attachment: rubiks-20070912.p15-p16.diff.gz Diff for the rubiks spkg, for reviewing only |
comment:32
The patch will be applied for later versions than just gcc-4.6.0. |
comment:33
Replying to @sagetrac-mariah:
Why? There already exist pre-release versions of gcc 4.6.1 manifesting the same problem. I think that having the workaround for all versions 4.6.x doesn't really hurt. It is certainly a safer alternative than applying the workaround only for gcc 4.6.0. If at some point, this bug is fixed in a later gcc 4.6.x, then we can still change the spkg accordingly. |
This comment has been minimized.
This comment has been minimized.
comment:35
Can somebody please review? Thanks. |
comment:36
Replying to @jdemeyer:
Sure:
so that option is working to resolve the bug on OpenSolaris too. This looks good to me. Dave |
Merged: sage-4.7.rc2 |
Changed upstream from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release. |
comment:39
See #11437 for a follow-up. |
On a Sun Ultra 27 running OpenSolaris 06/2009, the rubiks-20070912.p12 package builds, but fails a doctest
However, if the optimisation level is changed from -O2 to -O1, the program behaves properly.
Similar problems have been observed on other platforms too. A revised package, which works around the gcc 4.6.0 bug by adding the flag -fno-ivopts:
http://boxen.math.washington.edu/home/jdemeyer/spkg/rubiks-20070912.p16.spkg
Reported upstream to gcc: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702
For other gcc 4.6.0 specific problems see #11216
Upstream: Fixed upstream, but not in a stable release.
CC: @jhpalmieri
Component: porting: Solaris
Author: David Kirkby, Jeroen Demeyer
Reviewer: John Palmieri, David Kirkby
Merged: sage-4.7.rc2
Issue created by migration from https://trac.sagemath.org/ticket/11168
The text was updated successfully, but these errors were encountered: