James G. McLaughlin on Mon, 13 Nov 2000 10:35:51 -0600 (CST)


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

Re: *** the PARI stack overflows !!!



On Mon, 13 Nov 2000, Karim BELABAS wrote:

> [James G. McLaughlin:]
> > The version of gp in use here may be an old one (not sure) so maybe this
> > problem no longer exists.
> 
> Easy to ascertain. What are the first few lines GP outputs upon startup? Mine
> reads
>                 GP/PARI CALCULATOR Version 2.1.0 (development)
>                  UltraSparc (MicroSparc kernel) 32-bit version
>                (readline v1.0 enabled, extended help available)
*************************************************************************
I guess it must be fairly old as it reads
                    GP/PARI CALCULATOR Version 2.0.4 (alpha)
                         SuperSparc Fast 32-bit version
                (readline enabled, extended help not available)
How old is this version? I might ask the sysadmin here if a newer version 
is available here.
***********************************************************************
> 
> 
> > , unless I have another copy of the program following the first (and if the
> > stack overflows several times I need several copies of the program in
> > succession, one for each time the stack overflows).
> 
> What do you mean by "another copy of the program following the first" ???
*********************************************************************
I have the program in a file between braces 
{ program  } 
and rather than read it in to an open active (with gp) window I set in
running in the background and have the output sent to an output file. It
sometimes happens that I run the program, the stack overflows and gp
quits.
If this happens I modify the file by having two or more copies of the
program in the file, one after the other.
{ program  } 
{ program  } 
so that when the stack overflows on the first copy and doubles in size, it
then starts to work on the second copy rather than quitting. As I said,
sometimes I do not know how big the stack needs to get for a particular
program so rather than allocate a huge amoount of memory I have several
copies of the program in the file 
{ program  }
{ program  }
{ program  }
{ program  }
{ program  }
{ program  }
so that if the stack needs to double several times there is a copy of the
program remaining that it can start on. Once I get the output I can kill
the run so that it does not work unnecessarily on the remaining copies.
	This is why, from my point of view, it would be useful if there
was some command in gp that would have it re-read an input file if the
stack overflowed and start working on it again. (Someone told me this was
actually the way it worked with older versions of gp).

		Jimmy Mc Laughlin,
		  Math. Dept.,
		   UIUC.