Memory Limit Error In SageMath running on Jupyter

RuntimeError                              Traceback (most recent call last)
/usr/lib/python3/dist-packages/sage/interfaces/interface.py in __init__(self, parent, value, is_name, name)
731             try:
\--\> 732                 self.\_name = parent.\_create(value, name=name)
733             except (TypeError, RuntimeError, ValueError) as x:

/usr/lib/python3/dist-packages/sage/interfaces/maxima_lib.py in \_create(self, value, name)
607             else:
\--\> 608                 self.set(name, value)
609         except RuntimeError as error:

/usr/lib/python3/dist-packages/sage/interfaces/maxima_lib.py in set(self, var, value)
515         cmd = '%s : %s$'%(var, value.rstrip(';'))
\--\> 516         self.eval(cmd)
517

/usr/lib/python3/dist-packages/sage/interfaces/maxima_lib.py in \_eval_line(self, line, locals, reformat, \*\*kwds)
461                 if statement:
\--\> 462                     maxima_eval("#$%s$" % statement)
463         if not reformat:

/usr/lib/python3/dist-packages/sage/libs/ecl.pyx in sage.libs.ecl.EclObject.__call__ (build/cythonized/sage/libs/ecl.c:8509)()
837         lispargs = EclObject(list(args))
\--\> 838         return ecl_wrap(ecl_safe_apply(self.obj,(\<EclObject\>lispargs).obj))
839

/usr/lib/python3/dist-packages/sage/libs/ecl.pyx in sage.libs.ecl.ecl_safe_apply (build/cythonized/sage/libs/ecl.c:6051)()
358         else:
\--\> 359             raise RuntimeError("ECL says: {}".format(message))
360     else:

RuntimeError: ECL says: Memory limit reached. Please jump to an outer pointer, quit program and enlarge the
memory limits before executing the program again.

I'm getting the following error in SageMath running on juypter. The code functions as intended for smaller datasets, but fails for larger ones. It says I have to allocate more memory, I've tried changing buffer size in juypter's config file, and got identical an error. any advice would be appreciated.

Upvotes: 0

Views: 66

Answers (1)

threonyl
threonyl

Reputation: 1

Had the same issue. See if any of the following helps.

import sage.libs.ecl
sage.libs.ecl.ecl_eval("(ext:set-limit 'ext:heap-size 0)")

From the discussion here: https://groups.google.com/g/sage-support/c/nieHqAWPHpQ?pli=1

A more in depth discussion is available here.

https://github.com/sagemath/sage/issues/6772

And the memory limits that you can change can be found here on the manual.

https://ecl.common-lisp.dev/static/files/manual/current-manual/Memory-Management.html#tab_003amem_002dlimits

Feel free to correct any mistakes, as I am also in the process of learning Sage.

Upvotes: 0

Related Questions