Igor Schein on Mon, 26 Sep 2005 04:53:14 +0200


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

Re: time in computations


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.
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