|Joerg Arndt on Mon, 26 Sep 2005 17:21:06 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: time in computations|
* Igor Schein <email@example.com> [Sep 26. 2005 04:53]: > On Sat, Sep 24, 2005 at 12:17:56AM -0400, Mak Trifkovic wrote: > > Can I program something along these lines in PARI: do calculation xxx for > > 1 hr; if you don't finish within that time, quit. > > > > Thanks, > > Mak > > Workaround: > > limit cputime 3600 # if you're using csh or derivatives > ulimit -t 3600 # if you're using Bourne shell or derivatives > > Unfortunately it applies to the whole session, not each command. Just start it in a subshell: (ulimit -t 3600; gp < script.gp; ) > There's no way to do it natively from inside gp. I've brought up the > desirability of this feature in the past, it'd be nice to have it > accesible via default(), with default value 0 for unlimited. > > Igor I strongly vote for not duplicating basic O/S (or shell) functionality into pari/gp. -- p=2^q-1 prime <== q>2, cosh(2^(q-2)*log(2+sqrt(3)))%p=0 Life is hard and then you die.