Sage crashes when inverting a large matrix - alternatives?

I'm trying to find the inverse of a 50x50 dense matrix of rational numbers. The matrix is created using the method matrix_from_rows from another matrix that was created using matrix(QQ,B) from a list of lists of rational numbers B. The error I get is the following:

/usr/.../sage-4.7.1/local/bin/sage-sage: line 301: 27416 Killed                  sage-cleaner &>/dev/null
/usr/.../sage-4.7.1/local/bin/sage-sage: line 301: 27417 Killed                  sage-ipython "\$@" -i


I'm doing this at the university, so the number of processors and RAM both seem to be infinite.

I wonder if there is an alternative. For example, I could try to invert the matrix in Mathematica or Maple. Is there an easy way to interface with them? Thank you!

edit retag close delete

You could interface, but it'd be nice to figure out what the problem is. Could you edit your message to include the smallest matrix you can find which crashes?

( 2011-11-21 07:21:57 -0500 )edit
1

Did you install a binary package? Most likely it was compiled with optimization flags that your CPU does not support. Try to compile from source.

( 2011-11-21 07:26:52 -0500 )edit

Thanks for the comments. I am sorry I did not come back before. (The reason was basically that I did not get notified of your comments by the system.) I do not know how the binary was compiled because I am using the version installed in the university's server. I will try to provide a concrete example, the way Simon King has suggested below.

( 2011-12-09 08:29:22 -0500 )edit

Sort by » oldest newest most voted

Please provide a concrete example, perhaps by providing a link to a worksheet or so.

I just tried (using sage-4.7.2):

sage: MS = MatrixSpace(QQ, 50)
sage: A = MS.random_element()
sage: %time B = ~A
CPU times: user 0.23 s, sys: 0.00 s, total: 0.23 s
Wall time: 0.38 s


So, 50x50 over QQ really doesn't seem to be a challenge, and thus it would be interesting to know what you did exactly.

more