Condition of type: STORAGE-EXHAUSTED

41 views
Skip to first unread message

Mattia Villani

unread,
Dec 20, 2019, 4:39:22 AM12/20/19
to sage-support
I got the error

Condition of type: STORAGE-EXHAUSTED

while running my program. After some Googling I have found that it means that my program has reached the memory limit. My question is: how to increase that limit?

Changing the program problably is not the solution, since I am calculating the Kretschmann scalar of a metric, which is the square of the curvature tensor which in turn has 256 components, so the number of terms in the expression explodes quite easily: it is not an issue of the program itself, but of mathematics of the problem at hand.

Jori Mäntysalo (TAU)

unread,
Dec 20, 2019, 5:11:46 AM12/20/19
to sage-support
On Thu, 19 Dec 2019, Mattia Villani wrote:

> Condition of type: STORAGE-EXHAUSTED

> Changing the program problably is not the solution, since I am calculating
> the Kretschmann scalar of a metric, which is the square of the curvature

What function are you using? For example SageMath contains Maxima and one
can increase it's stack size by

maxima._eval_line(":lisp (ext:set-limit 'ext:heap-size 1000000)", wait_for_prompt=False)

but propably you use some other part of Sage.

--
Jori Mäntysalo

Tampereen yliopisto - Ihminen ratkaisee

Mattia Villani

unread,
Dec 20, 2019, 5:18:57 AM12/20/19
to sage-support
Here is my script:

print("Initialization of  manifold, chart, and metric. Definitions of constants.")
M=Manifold(4,'M',structure='Lorentzian')
X.<t,r,th,ph> = M.chart(r"t r:(0,+oo) th:(0,pi):\theta ph:(0,2*pi):\phi")

(m,L,A,alpha,beta,r,th)=var('m,L,A,alpha,beta,r,th')

def G(r):
    return 1-alpha*(1-exp(-beta*m/(alpha*r^3)))

g=M.metric()

g[0,0]=-(1-2*m*r^4/(r^3+2*m*L^2)/(r^2+A^2*cos(th)^2))*G(r)
g[0,3]=-2*A*m*r^4/(r^3+2*m*L^2)*sin(th)^2/(r^2+A^2*cos(th)^2)*G(r)
g[3,0]=g[0,3]
g[1,1]=(r^2+A^2*cos(th)^2)/(r^2-2*m*r^4/(r^3+2*m*L^2)+A^2)
g[2,2]=r^2+A^2*cos(th)^2
g[3,3]=sin(th)^2*(r^2+A^2+2*A^2*m*r^4*sin(th)^2/(r^3+2*m*L^2)/(r^2+A^2*cos(th)^2))*G(r)

print('Calculating Riemann tensor')
R=g.riemann()

print('Calculating Kretschmann scalar')
dR=R.down(g)
uR=R.up(g)

kr=uR['^{abcd}']*dR['_{abcd}']

print('Plot Kretschmann scalar')
maxima.plot3d(kr.expr().subs(m=10,L=1,A=6,alpha=2,beta=4),[r,0,3],[th,0,3.14]);


print("Limit at the origin of the Kretschmann scalar from theta=0")
print(limit(limit(kr.expr().subs(m=10,L=1,A=6,alpha=2,beta=4),th=0),r=0))

print("Limit at the origin of the Kretschmann scalar from theta=pi")
print(limit(limit(kr.expr().subs(m=10,L=1,A=6,alpha=2,beta=4),th=pi),r=0))

Jori Mäntysalo (TAU)

unread,
Dec 20, 2019, 6:41:24 AM12/20/19
to sage-support
On Fri, 20 Dec 2019, Mattia Villani wrote:

> Here is my script:

In my test the code seems to really eat much memory, so maybe it's not
about changing allocation between heap and stack. Maybe you just run out
of memory.

Have you tried to run top-command (or gnome-system-monitor or something)
when the code is running?

Do you have access to machine with more memory? (For a researcher in
Finland I would suggest using a 1,5 TB RAM node on Puhti at CSC -- Italy
has MARCONI at CINECA, but it seems to not have any large-RAM nodes.
European LUMI machine will be installed later, so it is of no help for
this. (LUMI will be installed to Finland -- we almost have ice bears
walking on streets, so cooling the computer is much easier here. :=) ))

Jori Mäntysalo (TAU)

unread,
Jan 7, 2020, 12:54:01 AM1/7/20
to sage-support
On Fri, 20 Dec 2019, Jori Mantysalo wrote:

> On Fri, 20 Dec 2019, Mattia Villani wrote:
>
>> Here is my script:
>
> In my test the code seems to really eat much memory, so maybe it's not about
> changing allocation between heap and stack. Maybe you just run out of memory.

I left the code to run to a computer with 64 GB RAM when leaving on
vacation. However:

File
"/home/jm58660/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
line 986, in sr_limit
return max_to_sr(maxima_eval(([max_limit], L)))
File "sage/libs/ecl.pyx", line 805, in sage.libs.ecl.EclObject.__call__
(build/cythonized/sage/libs/ecl.c:7794)
File "sage/libs/ecl.pyx", line 377, in sage.libs.ecl.ecl_safe_apply
(build/cythonized/sage/libs/ecl.c:5456)
RuntimeError: ECL says: Maxima asks: Is
(_SAGE_VAR_r^5-20*_SAGE_VAR_r^4+36*_SAGE_VAR_r^3+20*_SAGE_VAR_r^2+720)

*((_SAGE_VAR_r^15+72*_SAGE_VAR_r^13+20*_SAGE_VAR_r^12+1296*_SAGE_VAR_r^11
+1440*_SAGE_VAR_r^10+25920*_SAGE_VAR_r^8)
*%e^(40/_SAGE_VAR_r^3)
+((-4*_SAGE_VAR_r^15)-288*_SAGE_VAR_r^13-80*_SAGE_VAR_r^12
-5184*_SAGE_VAR_r^11-5760*_SAGE_VAR_r^10
-103680*_SAGE_VAR_r^8)
*%e^(20/_SAGE_VAR_r^3)+4*_SAGE_VAR_r^15+288*_SAGE_VAR_r^13
+80*_SAGE_VAR_r^12+5184*_SAGE_VAR_r^11+5760*_SAGE_VAR_r^10
+103680*_SAGE_VAR_r^8) positive, negative or zero?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "koe.sage.py", line 39, in <module>
print(limit(limit(kr.expr().subs(m=_sage_const_10 ,L=_sage_const_1
,A=_sage_const_6 ,alpha=_sage_const_2 ,beta=_sage_const_4
),th=_sage_const_0 ),r=_sage_const_0 ))
File
"/home/jm58660/sage/local/lib/python3.7/site-packages/sage/calculus/calculus.py",
line 1368, in limit
l = maxima.sr_limit(ex, v, a)
File
"/home/jm58660/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
line 990, in sr_limit
self._missing_assumption(s)
File
"/home/jm58660/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
line 1035, in _missing_assumption
raise ValueError(outstr)
ValueError: Computation failed since Maxima requested additional
constraints; using the 'assume' command before evaluation *may* help
(example of legal syntax is 'assume((r^5-20*r^4+36*r^3+20*r^2+720)
>0)', see `assume?` for more details)
Is (r^5-20*r^4+36*r^3+20*r^2+720)
*((r^15+72*r^13+20*r^12+1296*r^11
+1440*r^10+25920*r^8)
*%e^(40/r^3)
+((-4*r^15)-288*r^13-80*r^12
-5184*r^11-5760*r^10
-103680*r^8)
*%e^(20/r^3)+4*r^15+288*r^13
+80*r^12+5184*r^11+5760*r^10
+103680*r^8) positive, negative or zero?
Reply all
Reply to author
Forward
0 new messages