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 sage-s...@googlegroups.com
> To unsubscribe from this group, send email to sage-support...@googlegroups.com
> 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
Excellent! My guess i that the binary had either linbox or MPIR
compiled with support for some
processor instructions that maybe your computer doesn't have.... or
that one of them relied on
some library or something that you didn't have. Sorry for the
trouble. By building from source,
not only did it fix the problem you had, the resulting Sage should be
significantly faster, since it
is optimized for your hardware.
William
http://trac.sagemath.org/sage_trac/ticket/11581