Skip to content
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

Upgrade LinBox to version 1.1.7 #11718

Closed
malb opened this issue Aug 23, 2011 · 21 comments
Closed

Upgrade LinBox to version 1.1.7 #11718

malb opened this issue Aug 23, 2011 · 21 comments

Comments

@malb
Copy link
Member

malb commented Aug 23, 2011

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.

CC: @kiwifb @cschwan @vbraun @ClementPernet @kcrisman

Component: packages: standard

Reviewer: Volker Braun, Martin Albrecht

Issue created by migration from https://trac.sagemath.org/ticket/11718

@malb malb added this to the sage-5.1 milestone Aug 23, 2011
@malb
Copy link
Member Author

malb commented Aug 23, 2011

Changed dependencies from 9511 to #9511

@malb

This comment has been minimized.

@malb

This comment has been minimized.

@malb
Copy link
Member Author

malb commented Aug 23, 2011

Author: Martin Albrecht

@malb
Copy link
Member Author

malb commented Aug 23, 2011

comment:5

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

@malb
Copy link
Member Author

malb commented Aug 24, 2011

comment:7

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

@malb

This comment has been minimized.

@malb
Copy link
Member Author

malb commented Aug 24, 2011

comment:8

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

@malb
Copy link
Member Author

malb commented Aug 24, 2011

comment:9

Attachment: trac_11718_linbox_1_1_7.patch.gz

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)

@kcrisman
Copy link
Member

comment:11

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

@kcrisman
Copy link
Member

Changed keywords from none to freebsd

@nexttime
Copy link
Mannequin

nexttime mannequin commented Apr 22, 2012

comment:12

Just for the record:

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

@malb
Copy link
Member Author

malb commented Jun 18, 2012

comment:13

Please close this ticket as a duplicate.

@vbraun
Copy link
Member

vbraun commented Jun 18, 2012

Changed dependencies from #9511 to none

@vbraun
Copy link
Member

vbraun commented Jun 18, 2012

Reviewer: Volker Braun

@vbraun
Copy link
Member

vbraun commented Jun 18, 2012

Changed keywords from freebsd to none

@vbraun vbraun removed this from the sage-5.1 milestone Jun 18, 2012
@vbraun
Copy link
Member

vbraun commented Jun 18, 2012

comment:15

Agreed

@jdemeyer
Copy link

Changed author from Martin Albrecht to none

@jdemeyer
Copy link

comment:16

Duplicate of what?

@jdemeyer
Copy link

Changed reviewer from Volker Braun to Volker Braun, Martin Albrecht

@malb
Copy link
Member Author

malb commented Jun 18, 2012

comment:17

It's a duplicate of #12883

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants