Re: [sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread Olivier Guillon
Hello,
it requires the tides package (spkg) to be installed first of all. In a
console, try 'sage -i tides' and it should work.

Olivier

Le jeu. 16 avr. 2020 à 17:54, Toan T Nguyen  a
écrit :

> Thank you. It's an easy problem to reproduce. You can cut-paste that code
> into the official online Sage Cell Server
>
> https://sagecell.sagemath.org/
>
> and see for yourself what I meant.
>
> Best regards
>
> Toan
>
> On Thursday, April 16, 2020 at 10:17:47 PM UTC+7, vdelecroix wrote:
>>
>> Hi,
>>
>> What do you mean by crash? Could you copy paste the *full* traceback
>> that you obtain?
>>
>> Le 16/04/2020 à 17:04, Toan T Nguyen a écrit :
>> > Hi all,
>> >
>> > I'm trying to solve a system of 1st order ODE using
>> desolve_tides_mpfr()
>> > arbitrary precision module. My script crashes at the external gcc call.
>> > So I try this very simple example I found from a tutorial in a website.
>> It
>> > also crashes at the same gcc call. I test it in the SageMath online
>> cell
>> > server, it crashes as well, so it's not just my code or my setup.
>> > Could somebody help with this example? Is this a bug, or the script is
>> > wrong?
>> >
>> > Thank you
>> >
>> > Toan
>> >
>> > var('t,x,y,z')
>> > s = 10
>> > r = 28
>> > b = 8/3
>> > f(t,x,y,z)= [s*(y-x),x*(r-z)-y,x*y-b*z]
>> > x0 =
>> >
>> -13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038284
>>
>> > y0 =
>> >
>> -19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676171
>>
>> > z0 = 27
>> > T =
>> >
>> 15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374
>>
>> > sol = desolve_tides_mpfr(f, [x0, y0, z0],0 , T, T, 1e-100, 1e-100, 100)
>> #
>> > optional - tides
>> > print(sol)
>> >
>>
> --
> 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/ba0eed69-0a08-4616-a27f-0c4a085f91ca%40googlegroups.com
> 
> .
>

-- 
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/CAJJbjsCuMUM%3DVPcK23LcFT70KuaO8h4myhbyoX_YzMtQEXuNeg%40mail.gmail.com.


Re: [sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread Toan T Nguyen
@slelievre

Thank you very much. I'm running in Windows using the binary installer (my 
Linux box uses CentOS which seems complicated to compile SageMath with all 
these dependencies that I need to compile manually as well).
The Sage shell in Windows state that I should not use sage -i ... to 
install. How do I do this in Windows?

Best regards
Toan

On Friday, April 17, 2020 at 12:39:20 AM UTC+7, slelievre wrote:
>
> Thu 2020-04-16 17:05:42 UTC, John H Palmieri:
> >
> > Maybe SageCell doesn't have the optional package "tides" installed. 
> > This is the same error I see on my own computer without "tides".
>
> I was thinking that too. I asked Andrey if it can be installed on SageCell:
>
> https://groups.google.com/d/topic/sage-cell/kR4R_HJDrms/discussion
>
>
> @[Toan T Nguyen]
>
> To run this command on your own Sage, you first need to install
> the optional package 'tides', which, depending on the OS and on
> how Sage was installed, might be achieved by running:
>
> sage -i tides
>
> Running it on SageCell would require 'tides' to be installed there,
> let's wait for Andrey's answer.
>
> I tried installing on Ubuntu with Sage 9.1.rc0, it worked.
>
> $ sage
> Forcing sage-location, probably because a new package was installed.
> Cleaning up, do not interrupt this.
> Done cleaning.
> ┌┐
> │ SageMath version 9.1.rc0, Release Date: 2020-04-12 │
> │ Using Python 3.7.3. Type "help()" for help.│
> └┘
> ┏┓
> ┃ Warning: this is a prerelease version, and it may be unstable. ┃
> ┗┛
> sage: t, x, y, z = SR.var('t, x, y, z')
> sage: s = 10
> sage: r = 28
> sage: b = 8/3
> sage: f(t,x,y,z)= [s*(y-x),x*(r-z)-y,x*y-b*z]
> sage: x0 = 
> -13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038284
> sage: y0 = 
> -19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676171
> sage: z0 = 27
> sage: T = 
> 15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374
> sage: sol = desolve_tides_mpfr(f, [x0, y0, z0],0 , T, T, 1e-100, 1e-100, 
> 100) # optional - tides
> sage: print(sol)
> [[0.000,
>  
> -13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038,
>  
> -19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676,
>  
> 27.0],
>  
> [15.5865221071617472756787020921269607052848054899724393588952157831901987562588808543558510826601424,
>  
> -13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346470530,
>  
> -19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506634524,
>  
> 27.000345574]]
>

-- 
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/4879cf4b-a680-45c6-9794-c9e84a566c4b%40googlegroups.com.


Re: [sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread slelievre
Thu 2020-04-16 17:05:42 UTC, John H Palmieri:
>
> Maybe SageCell doesn't have the optional package "tides" installed. 
> This is the same error I see on my own computer without "tides".

I was thinking that too. I asked Andrey if it can be installed on SageCell:

https://groups.google.com/d/topic/sage-cell/kR4R_HJDrms/discussion


@[Toan T Nguyen]

To run this command on your own Sage, you first need to install
the optional package 'tides', which, depending on the OS and on
how Sage was installed, might be achieved by running:

sage -i tides

Running it on SageCell would require 'tides' to be installed there,
let's wait for Andrey's answer.

I tried installing on Ubuntu with Sage 9.1.rc0, it worked.

$ sage
Forcing sage-location, probably because a new package was installed.
Cleaning up, do not interrupt this.
Done cleaning.
┌┐
│ SageMath version 9.1.rc0, Release Date: 2020-04-12 │
│ Using Python 3.7.3. Type "help()" for help.│
└┘
┏┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗┛
sage: t, x, y, z = SR.var('t, x, y, z')
sage: s = 10
sage: r = 28
sage: b = 8/3
sage: f(t,x,y,z)= [s*(y-x),x*(r-z)-y,x*y-b*z]
sage: x0 = 
-13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038284
sage: y0 = 
-19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676171
sage: z0 = 27
sage: T = 
15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374
sage: sol = desolve_tides_mpfr(f, [x0, y0, z0],0 , T, T, 1e-100, 1e-100, 
100) # optional - tides
sage: print(sol)
[[0.000,
 
-13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038,
 
-19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676,
 
27.0],
 
[15.5865221071617472756787020921269607052848054899724393588952157831901987562588808543558510826601424,
 
-13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346470530,
 
-19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506634524,
 
27.000345574]]

-- 
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/aaa65470-f656-4187-99f6-c2ac3ab8ba43%40googlegroups.com.


Re: [sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread John H Palmieri
Maybe SageCell doesn't have the optional package "tides" installed. This is 
the same error I see on my own computer without "tides".



On Thursday, April 16, 2020 at 9:26:21 AM UTC-7, slelievre wrote:
>
> Here is the error after executing the original poster's code in SageCell.
>
> ---CalledProcessError
> Traceback (most recent call 
> last) in ()  8 z0 = Integer(27) 
>  9 T = 
> RealNumber('15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374')--->
>  10 sol = desolve_tides_mpfr(f, [x0, y0, z0],Integer(0) , T, T, 
> RealNumber('1e-100'), RealNumber('1e-100'), Integer(100)) # optional - tides  
>11 print(sol)
> /home/sc_serv/sage/local/lib/python3.7/site-packages/sage/calculus/desolvers.py
>  in desolve_tides_mpfr(f, ics, initial, final, delta, tolrel, tolabs, digits) 
>   1887   + os.path.join('-L$SAGE_LOCAL','lib ') + 
> '-lmpfr -lgmp -lm  -O2 -w ' +   1888   
> os.path.join('-I$SAGE_LOCAL','include ') ,-> 1889   
> shell=True,  stdout=subprocess.PIPE, stderr=subprocess.PIPE)   1890 
> subprocess.check_call(os.path.join(tempdir, 'runme'), shell=True,  
> stdout=subprocess.PIPE, stderr=subprocess.PIPE)   1891 outfile = 
> open(fileoutput)
> /home/sc_serv/sage/local/lib/python3.7/subprocess.py in 
> check_call(*popenargs, **kwargs)345 if cmd is None:346
>  cmd = popenargs[0]--> 347 raise CalledProcessError(retcode, cmd) 
>348 return 0349 
> CalledProcessError: Command 'gcc -o 
> /home/sc_work/.sage/temp/sc-2B/23183/dir_rwnrlkk7/runme 
> /home/sc_work/.sage/temp/sc-2B/23183/dir_rwnrlkk7/*.c 
> $SAGE_LOCAL/lib/libTIDES.a $LDFLAGS -L$SAGE_LOCAL/lib -lmpfr -lgmp -lm  -O2 
> -w -I$SAGE_LOCAL/include ' returned non-zero exit status 1.
>
>  
>

-- 
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/18706f73-8228-4646-9989-82fc2795414e%40googlegroups.com.


Re: [sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread slelievre
Here is the error after executing the original poster's code in SageCell.

---CalledProcessError
Traceback (most recent call 
last) in ()  8 z0 = Integer(27)  
9 T = 
RealNumber('15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374')--->
 10 sol = desolve_tides_mpfr(f, [x0, y0, z0],Integer(0) , T, T, 
RealNumber('1e-100'), RealNumber('1e-100'), Integer(100)) # optional - tides
 11 print(sol)
/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/calculus/desolvers.py 
in desolve_tides_mpfr(f, ics, initial, final, delta, tolrel, tolabs, digits)   
1887   + os.path.join('-L$SAGE_LOCAL','lib ') + '-lmpfr 
-lgmp -lm  -O2 -w ' +   1888   
os.path.join('-I$SAGE_LOCAL','include ') ,-> 1889   
shell=True,  stdout=subprocess.PIPE, stderr=subprocess.PIPE)   1890 
subprocess.check_call(os.path.join(tempdir, 'runme'), shell=True,  
stdout=subprocess.PIPE, stderr=subprocess.PIPE)   1891 outfile = 
open(fileoutput)
/home/sc_serv/sage/local/lib/python3.7/subprocess.py in check_call(*popenargs, 
**kwargs)345 if cmd is None:346 cmd = 
popenargs[0]--> 347 raise CalledProcessError(retcode, cmd)348 
return 0349 
CalledProcessError: Command 'gcc -o 
/home/sc_work/.sage/temp/sc-2B/23183/dir_rwnrlkk7/runme 
/home/sc_work/.sage/temp/sc-2B/23183/dir_rwnrlkk7/*.c 
$SAGE_LOCAL/lib/libTIDES.a $LDFLAGS -L$SAGE_LOCAL/lib -lmpfr -lgmp -lm  -O2 -w 
-I$SAGE_LOCAL/include ' returned non-zero exit status 1.

 

-- 
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/ff9ba3cb-18f3-433f-8c8b-11a78b02091f%40googlegroups.com.


Re: [sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread Toan T Nguyen
Thank you. It's an easy problem to reproduce. You can cut-paste that code 
into the official online Sage Cell Server 

https://sagecell.sagemath.org/

and see for yourself what I meant.

Best regards

Toan

On Thursday, April 16, 2020 at 10:17:47 PM UTC+7, vdelecroix wrote:
>
> Hi, 
>
> What do you mean by crash? Could you copy paste the *full* traceback 
> that you obtain? 
>
> Le 16/04/2020 à 17:04, Toan T Nguyen a écrit : 
> > Hi all, 
> > 
> > I'm trying to solve a system of 1st order ODE using desolve_tides_mpfr() 
> > arbitrary precision module. My script crashes at the external gcc call. 
> > So I try this very simple example I found from a tutorial in a website. 
> It 
> > also crashes at the same gcc call. I test it in the SageMath online cell 
> > server, it crashes as well, so it's not just my code or my setup. 
> > Could somebody help with this example? Is this a bug, or the script is 
> > wrong? 
> > 
> > Thank you 
> > 
> > Toan 
> > 
> > var('t,x,y,z') 
> > s = 10 
> > r = 28 
> > b = 8/3 
> > f(t,x,y,z)= [s*(y-x),x*(r-z)-y,x*y-b*z] 
> > x0 = 
> > 
> -13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038284
>  
>
> > y0 = 
> > 
> -19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676171
>  
>
> > z0 = 27 
> > T = 
> > 
> 15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374
>  
>
> > sol = desolve_tides_mpfr(f, [x0, y0, z0],0 , T, T, 1e-100, 1e-100, 100) 
> # 
> > optional - tides 
> > print(sol) 
> > 
>

-- 
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/ba0eed69-0a08-4616-a27f-0c4a085f91ca%40googlegroups.com.


Re: [sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread Vincent Delecroix

Hi,

What do you mean by crash? Could you copy paste the *full* traceback
that you obtain?

Le 16/04/2020 à 17:04, Toan T Nguyen a écrit :

Hi all,

I'm trying to solve a system of 1st order ODE using desolve_tides_mpfr()
arbitrary precision module. My script crashes at the external gcc call.
So I try this very simple example I found from a tutorial in a website. It
also crashes at the same gcc call. I test it in the SageMath online cell
server, it crashes as well, so it's not just my code or my setup.
Could somebody help with this example? Is this a bug, or the script is
wrong?

Thank you

Toan

var('t,x,y,z')
s = 10
r = 28
b = 8/3
f(t,x,y,z)= [s*(y-x),x*(r-z)-y,x*y-b*z]
x0 =
-13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038284
y0 =
-19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676171
z0 = 27
T =
15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374
sol = desolve_tides_mpfr(f, [x0, y0, z0],0 , T, T, 1e-100, 1e-100, 100) #
optional - tides
print(sol)



--
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/bd9a5f9b-7e03-b4ce-d027-a56035e902bb%40gmail.com.


[sage-support] simple desolve_tides_mpfr crash, even for SageMath Cell Server

2020-04-16 Thread Toan T Nguyen
Hi all,

I'm trying to solve a system of 1st order ODE using desolve_tides_mpfr() 
arbitrary precision module. My script crashes at the external gcc call. 
So I try this very simple example I found from a tutorial in a website. It 
also crashes at the same gcc call. I test it in the SageMath online cell 
server, it crashes as well, so it's not just my code or my setup. 
Could somebody help with this example? Is this a bug, or the script is 
wrong?

Thank you

Toan

var('t,x,y,z')
s = 10
r = 28
b = 8/3
f(t,x,y,z)= [s*(y-x),x*(r-z)-y,x*y-b*z]
x0 = 
-13.7636106821342005250144010543616538641008648540923684535378642921202827747268115852940239346395038284
y0 = 
-19.5787519424517955388380414460095588661142400534276438649791334295426354746147526415973165506704676171
z0 = 27
T = 
15.586522107161747275678702092126960705284805489972439358895215783190198756258880854355851082660142374
sol = desolve_tides_mpfr(f, [x0, y0, z0],0 , T, T, 1e-100, 1e-100, 100) # 
optional - tides
print(sol)

-- 
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/60e6169f-ccc0-45b7-81c3-e09ab02b8a24%40googlegroups.com.