Sage crashes when inverting a large matrix - alternatives?

i like this post (click again to cancel)
i dont like this post (click again to cancel)

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!

asked Nov 21 '11

Zatrapadoo gravatar image Zatrapadoo
31 5

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?

DSM (Nov 21 '11)

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.

Volker Braun (Nov 21 '11)

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.

Zatrapadoo (Dec 09 '11)
i like this answer (click again to cancel)
i dont like this answer (click again to cancel)

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.


posted Nov 23 '11

Simon King gravatar image Simon King
376 2 11

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
Login/Signup to Post

Question tools

1 follower



Asked: Nov 21 '11

Seen: 143 times

Last updated: Nov 23 '11

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.