ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 09 Dec 2011 15:29:22 +0100Sage crashes when inverting a large matrix - alternatives?https://ask.sagemath.org/question/8501/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!Mon, 21 Nov 2011 13:46:14 +0100https://ask.sagemath.org/question/8501/sage-crashes-when-inverting-a-large-matrix-alternatives/Comment by DSM for <p>I'm trying to find the inverse of a 50x50 dense matrix of rational numbers. The matrix is created using the method <code>matrix_from_rows</code> from another matrix that was created using <code>matrix(QQ,B)</code> from a list of lists of rational numbers <code>B</code>. The error I get is the following:</p>
<pre><code>/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
</code></pre>
<p>I'm doing this at the university, so the number of processors and RAM both seem to be infinite. </p>
<p>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!</p>
https://ask.sagemath.org/question/8501/sage-crashes-when-inverting-a-large-matrix-alternatives/?comment=20844#post-id-20844You 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?Mon, 21 Nov 2011 14:21:57 +0100https://ask.sagemath.org/question/8501/sage-crashes-when-inverting-a-large-matrix-alternatives/?comment=20844#post-id-20844Comment by Volker Braun for <p>I'm trying to find the inverse of a 50x50 dense matrix of rational numbers. The matrix is created using the method <code>matrix_from_rows</code> from another matrix that was created using <code>matrix(QQ,B)</code> from a list of lists of rational numbers <code>B</code>. The error I get is the following:</p>
<pre><code>/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
</code></pre>
<p>I'm doing this at the university, so the number of processors and RAM both seem to be infinite. </p>
<p>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!</p>
https://ask.sagemath.org/question/8501/sage-crashes-when-inverting-a-large-matrix-alternatives/?comment=20843#post-id-20843Did you install a binary package? Most likely it was compiled with optimization flags that your CPU does not support. Try to compile from source.Mon, 21 Nov 2011 14:26:52 +0100https://ask.sagemath.org/question/8501/sage-crashes-when-inverting-a-large-matrix-alternatives/?comment=20843#post-id-20843Comment by Zatrapadoo for <p>I'm trying to find the inverse of a 50x50 dense matrix of rational numbers. The matrix is created using the method <code>matrix_from_rows</code> from another matrix that was created using <code>matrix(QQ,B)</code> from a list of lists of rational numbers <code>B</code>. The error I get is the following:</p>
<pre><code>/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
</code></pre>
<p>I'm doing this at the university, so the number of processors and RAM both seem to be infinite. </p>
<p>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!</p>
https://ask.sagemath.org/question/8501/sage-crashes-when-inverting-a-large-matrix-alternatives/?comment=20731#post-id-20731Thanks 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.Fri, 09 Dec 2011 15:29:22 +0100https://ask.sagemath.org/question/8501/sage-crashes-when-inverting-a-large-matrix-alternatives/?comment=20731#post-id-20731Answer by Simon King for <p>I'm trying to find the inverse of a 50x50 dense matrix of rational numbers. The matrix is created using the method <code>matrix_from_rows</code> from another matrix that was created using <code>matrix(QQ,B)</code> from a list of lists of rational numbers <code>B</code>. The error I get is the following:</p>
<pre><code>/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
</code></pre>
<p>I'm doing this at the university, so the number of processors and RAM both seem to be infinite. </p>
<p>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!</p>
https://ask.sagemath.org/question/8501/sage-crashes-when-inverting-a-large-matrix-alternatives/?answer=12879#post-id-12879Please 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.Wed, 23 Nov 2011 11:29:21 +0100https://ask.sagemath.org/question/8501/sage-crashes-when-inverting-a-large-matrix-alternatives/?answer=12879#post-id-12879