Ask Your Question
1

Sage crashes when inverting a large matrix - alternatives?

asked 2011-11-21 06:46:14 -0500

Zatrapadoo gravatar image

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 flag offensive close delete

Comments

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 ( 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.

Volker Braun ( 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.

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

1 answer

Sort by » oldest newest most voted
2

answered 2011-11-23 04:29:21 -0500

Simon King gravatar image

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.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2011-11-21 06:46:14 -0500

Seen: 148 times

Last updated: Nov 23 '11