Ask Your Question
2

How to increase ECL/maxima memory limits in SageMath?

asked 2019-07-18 11:15:50 +0100

Sevas gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-18 17:54:36 +0100

Emmanuel Charpentier gravatar image

Did you rebuild Sage after your patch ?

edit flag offensive delete link more

Comments

No, 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"?

Sevas gravatar imageSevas ( 2019-07-18 18:29:21 +0100 )edit

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

Sevas gravatar imageSevas ( 2019-07-18 18:34:17 +0100 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-07-18 11:15:50 +0100

Seen: 1,597 times

Last updated: Jul 18 '19