Differences between revisions 2 and 3
Revision 2 as of 2009-02-05 06:48:54
Size: 7479
Comment: add problem description for the libSingular issue
Revision 3 as of 2009-04-21 23:25:20
Size: 7598
Comment: add notice that this page is outdated.
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

'''Note''': This page is outdated. Please check the [[osx64|Main OSX 64 bit porting page]] for the current status.

Sage 64 bit OSX 10.5 build notes for Sage 3.3

Note: This page is outdated. Please check the Main OSX 64 bit porting page for the current status.

Build Instructions

  • Download the experimental fortran-OSX64-20090120.spkg and replace the fortran.spkg in Sage with this one.
  • export SAGE64=yes
  • make

3.3.alpha5

List of known doctest failures with notes:

  • pexpect hang:
    • sage -t -long "devel/sage/sage/calculus/calculus.py"
    • sage -t -long "devel/sage/sage/interfaces/maxima.py"
  • pexpect issue:
    • sage -t -long "devel/sage/sage/interfaces/lisp.py"
  • strange memory issue:
    • sage -t -long "devel/sage/sage/calculus/wester.py"
  • out of memory
    • sage -t -long "devel/sage/sage/crypto/mq/sr.py"
  • segfault due to libSingular + system-malloc
    • sage -t -long "devel/sage/sage/groups/generic.py"
    • sage -t -long "devel/sage/sage/rings/polynomial/laurent_polynomial.pyx"
    • sage -t -long "devel/sage/sage/rings/polynomial/multi_polynomial.pyx"
    • sage -t -long "devel/sage/sage/rings/polynomial/multi_polynomial_element.py"
    • sage -t -long "devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py"
    • sage -t -long "devel/sage/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx"
    • sage -t -long "devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx"
    • sage -t -long "devel/sage/sage/schemes/elliptic_curves/ell_finite_field.py"
    • sage -t -long "devel/sage/sage/schemes/elliptic_curves/ell_generic.py"
    • sage -t -long "devel/sage/sage/schemes/elliptic_curves/ell_number_field.py"
    • sage -t -long "devel/sage/sage/schemes/elliptic_curves/ell_point.py"
    • sage -t -long "devel/sage/sage/schemes/generic/affine_space.py"
    • sage -t -long "devel/sage/sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py"
  • cannot allocate huge amount of memory:
    • sage -t -long "devel/sage/sage/libs/pari/gen.pyx"
  • known failure with patch:
    • sage -t -long "devel/sage/sage/rings/polynomial/toy_buchberger.py"
    • sage -t -long "devel/sage/sage/symbolic/function.pyx"

segfault due to libSingular + system-malloc

This problem shows up even for a plain Sage session where we quit immediately.

Sprocketer:sage-3.3.alpha5-64 michaelabshoff$ ./sage
----------------------------------------------------------------------
| Sage Version 3.3.alpha5, Release Date: 2009-02-03                  |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: 
Exiting SAGE (CPU time 0m0.07s, Wall time 0m1.56s).
sage.bin(48962) malloc: *** error for object 0x106603030: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
sage.bin(48962) malloc: *** error for object 0x106603038: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
sage.bin(48962) malloc: *** error for object 0x106602048: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
sage.bin(48962) malloc: *** error for object 0x106602030: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug

When setting break points in malloc_error_break as suggested one does see that the Rational() dtor of Singular is called in place of a higher level Rational() deallocation routine for the Rational() class in Givaro. A similar issue exists when calling minpoly in Python which ends up calling libSingular's minpoly(). None of these problems happen when libSingular uses mmap, but on any system tested the problem pops up when using the system malloc as backend. This is unavoidable on 64 bit OSX since otherwise libSingular's memory manager fails due to missing initialization.

sage/calculus/wester.py

python(91372) malloc: *** error for object 0x106532040: pointer being reallocated was not allocated
*** set a breakpoint in malloc_error_break to debug
**********************************************************************
File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/devel/sage/sage/calculus/wester.py", line 392:
    : print d.factor()
Exception raised:
    Traceback (most recent call last):
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_0[150]>", line 1, in <module>
        print d.factor()###line 392:
    : print d.factor()
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/lib/python2.5/site-packages/sage/calculus/calculus.py", line 3678, in factor
        w = repr(f.factor())
    RuntimeError
**********************************************************************

sage/libs/pari/gen.pyx

sage -t -long "devel/sage/sage/libs/pari/gen.pyx"           
python(13799) malloc: *** mmap(size=268435456000000) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
**********************************************************************
File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/devel/sage/sage/libs/pari/gen.pyx", line 7726:
    sage: pari.finitefield_init(7,2)
Exception raised:
    Traceback (most recent call last):
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_279[4]>", line 1, in <module>
        pari.finitefield_init(Integer(7),Integer(2))###line 7726:
    sage: pari.finitefield_init(7,2)
    RuntimeError
**********************************************************************
File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/devel/sage/sage/libs/pari/gen.pyx", line 7729:
    sage: pari.finitefield_init(2,3)
Exception raised:
    Traceback (most recent call last):
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/Users/michaelabshoff/Desktop/sage-3.3.alpha5-64/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_279[5]>", line 1, in <module>
        pari.finitefield_init(Integer(2),Integer(3))###line 7729:
    sage: pari.finitefield_init(2,3)
    RuntimeError
**********************************************************************