ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 18 Jul 2019 11:34:17 -0500How to increase ECL/maxima memory limits in SageMath?http://ask.sagemath.org/question/47203/how-to-increase-eclmaxima-memory-limits-in-sagemath/ I am looking for a symbolic solution of a linear system 10x10. The coefficients and the right-hand sides are symbolic expressions, and it is critical for my. After one hour run with ~5 GB memory consumption I get an error message:
"TypeError: ECL says: Memory limit reached. Please jump to an outer pointer, quit program and enlarge the memory limits before executing the program again."
My Windows-10 PC has 64 GB, so it is definitely not the physical memory limitation. According to my Google search results, there are deliberately tight default memory limits in the Embeddable Common Lisp (ECL), which is used in Maxima. This page
"https://trac.sagemath.org/ticket/6772"
suggests to increase the ECL heap size to 1 GB by adding a line
"(ext:set-limit 'ext:heap-size (* 1024 1024 1024))"
to the file "maxima/src/ecl-port.lisp". I have found this file under "C:\Program Files\SageMath 8.7\runtime\opt\sagemath-8.7\local\share\maxima\5.41.0\src" and added such line with the 8 GB limit (* 2048 2048 2048). This had absolutely no effect, the same error message appeared after the same run time.
I see two such questions answered in this forum. However both answers suggest to reformulate the original problem, which is not what I need. I will appreciate an explanation of how to increase the ECL memory limits in SageMath. Is there something like ".eclrc" configuration file in SageMath? May be, I have to install Maxima standalone and try it there?Thu, 18 Jul 2019 04:15:50 -0500http://ask.sagemath.org/question/47203/how-to-increase-eclmaxima-memory-limits-in-sagemath/Answer by Emmanuel Charpentier for <p>I am looking for a symbolic solution of a linear system 10x10. The coefficients and the right-hand sides are symbolic expressions, and it is critical for my. After one hour run with ~5 GB memory consumption I get an error message:
"TypeError: ECL says: Memory limit reached. Please jump to an outer pointer, quit program and enlarge the memory limits before executing the program again."
My Windows-10 PC has 64 GB, so it is definitely not the physical memory limitation. According to my Google search results, there are deliberately tight default memory limits in the Embeddable Common Lisp (ECL), which is used in Maxima. This page
"https://trac.sagemath.org/ticket/6772"
suggests to increase the ECL heap size to 1 GB by adding a line
"(ext:set-limit 'ext:heap-size (* 1024 1024 1024))"
to the file "maxima/src/ecl-port.lisp". I have found this file under "C:\Program Files\SageMath 8.7\runtime\opt\sagemath-8.7\local\share\maxima\5.41.0\src" and added such line with the 8 GB limit (* 2048 2048 2048). This had absolutely no effect, the same error message appeared after the same run time.
I see two such questions answered in this forum. However both answers suggest to reformulate the original problem, which is not what I need. I will appreciate an explanation of how to increase the ECL memory limits in SageMath. Is there something like ".eclrc" configuration file in SageMath? May be, I have to install Maxima standalone and try it there?</p>
http://ask.sagemath.org/question/47203/how-to-increase-eclmaxima-memory-limits-in-sagemath/?answer=47207#post-id-47207Did you rebuild Sage after your patch ?Thu, 18 Jul 2019 10:54:36 -0500http://ask.sagemath.org/question/47203/how-to-increase-eclmaxima-memory-limits-in-sagemath/?answer=47207#post-id-47207Comment by Sevas for <p>Did you rebuild Sage after your patch ?</p>
http://ask.sagemath.org/question/47203/how-to-increase-eclmaxima-memory-limits-in-sagemath/?comment=47211#post-id-47211Another strange thing: after I call the "solve" function, the Windows Task Manager shows me the python process actively consuming CPU time, ~30%. However the "maxima" process shows 0% CPU. This continues for one hour. Then the python process starts to consume 90%-95% CPU time, maxima remains at 0%, and after a couple of minutes the memory error appears.Thu, 18 Jul 2019 11:34:17 -0500http://ask.sagemath.org/question/47203/how-to-increase-eclmaxima-memory-limits-in-sagemath/?comment=47211#post-id-47211Comment by Sevas for <p>Did you rebuild Sage after your patch ?</p>
http://ask.sagemath.org/question/47203/how-to-increase-eclmaxima-memory-limits-in-sagemath/?comment=47210#post-id-47210No, I did not. But meanwhile I tried another method, which should work also without any rebuilding:
in the Sage command line I ran this (recommended on the same page "https://trac.sagemath.org/ticket/6772"):
"maxima._eval_line(":lisp (ext:set-limit 'ext:heap-size 10000000000)", wait_for_prompt=False)"
This should work, because when I set the heap size to a smaller value 10000, the memory limit is reached with the simple test suggested on that web page: a=maxima(10)^(10^5) b=a^600
May be, I should not use the "matrix" and "vector" objects when constructing my linear system? But I need it, because the matrix of my linear system is a product of the two matrices. I can print the resulting matrix, it looks OK. But perhaps it is not OK for "maxima"?Thu, 18 Jul 2019 11:29:21 -0500http://ask.sagemath.org/question/47203/how-to-increase-eclmaxima-memory-limits-in-sagemath/?comment=47210#post-id-47210