Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Error in determinant (serious!) - probably LinBox related
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mabshoff  
View profile  
 More options Aug 28 2007, 5:26 am
From: mabshoff <Michael.Absh...@fsmath.mathematik.uni-dortmund.de>
Date: Tue, 28 Aug 2007 02:26:59 -0700
Local: Tues, Aug 28 2007 5:26 am
Subject: Re: Error in determinant (serious!) - probably LinBox related
[I am now CCing linbox-use]

On Aug 28, 10:31 am, mabshoff <Michael.Absh...@fsmath.mathematik.uni-

dortmund.de> wrote:
> This is actually an open ticket at the LinBox trac: seehttp://linalg.org/projects/linalg/ticket/3

> I have updated our ticket description with a link to the LinBox
> ticket.

> Cheers,

> Michael

With the knowledge that I am about to become annoying (for posting too
often), but I did a little more digging: The determinant of the 8x8
matrix from LinBox's ticket #3 is now computed correctly. So that
ticket can be closed. But with the new problem Matrix from Sage's
ticket #498 valgrind tells me the following:

==30596== Invalid write of size 8
==30596==    at 0x1FCFAA6A: void
LinBox::create_MatrixQadic<LinBox::PID_integer,
LinBox::DenseMatrix<LinBox::PID_integer> >(LinBox::PID_intege
r const&, LinBox::DenseMatrix<LinBox::PID_integer> const&, double*,
unsigned long, Integer const&) (in /tmp/Work2/sage-2.8.1/sage-2.8.1/
local/
lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1FD00819:
LinBox::BlasMatrixApplyDomain<LinBox::PID_integer,
LinBox::DenseMatrix<LinBox::PID_integer> >::setup(Integer) (in
/tmp/Work2/sage-2.8.1/sage-2.8.1/local/lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1FD01BA7:
LinBox::LiftingContainerBase<LinBox::PID_integer,
LinBox::DenseMatrix<LinBox::PID_integer> >::LiftingContainerBase
<Integer, std::vector<Integer, std::allocator<Integer> >

>(LinBox::PID_integer const&, LinBox::DenseMatrix<LinBox::PID_integer>

const&, std::v
ector<Integer, std::allocator<Integer> > const&, Integer const&) (in /
tmp/Work2/sage-2.8.1/sage-2.8.1/local/lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1FD01F41:
LinBox::DixonLiftingContainer<LinBox::PID_integer,
LinBox::Modular<double>, LinBox::DenseMatrix<LinBox::PID_intege
r>, LinBox::BlasBlackbox<LinBox::Modular<double> >
>::DixonLiftingContainer<Integer, std::vector<Integer,

std::allocator<Integer> > >(LinBox::
PID_integer const&, LinBox::Modular<double> const&,
LinBox::DenseMatrix<LinBox::PID_integer> const&,
LinBox::BlasBlackbox<LinBox::Modular<doub
le> > const&, std::vector<Integer, std::allocator<Integer> > const&,
Integer const&) (in /tmp/Work2/sage-2.8.1/sage-2.8.1/local/lib/
liblinboxw
rap.so.0.0.0)
==30596==    by 0x1FD0583B: LinBox::SolverReturnStatus
LinBox::RationalSolver<LinBox::PID_integer, LinBox::Modular<double>,
LinBox::RandomPrim
eIterator,
LinBox::DixonTraits>::solveNonsingular<LinBox::DenseMatrix<LinBox::PID_inte ger>,
std::vector<Integer, std::allocator<Integer> >, st
d::allocator<Integer> >(std::vector<Integer, std::allocator<Integer>
>&, Integer&, LinBox::DenseMatrix<LinBox::PID_integer> const&,

std::alloc
ator<Integer> const&, bool, int) const (in /tmp/Work2/sage-2.8.1/
sage-2.8.1/local/lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1FD05BE5: Integer&
LinBox::LastInvariantFactor<LinBox::PID_integer,
LinBox::RationalSolver<LinBox::PID_integer, LinBox::Modu
lar<double>, LinBox::RandomPrimeIterator, LinBox::DixonTraits>
>::lastInvariantFactor1<LinBox::DenseMatrix<LinBox::PID_integer>,

std::vector<I
nteger, std::allocator<Integer> > >(std::vector<Integer,
std::allocator<Integer> >, std::vector<Integer,
std::allocator<Integer> >&, LinBox::D
enseMatrix<LinBox::PID_integer> const&) const (in /tmp/Work2/
sage-2.8.1/sage-2.8.1/local/lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1FD06494:
_ZN6LinBox11lif_cra_detINS_11DenseMatrixINS_11PID_integerEEENS_15HybridSpec ifierEEERNT_5Field7ElementES8_RKS5_RKNS
_14RingCategories10IntegerTagERKT0_ (in /tmp/Work2/sage-2.8.1/
sage-2.8.1/local/lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1FD06DB5:
_ZN6LinBox3detINS_11DenseMatrixINS_11PID_integerEEENS_15HybridSpecifierEEER NT_5Field7ElementES8_RKS5_RKNS_14RingCa
tegories10IntegerTagERKT0_ (in /tmp/Work2/sage-2.8.1/sage-2.8.1/local/
lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1FD06DEF:
_ZN6LinBox3detINS_11DenseMatrixINS_11PID_integerEEENS_15HybridSpecifierEEER NT_5Field7ElementES8_RKS5_RKT0_
(in /tm
p/Work2/sage-2.8.1/sage-2.8.1/local/lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1FD06E1B:
_ZN6LinBox3detINS_11DenseMatrixINS_11PID_integerEEEEERNT_5Field7ElementES7_ RKS4_
(in /tmp/Work2/sage-2.8.1/sage-2.
8.1/local/lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1FC6FCD2: linbox_integer_dense_det (in /tmp/Work2/
sage-2.8.1/sage-2.8.1/local/lib/liblinboxwrap.so.0.0.0)
==30596==    by 0x1F98FDAE:
__pyx_f_6linbox_20Linbox_integer_dense_det(_object*, _object*,
_object*) (linbox.cpp:1351)
==30596==  Address 0x27A9F6C8 is not stack'd, malloc'd or (recently)
free'd

So the problem is a different one than the once fixed.

On another note: William, didn't you merge my valgrind support patch
for Sage 2.8.2? A build from source complains about:

[mabshoff@m940 sage-2.8.2]$ ./sage
----------------------------------------------------------------------
| SAGE Version 2.8.2, Release Date: 2007-08-22                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage:
Exiting SAGE (CPU time 0m0.00s, Wall time 0m1.01s).
[mabshoff@m940 sage-2.8.2]$ ./sage -valgrind
Unknown option: -valgrind
usage: sage [options]
Try 'sage -h' for more information.

Cheers,

Michael


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Clement Pernet  
View profile  
 More options Aug 28 2007, 2:39 pm
From: Clement Pernet <clement.per...@gmail.com>
Date: Tue, 28 Aug 2007 14:39:10 -0400
Local: Tues, Aug 28 2007 2:39 pm
Subject: Re: [linbox-use] Re: Error in determinant (serious!) - probably LinBox related
Ok, since the bug comes from the rational-solver, and I am not familiar
with it neither, it may be longer than I expected.

I propose the following patch to replace temporarily the rational-solver
method by the classic chinese remaindering, so that the solution is not
broken of SAGE and others.

--- linbox/solutions/det.h      (revision 2798)
+++ linbox/solutions/det.h      (working copy)
@@ -572,7 +572,8 @@

 } // end of LinBox namespace

-#ifdef __LINBOX_HAVE_NTL
+//#ifdef __LINBOX_HAVE_NTL
+#if 0
 # include "linbox/algorithms/hybrid-det.h"
 # define SOLUTION_CRA_DET lif_cra_det
 #else

Pascal, I remember you were working on fixing this bug in our LinBox
coding week in august and you had to leave before finishing.
Can you help me with it if you have any hint ?

Clement
mabshoff a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mabshoff  
View profile  
 More options Aug 28 2007, 2:57 pm
From: mabshoff <Michael.Absh...@fsmath.mathematik.uni-dortmund.de>
Date: Tue, 28 Aug 2007 11:57:50 -0700
Local: Tues, Aug 28 2007 2:57 pm
Subject: Re: Error in determinant (serious!) - probably LinBox related

On Aug 28, 8:39 pm, Clement Pernet <clement.per...@gmail.com> wrote:

Hello,

with the patch applied I get something reasonable, so I would consider
this fixed for the time being:

 sage: M=Matrix(Integers(),20,20,L)
 sage: M.det()
 3951360
 sage: M.rank()
 20

I am running a sage -testall to make sure that nothing else is
negatively affected by the workaround. Thanks Clement for the quick
fix.

Cheers,

Michael


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal Giorgi  
View profile  
 More options Sep 3 2007, 12:14 pm
From: Pascal Giorgi <pascal.gio...@lirmm.fr>
Date: Mon, 03 Sep 2007 09:14:43 -0700
Local: Mon, Sep 3 2007 12:14 pm
Subject: Re: Error in determinant (serious!) - probably LinBox related
I have comited another modification under CVS in order to get rid of
your determinant bug.
Right now it seems to compute correctly the determinant of your 20x20
matrix.

I hope this would be enough.
I avoided Clement's patch under CVS and get back to the hybrid
version.

Cheers,
Pascal.

On Aug 28, 8:57 pm, mabshoff <Michael.Absh...@fsmath.mathematik.uni-


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mabshoff  
View profile  
 More options Sep 3 2007, 12:33 pm
From: mabshoff <Michael.Absh...@fsmath.mathematik.uni-dortmund.de>
Date: Mon, 03 Sep 2007 09:33:02 -0700
Local: Mon, Sep 3 2007 12:33 pm
Subject: Re: Error in determinant (serious!) - probably LinBox related

On Sep 3, 6:14 pm, Pascal Giorgi <pascal.gio...@lirmm.fr> wrote:

> I have comited another modification under CVS in order to get rid of
> your determinant bug.
> Right now it seems to compute correctly the determinant of your 20x20
> matrix.

> I hope this would be enough.
> I avoided Clement's patch under CVS and get back to the hybrid
> version.

> Cheers,
> Pascal.

Hello Pascal,

I assume that you mean Changeset 2803. I will apply that changeset to
Sage's LinBox spkg and report back.

Thanks a lot.

Cheers,

Michael


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mabshoff  
View profile  
 More options Sep 3 2007, 3:32 pm
From: mabshoff <Michael.Absh...@fsmath.mathematik.uni-dortmund.de>
Date: Mon, 03 Sep 2007 12:32:06 -0700
Local: Mon, Sep 3 2007 3:32 pm
Subject: Re: Error in determinant (serious!) - probably LinBox related

On Sep 3, 6:33 pm, mabshoff <Michael.Absh...@fsmath.mathematik.uni-

Ok, I applied ChangeSet 2803 and the result is the correct one:

sage: M=Matrix(Integers(),20,20,L)
sage: M.det()
max bit= 32 32
max value= 1662076505
3951360
sage: M.rank()
20
sage: M.det()
3951360

The only oddity is the debug output about "max bit" and "max value",
but that only shows up once and I can easily patch that out of our
spkg.

Once more thanks for your help,

Michael


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal Giorgi  
View profile  
 More options Sep 4 2007, 8:16 am
From: Pascal Giorgi <pascal.gio...@lirmm.fr>
Date: Tue, 04 Sep 2007 05:16:10 -0700
Local: Tues, Sep 4 2007 8:16 am
Subject: Re: Error in determinant (serious!) - probably LinBox related
Sorry for the debug output, I will fix it under SVN and not CVS
as I mentioned in my previous post.

Pascal.

On Sep 3, 9:32 pm, mabshoff <Michael.Absh...@fsmath.mathematik.uni-


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mabshoff  
View profile  
 More options Sep 4 2007, 5:16 pm
From: mabshoff <Michael.Absh...@fsmath.mathematik.uni-dortmund.de>
Date: Tue, 04 Sep 2007 14:16:52 -0700
Local: Tues, Sep 4 2007 5:16 pm
Subject: Re: Error in determinant (serious!) - probably LinBox related

On Sep 4, 2:16 pm, Pascal Giorgi <pascal.gio...@lirmm.fr> wrote:

> Sorry for the debug output, I will fix it under SVN and not CVS
> as I mentioned in my previous post.

> Pascal.

Hello Pascal,

somewhat bad news: This bug seems to be a zombie and doesn't want to
die. While the fix works as expected on little endian systems (x86,
x86-64) under Linux and OSX, it crashes outright or throws and
expection on big endian systems (PPC, Sparc) under OSX and Solaris.
The problem really caught us by surprise and was revealed by a doctest
written by William Stein for Sage.

As a solution I would suggest that you test on a big endian box and
hopefully add a regression test with these specific values to the test
suite. We can then verify independently on several architectures that
the problem is really fixed or as it appears not 100% yet at the
moment. Does the code have any places in it where endianess plays a
role? I also saw a segfault with test-zero-one on Sparc Solaris, but
have been unable to figure out what is wrong. I have a Linux PPC box
with valgrind, so once you have a regression test I could take it for
a spin there.

Cheers,

Michael


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »