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.Tue, 17 Sep 2013 03:19:18 +0200save command in SAGEhttps://ask.sagemath.org/question/10496/save-command-in-sage/I'm trying to save a 'big' rational matrix in SAGE, but I'm running into problems.
After computing my matrix A, which has size 5 x 10,000 and each entry contains rational numbers in fraction form with total number of digits for numerator and denominator more than 10 pages, I run the following command:
save(A, DATA + 'A').
This gives me the following error message:
Traceback(most recent call last):
...
RuntimeError: Segmentation fault.
After this, I can't access A at all any more. In other words, when I try to compute say A[2,3], I get an error. However, before running the save command I was able to compute this entry. Also, I tried the same save command with a 'smaller' matrix and that worked fine. I should also note that I'm using a laptop with 64-bit operating system, x64-based processor, Windows 8, i7 CPU @ 2.40 GHz and 8 GB RAM. Let me know if you need further information. My questions are:
1. Why can't I save my matrix? Why do I get the above error message? What does it mean?
2. How can I save my matrix A? Is there any other way I can save it?Sun, 01 Sep 2013 18:07:15 +0200https://ask.sagemath.org/question/10496/save-command-in-sage/Comment by John Palmieri for <p>I'm trying to save a 'big' rational matrix in SAGE, but I'm running into problems.
After computing my matrix A, which has size 5 x 10,000 and each entry contains rational numbers in fraction form with total number of digits for numerator and denominator more than 10 pages, I run the following command:
save(A, DATA + 'A').
This gives me the following error message:</p>
<p>Traceback(most recent call last):
...
RuntimeError: Segmentation fault.</p>
<p>After this, I can't access A at all any more. In other words, when I try to compute say A[2,3], I get an error. However, before running the save command I was able to compute this entry. Also, I tried the same save command with a 'smaller' matrix and that worked fine. I should also note that I'm using a laptop with 64-bit operating system, x64-based processor, Windows 8, i7 CPU @ 2.40 GHz and 8 GB RAM. Let me know if you need further information. My questions are:
1. Why can't I save my matrix? Why do I get the above error message? What does it mean?
2. How can I save my matrix A? Is there any other way I can save it?</p>
https://ask.sagemath.org/question/10496/save-command-in-sage/?comment=17091#post-id-17091So you must be using a virtual machine to run Sage, right? How much RAM have you allocated to it? Does it help if you increase the RAM?Sun, 01 Sep 2013 21:13:19 +0200https://ask.sagemath.org/question/10496/save-command-in-sage/?comment=17091#post-id-17091Comment by Sandi Xhumari for <p>I'm trying to save a 'big' rational matrix in SAGE, but I'm running into problems.
After computing my matrix A, which has size 5 x 10,000 and each entry contains rational numbers in fraction form with total number of digits for numerator and denominator more than 10 pages, I run the following command:
save(A, DATA + 'A').
This gives me the following error message:</p>
<p>Traceback(most recent call last):
...
RuntimeError: Segmentation fault.</p>
<p>After this, I can't access A at all any more. In other words, when I try to compute say A[2,3], I get an error. However, before running the save command I was able to compute this entry. Also, I tried the same save command with a 'smaller' matrix and that worked fine. I should also note that I'm using a laptop with 64-bit operating system, x64-based processor, Windows 8, i7 CPU @ 2.40 GHz and 8 GB RAM. Let me know if you need further information. My questions are:
1. Why can't I save my matrix? Why do I get the above error message? What does it mean?
2. How can I save my matrix A? Is there any other way I can save it?</p>
https://ask.sagemath.org/question/10496/save-command-in-sage/?comment=17081#post-id-17081After increasing the allocated RAM from 512 MB to 5237 MB, the computation finished way faster, but I still got the same error message after the 'save' command. However, I am still able to access the matrix after running the save command, so I think your suggestion solved part of the problem. Thank you! Any other ideas how to fix the rest?Mon, 02 Sep 2013 19:54:49 +0200https://ask.sagemath.org/question/10496/save-command-in-sage/?comment=17081#post-id-17081Comment by Dima for <p>I'm trying to save a 'big' rational matrix in SAGE, but I'm running into problems.
After computing my matrix A, which has size 5 x 10,000 and each entry contains rational numbers in fraction form with total number of digits for numerator and denominator more than 10 pages, I run the following command:
save(A, DATA + 'A').
This gives me the following error message:</p>
<p>Traceback(most recent call last):
...
RuntimeError: Segmentation fault.</p>
<p>After this, I can't access A at all any more. In other words, when I try to compute say A[2,3], I get an error. However, before running the save command I was able to compute this entry. Also, I tried the same save command with a 'smaller' matrix and that worked fine. I should also note that I'm using a laptop with 64-bit operating system, x64-based processor, Windows 8, i7 CPU @ 2.40 GHz and 8 GB RAM. Let me know if you need further information. My questions are:
1. Why can't I save my matrix? Why do I get the above error message? What does it mean?
2. How can I save my matrix A? Is there any other way I can save it?</p>
https://ask.sagemath.org/question/10496/save-command-in-sage/?comment=17009#post-id-17009can you try saving it using the standard Python pickle? (or cPickle). http://docs.python.org/2/library/pickle.htmlTue, 17 Sep 2013 03:19:18 +0200https://ask.sagemath.org/question/10496/save-command-in-sage/?comment=17009#post-id-17009Comment by Sandi Xhumari for <p>I'm trying to save a 'big' rational matrix in SAGE, but I'm running into problems.
After computing my matrix A, which has size 5 x 10,000 and each entry contains rational numbers in fraction form with total number of digits for numerator and denominator more than 10 pages, I run the following command:
save(A, DATA + 'A').
This gives me the following error message:</p>
<p>Traceback(most recent call last):
...
RuntimeError: Segmentation fault.</p>
<p>After this, I can't access A at all any more. In other words, when I try to compute say A[2,3], I get an error. However, before running the save command I was able to compute this entry. Also, I tried the same save command with a 'smaller' matrix and that worked fine. I should also note that I'm using a laptop with 64-bit operating system, x64-based processor, Windows 8, i7 CPU @ 2.40 GHz and 8 GB RAM. Let me know if you need further information. My questions are:
1. Why can't I save my matrix? Why do I get the above error message? What does it mean?
2. How can I save my matrix A? Is there any other way I can save it?</p>
https://ask.sagemath.org/question/10496/save-command-in-sage/?comment=17082#post-id-17082Oh, I didn't know there's a way to allocate RAM to the virtual machine. I will try that and let you know. Thank you for your suggestion. Do you know why we need to allocate RAM manually btw? How come the vm will not just take RAM automatically if needed? After going to Machine/Settings it gave me the option to allocate more RAM, but it also warned me that if I allocate too much, the machine might not be able to run. What's the reason for that? Is there a guideline for deciding the amount of RAM I should allocate?Mon, 02 Sep 2013 16:57:42 +0200https://ask.sagemath.org/question/10496/save-command-in-sage/?comment=17082#post-id-17082