Bill Allombert on Sat, 04 Jun 2011 12:19:53 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Pari GP Overflow

On Sat, Jun 04, 2011 at 12:09:38AM -0700, Ehsan ullah wrote:
> Hallo
> I am a very new user of Pari GP. I have a short problem. When I increase the
> stack using the command " allocatemem( )" , It doubles the stack upto a
> certain limit then I get the following message
> (20:41) gp > allocatemem()
>  *** allocatemem: Warning: doubling stack size; new stack 1024000000
> (976.562Mbytes).
>  *** allocatemem: Warning: not enough memory, new stack 512000000.

How much memory your computer have ? Assuming it has much more than 1GB of RAM,
I will hazard a guess: you are use Windows and the PARI installer that use cygwin.
In that case you can try the standalone GP binary:
It should be able to use more memory (up to about 3GB).

> How can I set the stack to maximum possible value on my computer or to such a
> value that i can compute with large integer matrices. I am interested in
> computing smith normal form of an integer matrix. Can you please help me to
> adjust the stack over flow.

Note that if your matrix is too large, PARI will not be able to deal with it.
How large it is ?

As a rule, if you need a very large PARI stack, you must use PARI on a 64bit linux system.
Then you can increase the stack to about half of the system memory. For example
if your system has 24GB or RAM, then you can do
default(parisize,"12G") (12G is for 12GB).