#11168: rubiks fails doctest with gcc 4.6.0 and -O2 optimisation.
---------------------------------------------------------------+------------
    Reporter:  drkirkby                                        |         Owner: 
 drkirkby                   
        Type:  defect                                          |        Status: 
 needs_review               
    Priority:  blocker                                         |     Milestone: 
 sage-4.7                   
   Component:  solaris                                         |    Resolution: 
                            
    Keywords:                                                  |   Work_issues: 
                            
    Upstream:  Reported upstream. Developers acknowledge bug.  |      Reviewer: 
 John Palmieri, David Kirkby
      Author:  David Kirkby, Jeroen Demeyer                    |        Merged: 
                            
Dependencies:                                                  |  
---------------------------------------------------------------+------------
Description changed by jdemeyer:

Old description:

> On a Sun Ultra 27 running !OpenSolaris 06/2009, the rubiks-20070912.p12
> package builds, but fails a doctest
>
> {{{
> drkirkby@hawk:~/sage-4.7.alpha3$ ./sage -t  -long -force_lib
> devel/sage/sage/interfaces/rubik.py
> sage -t -long -force_lib "devel/sage/sage/interfaces/rubik.py"
> **********************************************************************
> File
> "/export/home/drkirkby/sage-4.7.alpha3/devel/sage/sage/interfaces/rubik.py",
> line 132:
>     sage: solver = OptimalSolver() # long time
> Exception raised:
>     Traceback (most recent call last):
>       File
> "/export/home/drkirkby/sage-4.7.alpha3/local/bin/ncadoctest.py", line
> 1231, in run_one_test
>         self.run_one_example(test, example, filename, compileflags)
>       File
> "/export/home/drkirkby/sage-4.7.alpha3/local/bin/sagedoctest.py", line
> 38, in run_one_example
>         OrigDocTestRunner.run_one_example(self, test, example, filename,
> compileflags)
>       File
> "/export/home/drkirkby/sage-4.7.alpha3/local/bin/ncadoctest.py", line
> 1172, in run_one_example
>         compileflags, 1) in test.globs
>       File "<doctest __main__.example_3[4]>", line 1, in <module>
>         solver = OptimalSolver() # long time###line 132:
>     sage: solver = OptimalSolver() # long time
>       File "/export/home/drkirkby/sage-4.7.alpha3/local/lib/python/site-
> packages/sage/interfaces/rubik.py", line 98, in __init__
>         self.ready()
>       File "/export/home/drkirkby/sage-4.7.alpha3/local/lib/python/site-
> packages/sage/interfaces/rubik.py", line 117, in ready
>         self.child.expect('enter cube')
>       File "/export/home/drkirkby/sage-4.7.alpha3/local/lib/python/site-
> packages/pexpect.py", line 912, in expect
>         return self.expect_list(compiled_pattern_list, timeout,
> searchwindowsize)
>       File "/export/home/drkirkby/sage-4.7.alpha3/local/lib/python/site-
> packages/pexpect.py", line 978, in expect_list
>         raise EOF (str(e) + '\n' + str(self))
>     EOF: End Of File (EOF) in read_nonblocking(). Empty string style
> platform.
>     <pexpect.spawn instance at 0xc5367ac>
>     version: 2.0 ($Revision: 1.151 $)
>     command: /export/home/drkirkby/sage-4.7.alpha3/local/bin/optimal
>     args: ['/export/home/drkirkby/sage-4.7.alpha3/local/bin/optimal']
>     patterns:
>         enter cube
>     buffer (last 100 chars):
>     before (last 100 chars): olutions
>
>     initializing transformation tables
>
>     init_fulledge_to_edgequot : too many  edgequot's
>
>     after: <class 'pexpect.EOF'>
>     match: None
>     match_index: None
>     exitstatus: None
>     flag_eof: 1
>     pid: 10994
>     child_fd: 3
>     timeout: None
>     delimiter: <class 'pexpect.EOF'>
>     logfile: None
>     maxread: 2000
>     searchwindowsize: None
>     delaybeforesend: 0.1
> **********************************************************************
> 1 items had failures:
>    1 of  12 in __main__.example_3
> ***Test Failed*** 1 failures.
> For whitespace errors, see the file
> /export/home/drkirkby/.sage//tmp/.doctest_rubik.py
>          [9.4 s]
>
> ----------------------------------------------------------------------
> The following tests failed:
>

>         sage -t -long -force_lib "devel/sage/sage/interfaces/rubik.py"
> Total time for all tests: 9.4 seconds
> }}}
>
> However, if the optimisation level is changed from -O2 to -O1, the
> program behaves properly.
>
> {{{
> drkirkby@hawk:~/sage-4.7.alpha3$ ./sage -t  -long -force_lib
> devel/sage/sage/interfaces/rubik.py
> sage -t -long -force_lib "devel/sage/sage/interfaces/rubik.py"
>          [26.7 s]
>
> ----------------------------------------------------------------------
> All tests passed!
> Total time for all tests: 26.7 seconds
> }}}
>
> 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]
>
> For other gcc 4.6.0 specific problems see #11216

New description:

 On a Sun Ultra 27 running !OpenSolaris 06/2009, the rubiks-20070912.p12
 package builds, but fails a doctest

 {{{
 drkirkby@hawk:~/sage-4.7.alpha3$ ./sage -t  -long -force_lib
 devel/sage/sage/interfaces/rubik.py
 sage -t -long -force_lib "devel/sage/sage/interfaces/rubik.py"
 **********************************************************************
 File
 "/export/home/drkirkby/sage-4.7.alpha3/devel/sage/sage/interfaces/rubik.py",
 line 132:
     sage: solver = OptimalSolver() # long time
 Exception raised:
     Traceback (most recent call last):
       File
 "/export/home/drkirkby/sage-4.7.alpha3/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/export/home/drkirkby/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/export/home/drkirkby/sage-4.7.alpha3/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_3[4]>", line 1, in <module>
         solver = OptimalSolver() # long time###line 132:
     sage: solver = OptimalSolver() # long time
       File "/export/home/drkirkby/sage-4.7.alpha3/local/lib/python/site-
 packages/sage/interfaces/rubik.py", line 98, in __init__
         self.ready()
       File "/export/home/drkirkby/sage-4.7.alpha3/local/lib/python/site-
 packages/sage/interfaces/rubik.py", line 117, in ready
         self.child.expect('enter cube')
       File "/export/home/drkirkby/sage-4.7.alpha3/local/lib/python/site-
 packages/pexpect.py", line 912, in expect
         return self.expect_list(compiled_pattern_list, timeout,
 searchwindowsize)
       File "/export/home/drkirkby/sage-4.7.alpha3/local/lib/python/site-
 packages/pexpect.py", line 978, in expect_list
         raise EOF (str(e) + '\n' + str(self))
     EOF: End Of File (EOF) in read_nonblocking(). Empty string style
 platform.
     <pexpect.spawn instance at 0xc5367ac>
     version: 2.0 ($Revision: 1.151 $)
     command: /export/home/drkirkby/sage-4.7.alpha3/local/bin/optimal
     args: ['/export/home/drkirkby/sage-4.7.alpha3/local/bin/optimal']
     patterns:
         enter cube
     buffer (last 100 chars):
     before (last 100 chars): olutions

     initializing transformation tables

     init_fulledge_to_edgequot : too many  edgequot's

     after: <class 'pexpect.EOF'>
     match: None
     match_index: None
     exitstatus: None
     flag_eof: 1
     pid: 10994
     child_fd: 3
     timeout: None
     delimiter: <class 'pexpect.EOF'>
     logfile: None
     maxread: 2000
     searchwindowsize: None
     delaybeforesend: 0.1
 **********************************************************************
 1 items had failures:
    1 of  12 in __main__.example_3
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 /export/home/drkirkby/.sage//tmp/.doctest_rubik.py
          [9.4 s]

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t -long -force_lib "devel/sage/sage/interfaces/rubik.py"
 Total time for all tests: 9.4 seconds
 }}}

 However, if the optimisation level is changed from -O2 to -O1, the program
 behaves properly.

 {{{
 drkirkby@hawk:~/sage-4.7.alpha3$ ./sage -t  -long -force_lib
 devel/sage/sage/interfaces/rubik.py
 sage -t -long -force_lib "devel/sage/sage/interfaces/rubik.py"
          [26.7 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 26.7 seconds
 }}}

 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

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11168#comment:34>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to