#9703: Doctest failures caused by non-working sympow on 32-bit Solaris x86 and
32-bit OpenSolaris
----------------------------+-----------------------------------------------
   Reporter:  drkirkby      |       Owner:  GeorgSWeber                         
     
       Type:  defect        |      Status:  needs_review                        
     
   Priority:  major         |   Milestone:  sage-4.5.3                          
     
  Component:  build         |    Keywords:                                      
     
     Author:  David Kirkby  |    Upstream:  Reported upstream. Little or no 
feedback.
   Reviewer:                |      Merged:                                      
     
Work_issues:                |  
----------------------------+-----------------------------------------------
Changes (by newvalueoldvalue):

 * cc: mhansen (added)
  * status:  new => needs_review
  * upstream:  N/A => Reported upstream. Little or no feedback.
  * author:  => David Kirkby


Comment:

 I now have a better understanding of why SYMPOW is failing to work
 correctly on Cygwin and Solaris on x86 chips. SYMPOW makes use of the
 [http://crd.lbl.gov/~dhbailey/mpdist/ Quad Double] code which relies on
 IEE-754 double-precision maths, with a 53-bit mantissa and 64-bits in
 total. However, the default mode of the x86 CPUs is to use extended
 precision where 64-bits are used for the mantissa and 80 bits in total. It
 is necessary to change the mode of operation of the floating point
 processor in order that the Quad double code will work at all. SYMPOW had
 code for this in a file fpu.c, but it only worked on Linux. It made use of
 Linux-specific header files too.

 The main change necessary was to add some inline assembly code to alter
 the values of bits 8 and 9 in the 16-bit control register of the floating
 point processor. I got the relevant information about the exact bits
 needed from an old (1987) copy of the Intel 80387 Programmer's Reference
 Manual.

 Here's a revised package which builds and passes all relevant tests on
  * !OpenSolaris (32-bit) on x64
  * Linux (64-bit)
  * OS X (64-bit)
  * Solaris 10 (32-bit) SPARC

 It was not possible to test on Solaris 10 x86, as access to the Skynet
 machines is currently unavailable, but I do not believe ll present any
 problems, since it builds fine on !OpenSolaris as a 32-bit application.

 http://boxen.math.washington.edu/home/kirkby/patches/sympow-1.018.1.p8.spkg

 Apart from a couple of minor changes, it is the same code which Mike
 Hansen tested on Cygwin and said it works there too.

 I've not implemented Christopher's changes which are necessary to get this
 to pass all the optional tests. Someone who is more keen than me can open
 a ticket for that if they wish. I just want to see the back of this rather
 annoying package.

 A note to reviewers (mainly aimed at Leif!) I know there are 1001 things
 wrong with this package, but I have no desire to clean them all up. Please
 review on the basis of the actual changes I made - not what it might be
 desirable to make. Otherwise it will never get reviewed.

 == Test results a Sun Ultra 27 running !OpenSolaris 06/2009 (Originally
 SYMPOW failed all tests on this workstation) ==
 {{{
 drkir...@hawk:~/32/sage-4.5.3.alpha1$ uname -a
 SunOS hawk 5.11 snv_134 i86pc i386 i86pc
 drkir...@hawk:~/32/sage-4.5.3.alpha1$ cat /etc/release
                        OpenSolaris Development snv_134 X86
            Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
                         Use is subject to license terms.
                              Assembled 01 March 2010
 drkir...@hawk:~/32/sage-4.5.3.alpha1$ ./sage -t  -long
 devel/sage/sage/modular/abvar/abvar.py
 sage -t -long "devel/sage/sage/modular/abvar/abvar.py"
          [27.4 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 27.5 seconds
 drkir...@hawk:~/32/sage-4.5.3.alpha1$ ./sage -t  -long
 devel/sage/sage/lfunctions/sympow.py
 sage -t -long "devel/sage/sage/lfunctions/sympow.py"
          [5.8 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 5.8 seconds
 drkir...@hawk:~/32/sage-4.5.3.alpha1$ ./sage -t  -long
 devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py
 sage -t -long
 "devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py"
          [212.8 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 212.8 seconds
 drkir...@hawk:~/32/sage-4.5.3.alpha1$
 }}}
 == Test results on Ubunta Linux (sage.math) ==
 {{{
 kir...@sage:~/sage-4.5.alpha4$ uname -a
 Linux sage.math.washington.edu 2.6.24-28-server #1 SMP Sat Jul 31 18:41:35
 UTC 2010 x86_64 GNU/Linux
 kir...@sage:~/sage-4.5.alpha4$ cat /etc/issue
 Ubuntu 8.04.4 LTS \n \l

 kir...@sage:~/sage-4.5.alpha4$ ./sage -t  -long
 devel/sage/sage/modular/abvar/abvar.py
 sage -t -long "devel/sage/sage/modular/abvar/abvar.py"
          [34.1 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 34.1 seconds
 kir...@sage:~/sage-4.5.alpha4$ ./sage -t  -long
 devel/sage/sage/lfunctions/sympow.py
 sage -t -long "devel/sage/sage/lfunctions/sympow.py"
          [9.1 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 9.1 seconds
 kir...@sage:~/sage-4.5.alpha4$ ./sage -t  -long
 devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py
 sage -t -long
 "devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py"
          [170.5 s]

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

  == Test results on OS X (bsd.math) ==
 {{{
 [kir...@bsd sage-4.5.rc1]$ uname -a
 Darwin bsd.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53
 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 i386 MacPro1,1 Darwin
 [kir...@bsd sage-4.5.rc1]$ ./sage -t  -long
 devel/sage/sage/modular/abvar/abvar.py
 sage -t -long "devel/sage/sage/modular/abvar/abvar.py"
          [40.5 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 40.5 seconds
 [kir...@bsd sage-4.5.rc1]$ ./sage -t  -long
 devel/sage/sage/lfunctions/sympow.py
 sage -t -long "devel/sage/sage/lfunctions/sympow.py"
          [7.6 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 7.7 seconds
 [kir...@bsd sage-4.5.rc1]$ ./sage -t  -long
 devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py
 sage -t -long
 "devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py"
          [184.0 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 184.0 seconds

 }}}
  == Test results on a Sun T5240 SPARC running Solaris 10 update 7
 (t2.math) ==
 {{{
 kir...@t2:32 ~/t2/32/sage-4.5.3.alpha0$ uname -a
 SunOS t2 5.10 Generic_141414-02 sun4v sparc SUNW,T5240
 kir...@t2:32 ~/t2/32/sage-4.5.3.alpha0$ cat /etc/release
                        Solaris 10 5/09 s10s_u7wos_08 SPARC
            Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                         Use is subject to license terms.
                              Assembled 30 March 2009
 kir...@t2:32 ~/t2/32/sage-4.5.3.alpha0$
 kir...@t2:32 ~/t2/32/sage-4.5.3.alpha0$ ./sage -t  -long
 devel/sage/sage/modular/abvar/abvar.py
 sage -t -long "devel/sage/sage/modular/abvar/abvar.py"
          [321.2 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 321.5 seconds
 kir...@t2:32 ~/t2/32/sage-4.5.3.alpha0$ ./sage -t  -long
 devel/sage/sage/lfunctions/sympow.py
 sage -t -long "devel/sage/sage/lfunctions/sympow.py"
          [89.0 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 89.2 seconds
 kir...@t2:32 ~/t2/32/sage-4.5.3.alpha0$ ./sage -t  -long
 devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py
 sage -t -long
 "devel/sage/sage/schemes/elliptic_curves/ell_rational_field.py"
          [3219.6 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 3219.8 seconds

 }}}
 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9703#comment:11>
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