Re: [sage-support] Condition of type: STORAGE-EXHAUSTED

2020-01-06 Thread TAU
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 
 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?


-- 
Jori Mäntysalo

Tampereen yliopisto - Ihminen ratkaisee

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/alpine.DEB.2.21..2001070752370.118413%40shell.sis.uta.fi.


Re: [sage-support] Condition of type: STORAGE-EXHAUSTED

2019-12-20 Thread TAU
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

Tampereen yliopisto - Ihminen ratkaisee

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/alpine.DEB.2.21..1912201329100.29071%40shell.sis.uta.fi.


Re: [sage-support] Condition of type: STORAGE-EXHAUSTED

2019-12-20 Thread Mattia Villani
Here is my script:

print("Initialization of  manifold, chart, and metric. Definitions of 
constants.")
M=Manifold(4,'M',structure='Lorentzian')
X. = 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))

Il giorno venerdì 20 dicembre 2019 11:11:46 UTC+1, Jori Mäntysalo (TAU) ha 
scritto:
>
> 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 100)", 
> wait_for_prompt=False) 
>
> but propably you use some other part of Sage. 
>
> -- 
> Jori Mäntysalo 
>
> Tampereen yliopisto - Ihminen ratkaisee

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/80bdb9fd-83f8-4257-a48d-7b2e2fef035a%40googlegroups.com.


Re: [sage-support] Condition of type: STORAGE-EXHAUSTED

2019-12-20 Thread TAU
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 100)", 
wait_for_prompt=False)

but propably you use some other part of Sage.

-- 
Jori Mäntysalo

Tampereen yliopisto - Ihminen ratkaisee

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/alpine.DEB.2.21..1912201209120.29071%40shell.sis.uta.fi.


[sage-support] Condition of type: STORAGE-EXHAUSTED

2019-12-20 Thread Mattia Villani
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.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/07fc3988-deb2-45ad-9298-394b7457e89c%40googlegroups.com.