On Fri, Aug 5, 2011 at 10:34 PM, Jacob Schlather
<[email protected]> wrote:
> I'm having a bit of a strange issue, I'm working on something where I
> need to find the rank of a somewhat large matrix over a finite field.
> I recall testing sage's capabilities when I was looking at how I was
> going to take the rank and remember sage taking the rank of matrices
> much larger than the one that's giving me trouble. Anyway the matrix
> I'm having an issue with is in the following file
> https://docs.google.com/leaf?id=0B_KM7xCfSwolYmQ4YTEzYjItYTNiZC00MTAxLTkxZGUtN2I3YzQ5NjRkOThh&hl=en_US
> .
It is an interesting exercise just to load that matrix into Sage,
given the way you provided it.
It would have been much nicer to provide a link to a pickle, or
sage_input, or convert
the matrix to a list first or something. Anyway, after downloading
your matrix, I can make the
corresponding Sage matrix as follows, I think:
sage: a = open('Matrix.dat').readlines()[1:]
sage: a =
''.join(open('Matrix.dat').readlines()[1:]).replace('[','').replace(']\n',',').replace('
',',')
sage: m = matrix(GF(5), 255,121, eval('['+a+']'))
I then try to compute the rank, and it seems to give me the answer instantly:
sage: time m.rank()
121
Time: CPU 0.01 s, Wall: 0.01 s
The answer seems very reasonable, since it would be the answer for a
random matrix of that size.
But who knows, maybe I read your matrix in incorrectly.
> The program works like a charm for matrices of smaller sizes, during
> this run it will get up to around size 381*70 before crashing. If I'm
> working over GF(7) then it's segfaulting for a matrix the size of 180
> x 116. It's possible that the error is somehow hidden in my program,
sage: a = random_matrix(GF(7), 180, 116)
sage: time a.rank()
116
Time: CPU 0.00 s, Wall: 0.00 s
It sounds like your copy of Sage is incorrectly installed. It would
be helpful to provide tons of useful information about
your sage install.
> in the off chance I've uploaded it here as well
> https://docs.google.com/leaf?id=0B_KM7xCfSwolY2UxNDA4OGQtZTJhZS00ZDBlLTg4ZDAtNjNmMzkzMWQyNmVh&hl=en_US
> . The offending inputs would be
> Lambda(5,5,5,1) and Lambda(7,4,7,1), of course increase the majority
> of those values will also give the same error.
>
> The error message I'm getting is:
>
> RuntimeError Traceback (most recent call
> last)
>
> /media/Media/Sage/sage-4.7-linux-64bit-ubuntu_10.04.1_lts-x86_64-Linux/
> <ipython console> in <module>()
>
> /media/Media/Sage/sage-4.7-linux-64bit-ubuntu_10.04.1_lts-x86_64-Linux/
> <string> in Lambda(q, m, k, r)
>
> /media/Media/Sage/sage-4.7-linux-64bit-ubuntu_10.04.1_lts-x86_64-Linux/
> local/lib/python2.6/site-packages/sage/matrix/matrix_modn_dense.so in
> sage.matrix.matrix_modn_dense.Matrix_modn_dense.rank (sage/matrix/
> matrix_modn_dense.c:11595)()
>
> RuntimeError: Segmentation fault
>
> --
> 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-support
> URL: http://www.sagemath.org
>
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
--
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-support
URL: http://www.sagemath.org