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.Mon, 04 Mar 2019 17:08:10 +0100Save/load huge dictionaryhttps://ask.sagemath.org/question/45651/saveload-huge-dictionary/I have a huge dictionary about 50 GB. After generating this dictionary, I do not have any space left on my memory. I still run Sagemath standard `save(mydict, 'myfile')`. However, the save runs almost forever.
What should I do? Storing it in multiple files is also fine to me. I really need to load it again to use in the future.
Maybe another approach is helpful. Besides the above dictionary, I have another huge redundant dictionary `mydict2`, which I tried using `del mydict2` to get some extra memory for the above Sagemath `save`; however, the memory usage still stays the same as before calling `del mydict2`. I guess its keys are still stored in memory. I do not need keys from `mydict2`, but its value is used in `mydict`.imnvshMon, 04 Mar 2019 17:08:10 +0100https://ask.sagemath.org/question/45651/save 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?Sandi XhumariSun, 01 Sep 2013 18:07:15 +0200https://ask.sagemath.org/question/10496/