Opened 9 years ago

Closed 8 years ago

#11718 closed enhancement (duplicate)

Upgrade LinBox to version 1.1.7

Reported by: malb Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords:
Cc: fbissey, cschwan, vbraun, cpernet, kcrisman Merged in:
Authors: Reviewers: Volker Braun, Martin Albrecht
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by malb)

LinBox? 1.1.7 was release in 2010, yet we are still running 1.1.6. It fixes a few issues which are relevant to Sage

NOTE This SPKG re-enables the Commentator and hence might break on OSX 10.4! Needs testing.

Attachments (1)

trac_11718_linbox_1_1_7.patch (8.7 KB) - added by malb 9 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 9 years ago by malb

  • Dependencies changed from 9511 to #9511

comment:2 Changed 9 years ago by fbissey

  • Cc fbissey cschwan added

comment:3 Changed 9 years ago by malb

  • Description modified (diff)

comment:4 Changed 9 years ago by malb

  • Authors set to Martin Albrecht
  • Description modified (diff)

comment:5 Changed 9 years ago by malb

Status update

LinBox's Sage interface changed and this causes major problems. The attached patch is supposed to address this new interface but I cannot successfully link against liblinboxsage.so any more.

I get

    846                 import matrix_complex_double_dense
    847                 return matrix_complex_double_dense.Matrix_complex_double_dense
--> 848             elif sage.rings.finite_rings.integer_mod_ring.is_IntegerModRing(R) and R.order() < matrix_modn_dense.MAX_MODULUS:
    849                 if R.order() == 2:
    850                     return matrix_mod2_dense.Matrix_mod2_dense

AttributeError: 'module' object has no attribute 'MAX_MODULUS'

However, this is not a Python problem. If I remove everything from linbox.pyx except for

cdef class Foo:
    pass

and remove all references to LinBox except for one cimport of it in matrix_modn_dense and I empty out linbox-sage.C in the LinBox !SPKG except for

#include <iostream>
#include <gmp.h>

#include <cstdlib>
#include <vector>
#include <list>

#include "linbox-sage.h"

#include <linbox/util/commentator.h>

#include <linbox/blackbox/sparse.h>

#include "linbox/element/givaro-polynomial.h"

#include <linbox/matrix/blas-matrix.h>
#include <linbox/matrix/sparse.h>
#include <linbox/vector/sparse.h>

#include <linbox/algorithms/blas-domain.h>
#include <linbox/algorithms/echelon-form.h>
#include "linbox/algorithms/gauss.h"
#include "linbox/algorithms/smith-form-adaptive.h"
#include "linbox/ffpack/ffpack.h"
#include <linbox/solutions/rank.h>          
#include <linbox/solutions/det.h>
#include <linbox/solutions/solve.h>

#include "linbox/solutions/methods.h"
#include <linbox/solutions/minpoly.h>
#include "linbox/algorithms/double-det.h"
#include <linbox/integer.h>

#include <linbox/field/gmp-rational.h>
#include <linbox/ring/givaro-polynomial.h>

I still get this problem. Hence, I figure it should have something to do with the linking. That is, I assume LinBox overwrites some symbol or corrupts some memory somehow which makes it impossible to link against it from Sage.

However, I am out of ideas and steam. Hence, I'll give up on fixing this for now. But I will send an e-mail to the LinBox list.

PS: We also get the same UINT32_MAX error as #9511 on sage.math

comment:6 Changed 9 years ago by malb

  • Cc vbraun added

comment:7 Changed 9 years ago by malb

The updated patch + SPKG seems to fix the issue, testing on sage.math now

comment:8 Changed 9 years ago by malb

  • Description modified (diff)

The updated patch + SPKG seems to fix the issue, testing on sage.math now

Changed 9 years ago by malb

comment:9 Changed 9 years ago by malb

Well, we further but we don't reach the finish line:

sage -t -gdb "/home/malb/Sage/linbox/devel/sage/sage/matrix/matrix_modn_dense.pyx"
********************************************************************************
Type r at the (gdb) prompt to run the doctests.
Type bt if there is a crash to see a traceback.
********************************************************************************
GNU gdb (GDB) 7.2-debian
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/sage-4.7.1-linbox/local/bin/python...done.
(gdb) r
Starting program: /opt/sage-4.7.1-linbox/local/bin/python /home/malb/.sage//tmp/.doctest_matrix_modn_dense.py
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff48bd545 in std::basic_ostream<char, std::char_traits<char> >::sentry::sentry(std::basic_ostream<char, std::char_traits<char> >&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007ffff48bdc59 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00007ffff48be05f in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007fffdc91ef76 in ModularRandIter (F=..., frobeniusForm=..., N=3, A=0x4b56840, lda=3, c=30) at ../../linbox/randiter/modular.h:92
92                              commentator.report (10, INTERNAL_DESCRIPTION)

comment:10 Changed 9 years ago by malb

  • Cc cpernet added

comment:11 Changed 9 years ago by kcrisman

  • Cc kcrisman added
  • Keywords freebsd added

Interestingly, a related change about "commentator" apparently was helpful in trying to get Sage to build on FreeBSD.

comment:12 Changed 9 years ago by leif

Just for the record:

There's a LinBox 1.1.6.p8 spkg with a couple of fixes at #12762 (currently still needing review).

comment:13 Changed 8 years ago by malb

Please close this ticket as a duplicate.

comment:14 Changed 8 years ago by vbraun

  • Dependencies #9511 deleted
  • Keywords freebsd removed
  • Milestone changed from sage-5.1 to sage-duplicate/invalid/wontfix
  • Reviewers set to Volker Braun
  • Status changed from new to needs_review

comment:15 Changed 8 years ago by vbraun

  • Status changed from needs_review to positive_review

Agreed

comment:16 Changed 8 years ago by jdemeyer

  • Authors Martin Albrecht deleted
  • Reviewers changed from Volker Braun to Volker Braun, Martin Albrecht
  • Status changed from positive_review to needs_info

Duplicate of what?

comment:17 Changed 8 years ago by malb

It's a duplicate of #12883

comment:18 Changed 8 years ago by vbraun

  • Status changed from needs_info to needs_review

comment:19 Changed 8 years ago by vbraun

  • Status changed from needs_review to positive_review

comment:20 Changed 8 years ago by jdemeyer

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.