Re: [sage-devel] libpari defaults

2019-01-04 Thread John Cremona
On Fri, 4 Jan 2019 at 10:21, Jeroen Demeyer  wrote:

> On 2019-01-04 10:22, John Cremona wrote:
> > Some of the runs I have been doing use a large amount of RAM and some
> > fail
>
> "fail" in which sense? I assume you mean a PariError saying that the
> stack overflowed but I can only guess...
>

Yes, that's right.  Sorry not to be more explicit.


>
> > One is suppose to be able to increase this using the following syntax
> > sage: pari.default('parisizemax', 120)
> > but that raises a run-time error
>
> That error is actually a PARI "feature". It's one of the many curious
> implementation details of the PARI stack. The idea is that you shouldn't
> change the stack size during a computation. So the error forces the
> running computation to abort.
>
> In GP this error is silenced but you can still see its effect:
>
> gp> a=1; default(parisizemax, 10); a=2
>***   Warning: new maximum stack size = 101536 (953.676 Mbytes).
> gp> a
> %2 = 1
>
> Note that the "a=2" is not executed!
>
> Now to solutions: I would recommend using pari.allocatemem(sizemax=N) to
> change the stack size. That is handled a lot better by cypari2.
>

I will try that.  However the last time this happened was after about 5
days of computation so testing is not so easy.

Thanks,

John


> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] libpari defaults

2019-01-04 Thread Jeroen Demeyer

On 2019-01-04 10:22, John Cremona wrote:

Some of the runs I have been doing use a large amount of RAM and some
fail


"fail" in which sense? I assume you mean a PariError saying that the 
stack overflowed but I can only guess...



One is suppose to be able to increase this using the following syntax
sage: pari.default('parisizemax', 120)
but that raises a run-time error


That error is actually a PARI "feature". It's one of the many curious 
implementation details of the PARI stack. The idea is that you shouldn't 
change the stack size during a computation. So the error forces the 
running computation to abort.


In GP this error is silenced but you can still see its effect:

gp> a=1; default(parisizemax, 10); a=2
  ***   Warning: new maximum stack size = 101536 (953.676 Mbytes).
gp> a
%2 = 1

Note that the "a=2" is not executed!

Now to solutions: I would recommend using pari.allocatemem(sizemax=N) to 
change the stack size. That is handled a lot better by cypari2.


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] libpari defaults

2019-01-04 Thread John Cremona
I have been making extensive use of the Sage interface to libpari (in work
I will be reporting on soon at the Pari workshop
http://pari.math.u-bordeaux.fr/Events/PARI2019/.
http://pari.math.u-bordeaux.fr/Events/PARI2019/
Some of the runs I have been doing use a large amount of RAM and some fail
even on a machine with 512GB.  By default the size of the libpari parameter
'parisizemax' is half the physical RAM, for example on a 16GB laptop I see
sage: pari.default('parisizemax')
8324022272
while on the large machine I see
sage: pari.default('parisizemax')
272689184768

One is suppose to be able to increase this using the following syntax
sage: pari.default('parisizemax', 120)
but that raises a run-time error, even though afterwards:
sage: pari.default('parisizemax')
1202048

This is with 8.6.rc0.

I think it is a bug that there is a run-time error, and my question is
whether or not I can trust that the value has really changed?

John

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.